Submission #757729

#TimeUsernameProblemLanguageResultExecution timeMemory
757729happypotatoFestivals in JOI Kingdom 2 (JOI23_festival2)C++17
10 / 100
1 ms324 KiB
#include <bits/stdc++.h> using namespace std; #define int long long #define pii pair<int, int> #define ff first #define ss second #define pb push_back // global int n, p; void init() { // init } int st6() { } int st5() { } int st4() { } int st3() { } int st2() { if (n == 6) return 4894; if (n == 7) return 73884; if (n == 8) return 1236922; } int st1() { if (n == 1) return 0; if (n == 2) return 0; if (n == 3) return 2; if (n == 4) return 28; if (n == 5) return 358; } void solve() { // solve cin >> n >> p; if (n <= 5) { cout << st1() << endl; } else if (n <= 8) { cout << st2() << endl; } else if (n <= 30) { cout << st3() << endl; } else if (n <= 300) { cout << st4() << endl; } else if (n <= 3000) { cout << st5() << endl; } else { cout << st6() << endl; } } int32_t main() { ios::sync_with_stdio(0); cin.tie(0); init(); solve(); }

Compilation message (stderr)

festival2.cpp: In function 'long long int st6()':
festival2.cpp:16:1: warning: no return statement in function returning non-void [-Wreturn-type]
   16 | }
      | ^
festival2.cpp: In function 'long long int st5()':
festival2.cpp:19:1: warning: no return statement in function returning non-void [-Wreturn-type]
   19 | }
      | ^
festival2.cpp: In function 'long long int st4()':
festival2.cpp:22:1: warning: no return statement in function returning non-void [-Wreturn-type]
   22 | }
      | ^
festival2.cpp: In function 'long long int st3()':
festival2.cpp:25:1: warning: no return statement in function returning non-void [-Wreturn-type]
   25 | }
      | ^
festival2.cpp: In function 'long long int st2()':
festival2.cpp:30:1: warning: control reaches end of non-void function [-Wreturn-type]
   30 | }
      | ^
festival2.cpp: In function 'long long int st1()':
festival2.cpp:37:1: warning: control reaches end of non-void function [-Wreturn-type]
   37 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...