Submission #1081567

# Submission time Handle Problem Language Result Execution time Memory
1081567 2024-08-30T07:33:30 Z djs100201 Magic Show (APIO24_show) C++17
0 / 100
20 ms 996 KB
#include<bits/stdc++.h>
#include "Alice.h"
#include "Bob.h"
#define all(v) v.begin(),v.end()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using PP = pair<ll, P>;
const ll n_ =1e5+10, inf = (ll)2e9 * (ll)1e9 + 7, mod = 998244353;
ll n, m, tc = 1, a, b, c, d, sum, x, y, z, base, ans, k;
ll idx[n_],bit[n_],rev[n_];
vector<pair<int,int>> Alice(){
	// add your code here
	
	// change below into your code
    long long x = setN(5000);
    vector<pair<int,int>>res;
    for(int i=1;i<=5000;i++)idx[i]=i;
    for(int i=2;i<5000;i++){
        bit[i]=(++base)%60;
        //0 ~ 59
    }
    for(int i=1;i<=1000000;i++){
        a=rand()%5000+1,b=rand()%5000+1;
        swap(idx[a],idx[b]);
    }
    for(int i=1;i<=5000;i++)rev[idx[i]]=i;
    for(int i=2;i<5000;i++){
        if((1ll<<bit[i]) & x){
            res.push_back({idx[i],idx[5000]});
        }
        else{
            res.push_back({idx[1],idx[i]});
        }
    }
    res.push_back({idx[1],idx[5000]});
    return res;
}
#include<bits/stdc++.h>
#include "Alice.h"
#include "Bob.h"
#define all(v) v.begin(),v.end()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using PP = pair<ll, P>;
const ll n_ =1e5+10, inf = (ll)2e9 * (ll)1e9 + 7, mod = 998244353;
ll n, m, tc = 1, a, b, c, d, sum, x, y, z, base, ans, k;
ll idx[n_],bit[n_],rev[n_];

long long Bob(vector<pair<int,int>> V){
	// add your code here
    ll res=0;
	for(auto [a,b]:V){
        if(a==idx[1] && b==idx[5000])continue;
        if(b==idx[5000]){
            res|=(1ll<<bit[rev[a]]);
        }
    }
    return res; // change this into your code
}
# Verdict Execution time Memory Grader output
1 Incorrect 20 ms 996 KB Incorrect answer.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 20 ms 996 KB Incorrect answer.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 20 ms 996 KB Incorrect answer.
2 Halted 0 ms 0 KB -