#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |