Submission #757729

# Submission time Handle Problem Language Result Execution time Memory
757729 2023-06-13T16:38:29 Z happypotato Festivals in JOI Kingdom 2 (JOI23_festival2) C++17
10 / 100
1 ms 324 KB
#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

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 time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 316 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 316 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 320 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 320 KB Output is correct
13 Correct 1 ms 324 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 316 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 320 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 320 KB Output is correct
13 Correct 1 ms 324 KB Output is correct
14 Incorrect 1 ms 316 KB Output isn't correct
15 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 316 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 320 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 320 KB Output is correct
13 Correct 1 ms 324 KB Output is correct
14 Incorrect 1 ms 316 KB Output isn't correct
15 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 316 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 320 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 320 KB Output is correct
13 Correct 1 ms 324 KB Output is correct
14 Incorrect 1 ms 316 KB Output isn't correct
15 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 316 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 320 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 320 KB Output is correct
13 Correct 1 ms 324 KB Output is correct
14 Incorrect 1 ms 316 KB Output isn't correct
15 Halted 0 ms 0 KB -