Submission #1093818

#TimeUsernameProblemLanguageResultExecution timeMemory
1093818byunjaewooMagic Show (APIO24_show)C++17
35 / 100
3 ms1012 KiB
#include <bits/stdc++.h> using namespace std; #include "Alice.h" vector<pair<int,int>> Alice(){ long long x=setN(5000); vector<pair<int, int>> V; for(int i=2; i<=5000; i++) V.push_back({i, x%(i-1)+1}); return V; }
#include <bits/stdc++.h> using namespace std; #include "Bob.h" long long Bob(vector<pair<int,int>> V){ long long ret=0, lcm=1; for(auto [u, v]:V) { long long a=u-1, b=v-1; while(ret%b!=a) ret+=lcm; lcm=lcm*b/__gcd(lcm, b); if(lcm<=0) break; } return ret; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...