QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#746951 | #8726. Magic Show | KiharaTouma | Compile Error | / | / | C++23 | 1.5kb | 2024-11-14 15:57:25 | 2024-11-14 15:57:26 |
Judging History
Alice
//qoj8726
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define ALICE
//#define BOB
#ifdef ALICE
#include "Alice.h"
std::vector<std::pair<int, int> > Alice(){
vector<pair<int, int> > res;
res.clear();
ll val = setN(5000);
for(int i = 2; i <= 5000; ++ i){
res.emplace_back(x * (i-1) + 1, i);
}
return res;
}
#endif
#ifdef BOB
#include "Bob.h"
long long Bob(std::vector<std::pair<int, int>> V){
ll res = 0, nw = 1;
for(auto i : V){
int x = i.first - 1, y = i.second - 1;
while(res % y != x){
res += nw;
}
nw = nw / __gcd(nw, y) * y;
if(nw > 1e18){
break;
}
}
return res;
}
#endif
Bob
//qoj8726
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//#define ALICE
#define BOB
#ifdef ALICE
#include "Alice.h"
std::vector<std::pair<int, int> > Alice(){
vector<pair<int, int> > res;
res.clear();
ll val = setN(5000);
for(int i = 2; i <= 5000; ++ i){
res.emplace_back(x * (i-1) + 1, i);
}
return res;
}
#endif
#ifdef BOB
#include "Bob.h"
long long Bob(std::vector<std::pair<int, int>> V){
ll res = 0, nw = 1;
for(auto i : V){
int x = i.first - 1, y = i.second - 1;
while(res % y != x){
res += nw;
}
nw = nw / __gcd(nw, y) * y;
if(nw > 1e18){
break;
}
}
return res;
}
#endif
详细
Alice.code: In function ‘std::vector<std::pair<int, int> > Alice()’: Alice.code:18:26: error: ‘x’ was not declared in this scope 18 | res.emplace_back(x * (i-1) + 1, i); | ^