Submission #1213054

#TimeUsernameProblemLanguageResultExecution timeMemory
1213054noopMagic Show (APIO24_show)C++20
100 / 100
0 ms336 KiB
#include <bits/stdc++.h> #include "Alice.h" using namespace std; // you may define some global variables, but it does not work if you try to transfer any information from function Alice() to function Bob() through these variables. // you had better not use the same global variables in function Alice() and in function Bob(). vector<pair<int,int>> Alice(){ vector<pair<int,int>> v; long long x = setN(75); for (int i=1; i<75; i++){ v.push_back({x%i+1,i+1}); } return v; }
#include <bits/stdc++.h> #include "Bob.h" using namespace std; // you may define some global variables, but it does not work if you try to transfer any information from function Alice() to function Bob() through these variables. // you had better not use the same global variables in function Alice() and in function Bob(). long long Bob(std::vector<std::pair<int,int>> V){ int rem,divis; long long ans=1,d=1; for (int i=0; i<V.size(); i++){ rem=V[i].first-1; divis=V[i].second-1; while ((ans%divis)!=rem){ ans+=d; } d*=(divis/gcd(d,divis)); } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...