QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#746951#8726. Magic ShowKiharaToumaCompile Error//C++231.5kb2024-11-14 15:57:252024-11-14 15:57:26

Judging History

你现在查看的是最新测评结果

  • [2024-11-14 15:57:26]
  • 评测
  • [2024-11-14 15:57:25]
  • 提交

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);
      |                          ^