QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#554857 | #8726. Magic Show | aCssen | Compile Error | / | / | C++14 | 628b | 2024-09-09 16:41:55 | 2024-09-09 16:41:55 |
Judging History
Alice
#include "iostream"
#include "vector"
#include "Alice.h"
using namespace std;
typedef long long ll;
ll setN(int n);
vector<pair<int,int> >Alice(){
int n=5000;ll x=setN(n);
vector<pair<int,int> >ans;
for(int i=1;i<n;i++)
ans.push_back(make_pair(x%i+1,i+1));
return ans;
}
Bob
#include "iostream"
#include "vector"
#include "Bob.h"
using namespace std;
typedef __int128 ll;
ll gcd(ll a,ll b){
return b==0?a:gcd(b,a%b);
}
ll Bob(vector<pair<int,int> >V){
ll x=0,M=1;
for(auto now:V){
int a=now.first-1,m=now.second-1;
while(x%m!=a) x+=M;
M=M/gcd(M,m)*m;
if(M>1e18) return x;
}
return x;
}
Details
Bob.code:9:4: error: ambiguating new declaration of ‘ll Bob(std::vector<std::pair<int, int> >)’ 9 | ll Bob(vector<pair<int,int> >V){ | ^~~ In file included from Bob.code:3: Bob.h:3:11: note: old declaration ‘long long int Bob(std::vector<std::pair<int, int> >)’ 3 | long long Bob(std::vector<std::pair<int,int>> V); | ^~~