# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1011013 |
2024-06-29T16:59:03 Z |
ttamx |
Magic Show (APIO24_show) |
C++17 |
|
2 ms |
792 KB |
#include <bits/stdc++.h>
#include "Alice.h"
using namespace std;
vector<pair<int,int>> Alice(){
int n=200;
long long x=setN(n);
vector<pair<int,int>> res;
for(int i=1;i<n;i++)res.emplace_back(x%i+1,i+1);
return res;
}
#include <bits/stdc++.h>
#include "Bob.h"
using namespace std;
using ll = long long;
long long Bob(vector<pair<int,int>> e){
const ll LIM=1e18;
ll a=0,m=0;
for(auto [u,v]:e){
if(m>LIM)break;
u--,v--;
if(u>v)swap(u,v);
if(m==0){
a=u,m=v;
continue;
}
while(a%v!=u)a+=m;
v/=gcd(m,v);
if(m>LIM/v)break;
m*=v;
}
return a;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
784 KB |
Correct. |
2 |
Correct |
0 ms |
784 KB |
Correct. |
3 |
Correct |
0 ms |
780 KB |
Correct. |
4 |
Correct |
0 ms |
784 KB |
Correct. |
5 |
Correct |
0 ms |
776 KB |
Correct. |
6 |
Correct |
0 ms |
776 KB |
Correct. |
7 |
Correct |
1 ms |
784 KB |
Correct. |
8 |
Correct |
0 ms |
776 KB |
Correct. |
9 |
Correct |
0 ms |
776 KB |
Correct. |
10 |
Correct |
0 ms |
780 KB |
Correct. |
11 |
Correct |
1 ms |
776 KB |
Correct. |
12 |
Correct |
0 ms |
780 KB |
Correct. |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
784 KB |
Correct. |
2 |
Correct |
0 ms |
784 KB |
Correct. |
3 |
Correct |
0 ms |
780 KB |
Correct. |
4 |
Correct |
0 ms |
784 KB |
Correct. |
5 |
Correct |
0 ms |
776 KB |
Correct. |
6 |
Correct |
0 ms |
776 KB |
Correct. |
7 |
Correct |
1 ms |
784 KB |
Correct. |
8 |
Correct |
0 ms |
776 KB |
Correct. |
9 |
Correct |
0 ms |
776 KB |
Correct. |
10 |
Correct |
0 ms |
780 KB |
Correct. |
11 |
Correct |
1 ms |
776 KB |
Correct. |
12 |
Correct |
0 ms |
780 KB |
Correct. |
13 |
Correct |
1 ms |
776 KB |
Correct. |
14 |
Correct |
0 ms |
776 KB |
Correct. |
15 |
Correct |
0 ms |
776 KB |
Correct. |
16 |
Correct |
0 ms |
792 KB |
Correct. |
17 |
Correct |
0 ms |
784 KB |
Correct. |
18 |
Correct |
0 ms |
784 KB |
Correct. |
19 |
Correct |
0 ms |
776 KB |
Correct. |
20 |
Correct |
0 ms |
776 KB |
Correct. |
21 |
Correct |
1 ms |
776 KB |
Correct. |
22 |
Correct |
0 ms |
776 KB |
Correct. |
23 |
Correct |
0 ms |
776 KB |
Correct. |
24 |
Correct |
0 ms |
776 KB |
Correct. |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
784 KB |
Correct. |
2 |
Correct |
0 ms |
784 KB |
Correct. |
3 |
Correct |
0 ms |
780 KB |
Correct. |
4 |
Correct |
0 ms |
784 KB |
Correct. |
5 |
Correct |
0 ms |
776 KB |
Correct. |
6 |
Correct |
0 ms |
776 KB |
Correct. |
7 |
Correct |
1 ms |
784 KB |
Correct. |
8 |
Correct |
0 ms |
776 KB |
Correct. |
9 |
Correct |
0 ms |
776 KB |
Correct. |
10 |
Correct |
0 ms |
780 KB |
Correct. |
11 |
Correct |
1 ms |
776 KB |
Correct. |
12 |
Correct |
0 ms |
780 KB |
Correct. |
13 |
Correct |
1 ms |
776 KB |
Correct. |
14 |
Correct |
0 ms |
776 KB |
Correct. |
15 |
Correct |
0 ms |
776 KB |
Correct. |
16 |
Correct |
0 ms |
792 KB |
Correct. |
17 |
Correct |
0 ms |
784 KB |
Correct. |
18 |
Correct |
0 ms |
784 KB |
Correct. |
19 |
Correct |
0 ms |
776 KB |
Correct. |
20 |
Correct |
0 ms |
776 KB |
Correct. |
21 |
Correct |
1 ms |
776 KB |
Correct. |
22 |
Correct |
0 ms |
776 KB |
Correct. |
23 |
Correct |
0 ms |
776 KB |
Correct. |
24 |
Correct |
0 ms |
776 KB |
Correct. |
25 |
Correct |
0 ms |
776 KB |
Correct. |
26 |
Correct |
0 ms |
776 KB |
Correct. |
27 |
Correct |
1 ms |
784 KB |
Correct. |
28 |
Correct |
0 ms |
776 KB |
Correct. |
29 |
Correct |
0 ms |
784 KB |
Correct. |
30 |
Correct |
0 ms |
780 KB |
Correct. |
31 |
Correct |
0 ms |
776 KB |
Correct. |
32 |
Correct |
0 ms |
776 KB |
Correct. |
33 |
Correct |
0 ms |
776 KB |
Correct. |
34 |
Correct |
0 ms |
776 KB |
Correct. |
35 |
Correct |
1 ms |
776 KB |
Correct. |
36 |
Correct |
1 ms |
776 KB |
Correct. |
37 |
Correct |
2 ms |
692 KB |
Correct. |
38 |
Correct |
0 ms |
776 KB |
Correct. |
39 |
Correct |
0 ms |
784 KB |
Correct. |
40 |
Correct |
0 ms |
776 KB |
Correct. |
41 |
Correct |
0 ms |
780 KB |
Correct. |
42 |
Correct |
0 ms |
772 KB |
Correct. |
43 |
Correct |
0 ms |
776 KB |
Correct. |
44 |
Correct |
0 ms |
784 KB |
Correct. |