@@ -503,7 +503,9 @@ class jgf_error : exception {
503503 }
504504 }
505505
506- virtual const char *what () const noexcept override { return this ->info .c_str (); }
506+ virtual const char *what () const noexcept override {
507+ return this ->info .c_str ();
508+ }
507509};
508510
509511/* ==================== parameter End ================== */
@@ -548,7 +550,9 @@ string conf_str(const string &key, const string &val) {
548550 }
549551 return uconfig[key];
550552}
551- string conf_str (const string &key) { return conf_str (key, " " ); }
553+ string conf_str (const string &key) {
554+ return conf_str (key, " " );
555+ }
552556int conf_int (const string &key, const int &val) {
553557 if (uconfig.count (key) == 0 ) {
554558 return val;
@@ -563,7 +567,9 @@ int conf_int(const string &key, int num, const int &val) {
563567 }
564568 return atoi (uconfig[sout.str ()].c_str ());
565569}
566- int conf_int (const string &key) { return conf_int (key, 0 ); }
570+ int conf_int (const string &key) {
571+ return conf_int (key, 0 );
572+ }
567573double conf_double (const string &key, const double &val) {
568574 if (uconfig.count (key) == 0 ) {
569575 return val;
@@ -578,7 +584,9 @@ double conf_double(const string &key, int num, const double &val) {
578584 }
579585 return stod (uconfig[sout.str ()]);
580586}
581- double conf_double (const string &key) { return conf_double (key, 0 ); }
587+ double conf_double (const string &key) {
588+ return conf_double (key, 0 );
589+ }
582590string conf_file_name_with_num (string s, int num) {
583591 ostringstream name;
584592 if (num < 0 ) {
@@ -587,8 +595,12 @@ string conf_file_name_with_num(string s, int num) {
587595 name << conf_str (s + " _pre" , s) << abs (num) << " ." << conf_str (s + " _suf" , " txt" );
588596 return name.str ();
589597}
590- string conf_input_file_name (int num) { return conf_file_name_with_num (" input" , num); }
591- string conf_output_file_name (int num) { return conf_file_name_with_num (" output" , num); }
598+ string conf_input_file_name (int num) {
599+ return conf_file_name_with_num (" input" , num);
600+ }
601+ string conf_output_file_name (int num) {
602+ return conf_file_name_with_num (" output" , num);
603+ }
592604runp::limits_t conf_run_limit (string pre , const int &num, const runp::limits_t &val) {
593605 if (!pre .empty ()) {
594606 pre += " _" ;
@@ -610,7 +622,9 @@ void conf_add(const string &key, const string &val) {
610622 }
611623 uconfig[key] = val;
612624}
613- bool conf_has (const string &key) { return uconfig.count (key); }
625+ bool conf_has (const string &key) {
626+ return uconfig.count (key);
627+ }
614628bool conf_is (const string &key, const string &val) {
615629 return uconfig.count (key) && uconfig[key] == val;
616630}
@@ -1303,7 +1317,9 @@ bool TestPoint::add_info_block(const string &fkey) {
13031317 return true ;
13041318}
13051319
1306- bool TestPoint::check () { return po.info .empty () || po.scr == 100 ; }
1320+ bool TestPoint::check () {
1321+ return po.info .empty () || po.scr == 100 ;
1322+ }
13071323
13081324bool TestPoint::prepare_io () {
13091325 try {
@@ -1899,7 +1915,9 @@ CustomTestInfo ordinary_custom_test(const string &name) {
18991915}
19001916*/
19011917
1902- int scale_score (int scr100, int full) { return scr100 * full / 100 ; }
1918+ int scale_score (int scr100, int full) {
1919+ return scr100 * full / 100 ;
1920+ }
19031921
19041922/* ====================== test End ================== */
19051923
@@ -2048,17 +2066,29 @@ class Judger {
20482066 }
20492067
20502068public:
2051- virtual int n_tests () { return conf_int (" n_tests" , 10 ); }
2069+ virtual int n_tests () {
2070+ return conf_int (" n_tests" , 10 );
2071+ }
20522072
2053- virtual int n_ex_tests () { return conf_int (" n_ex_tests" , 0 ); }
2073+ virtual int n_ex_tests () {
2074+ return conf_int (" n_ex_tests" , 0 );
2075+ }
20542076
2055- virtual int n_sample_tests () { return conf_int (" n_sample_tests" , 0 ); }
2077+ virtual int n_sample_tests () {
2078+ return conf_int (" n_sample_tests" , 0 );
2079+ }
20562080
2057- virtual int sample_test_point_score (int num) { return 100 / this ->n_sample_tests (); }
2081+ virtual int sample_test_point_score (int num) {
2082+ return 100 / this ->n_sample_tests ();
2083+ }
20582084
2059- virtual bool is_hack_enabled () { return true ; }
2085+ virtual bool is_hack_enabled () {
2086+ return true ;
2087+ }
20602088
2061- virtual bool is_custom_test_enabled () { return true ; }
2089+ virtual bool is_custom_test_enabled () {
2090+ return true ;
2091+ }
20622092
20632093 virtual void ordinary_test () {
20642094 int n = conf_int (" n_tests" , 10 );
@@ -2336,17 +2366,25 @@ class SubmitAnswerJudger : public Judger {
23362366 }
23372367
23382368public:
2339- virtual int n_ex_tests () override { return 0 ; }
2369+ virtual int n_ex_tests () override {
2370+ return 0 ;
2371+ }
23402372
2341- virtual int n_sample_tests () override { return this ->n_tests (); }
2373+ virtual int n_sample_tests () override {
2374+ return this ->n_tests ();
2375+ }
23422376
23432377 virtual int sample_test_point_score (int num) override {
23442378 return conf_int (" point_score" , num, 100 / this ->n_sample_tests ());
23452379 }
23462380
2347- virtual bool is_hack_enabled () override { return false ; }
2381+ virtual bool is_hack_enabled () override {
2382+ return false ;
2383+ }
23482384
2349- virtual bool is_custom_test_enabled () override { return false ; }
2385+ virtual bool is_custom_test_enabled () override {
2386+ return false ;
2387+ }
23502388};
23512389
23522390/* ====================== judger end ================== */
0 commit comments