# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1041809 | 2024-08-02T08:28:24 Z | 김은성(#11000) | A Light Inconvenience (CEOI23_light) | C++17 | 298 ms | 720 KB |
#include "light.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; bool ch; ll cnt; ll a[151]; void prepare(){ ch = 0; cnt = 1; a[0] = 1; a[1] = 6; for(int i=2; i<=148; i++){ a[i] = a[i-1] + 5; } } std::pair<long long, std::vector<long long>> join(long long p){ cnt += p; vector<ll> ret; for(int i=0; a[i]<=cnt; i++) ret.push_back(cnt+1-a[i]); if(ret.empty() || ret.back() != 1) ret.push_back(1); for(int i=0; i<ret.size()/2; i++) swap(ret[i], ret[ret.size()-1-i]); return make_pair(5*p, ret); } std::pair<long long, std::vector<long long>> leave(long long p){ ch = 1; cnt -= p; vector<ll> ret; for(int i=0; a[i]<=cnt; i++) ret.push_back(cnt+1-a[i]); if(ret.empty() || ret.back() != 1) ret.push_back(1); for(int i=0; i<ret.size()/2; i++) swap(ret[i], ret[ret.size()-1-i]); return make_pair(5*p, ret); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Incorrect | 0 ms | 424 KB | Not correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 249 ms | 344 KB | Output is correct |
3 | Correct | 42 ms | 344 KB | Output is correct |
4 | Correct | 231 ms | 720 KB | Output is correct |
5 | Correct | 255 ms | 344 KB | Output is correct |
6 | Correct | 3 ms | 344 KB | Output is correct |
7 | Correct | 234 ms | 344 KB | Output is correct |
8 | Correct | 17 ms | 344 KB | Output is correct |
9 | Correct | 243 ms | 456 KB | Output is correct |
10 | Correct | 277 ms | 344 KB | Output is correct |
11 | Correct | 58 ms | 344 KB | Output is correct |
12 | Correct | 257 ms | 344 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 249 ms | 344 KB | Output is correct |
3 | Correct | 42 ms | 344 KB | Output is correct |
4 | Correct | 231 ms | 720 KB | Output is correct |
5 | Correct | 255 ms | 344 KB | Output is correct |
6 | Correct | 3 ms | 344 KB | Output is correct |
7 | Correct | 234 ms | 344 KB | Output is correct |
8 | Correct | 17 ms | 344 KB | Output is correct |
9 | Correct | 243 ms | 456 KB | Output is correct |
10 | Correct | 277 ms | 344 KB | Output is correct |
11 | Correct | 58 ms | 344 KB | Output is correct |
12 | Correct | 257 ms | 344 KB | Output is correct |
13 | Correct | 0 ms | 596 KB | Output is correct |
14 | Correct | 238 ms | 460 KB | Output is correct |
15 | Correct | 56 ms | 344 KB | Output is correct |
16 | Correct | 256 ms | 344 KB | Output is correct |
17 | Correct | 270 ms | 468 KB | Output is correct |
18 | Correct | 5 ms | 344 KB | Output is correct |
19 | Correct | 251 ms | 468 KB | Output is correct |
20 | Correct | 18 ms | 344 KB | Output is correct |
21 | Correct | 243 ms | 448 KB | Output is correct |
22 | Correct | 298 ms | 344 KB | Output is correct |
23 | Correct | 51 ms | 344 KB | Output is correct |
24 | Correct | 241 ms | 344 KB | Output is correct |
25 | Incorrect | 0 ms | 344 KB | Not correct |
26 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 249 ms | 344 KB | Output is correct |
3 | Correct | 42 ms | 344 KB | Output is correct |
4 | Correct | 231 ms | 720 KB | Output is correct |
5 | Correct | 255 ms | 344 KB | Output is correct |
6 | Correct | 3 ms | 344 KB | Output is correct |
7 | Correct | 234 ms | 344 KB | Output is correct |
8 | Correct | 17 ms | 344 KB | Output is correct |
9 | Correct | 243 ms | 456 KB | Output is correct |
10 | Correct | 277 ms | 344 KB | Output is correct |
11 | Correct | 58 ms | 344 KB | Output is correct |
12 | Correct | 257 ms | 344 KB | Output is correct |
13 | Correct | 0 ms | 596 KB | Output is correct |
14 | Correct | 238 ms | 460 KB | Output is correct |
15 | Correct | 56 ms | 344 KB | Output is correct |
16 | Correct | 256 ms | 344 KB | Output is correct |
17 | Correct | 270 ms | 468 KB | Output is correct |
18 | Correct | 5 ms | 344 KB | Output is correct |
19 | Correct | 251 ms | 468 KB | Output is correct |
20 | Correct | 18 ms | 344 KB | Output is correct |
21 | Correct | 243 ms | 448 KB | Output is correct |
22 | Correct | 298 ms | 344 KB | Output is correct |
23 | Correct | 51 ms | 344 KB | Output is correct |
24 | Correct | 241 ms | 344 KB | Output is correct |
25 | Incorrect | 0 ms | 344 KB | Not correct |
26 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 249 ms | 344 KB | Output is correct |
3 | Correct | 42 ms | 344 KB | Output is correct |
4 | Correct | 231 ms | 720 KB | Output is correct |
5 | Correct | 255 ms | 344 KB | Output is correct |
6 | Correct | 3 ms | 344 KB | Output is correct |
7 | Correct | 234 ms | 344 KB | Output is correct |
8 | Correct | 17 ms | 344 KB | Output is correct |
9 | Correct | 243 ms | 456 KB | Output is correct |
10 | Correct | 277 ms | 344 KB | Output is correct |
11 | Correct | 58 ms | 344 KB | Output is correct |
12 | Correct | 257 ms | 344 KB | Output is correct |
13 | Correct | 0 ms | 596 KB | Output is correct |
14 | Correct | 238 ms | 460 KB | Output is correct |
15 | Correct | 56 ms | 344 KB | Output is correct |
16 | Correct | 256 ms | 344 KB | Output is correct |
17 | Correct | 270 ms | 468 KB | Output is correct |
18 | Correct | 5 ms | 344 KB | Output is correct |
19 | Correct | 251 ms | 468 KB | Output is correct |
20 | Correct | 18 ms | 344 KB | Output is correct |
21 | Correct | 243 ms | 448 KB | Output is correct |
22 | Correct | 298 ms | 344 KB | Output is correct |
23 | Correct | 51 ms | 344 KB | Output is correct |
24 | Correct | 241 ms | 344 KB | Output is correct |
25 | Incorrect | 0 ms | 344 KB | Not correct |
26 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 249 ms | 344 KB | Output is correct |
3 | Correct | 42 ms | 344 KB | Output is correct |
4 | Correct | 231 ms | 720 KB | Output is correct |
5 | Correct | 255 ms | 344 KB | Output is correct |
6 | Correct | 3 ms | 344 KB | Output is correct |
7 | Correct | 234 ms | 344 KB | Output is correct |
8 | Correct | 17 ms | 344 KB | Output is correct |
9 | Correct | 243 ms | 456 KB | Output is correct |
10 | Correct | 277 ms | 344 KB | Output is correct |
11 | Correct | 58 ms | 344 KB | Output is correct |
12 | Correct | 257 ms | 344 KB | Output is correct |
13 | Correct | 0 ms | 596 KB | Output is correct |
14 | Correct | 238 ms | 460 KB | Output is correct |
15 | Correct | 56 ms | 344 KB | Output is correct |
16 | Correct | 256 ms | 344 KB | Output is correct |
17 | Correct | 270 ms | 468 KB | Output is correct |
18 | Correct | 5 ms | 344 KB | Output is correct |
19 | Correct | 251 ms | 468 KB | Output is correct |
20 | Correct | 18 ms | 344 KB | Output is correct |
21 | Correct | 243 ms | 448 KB | Output is correct |
22 | Correct | 298 ms | 344 KB | Output is correct |
23 | Correct | 51 ms | 344 KB | Output is correct |
24 | Correct | 241 ms | 344 KB | Output is correct |
25 | Incorrect | 0 ms | 344 KB | Not correct |
26 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Partially correct | 0 ms | 344 KB | Partially correct |
2 | Incorrect | 0 ms | 344 KB | Not correct |
3 | Halted | 0 ms | 0 KB | - |