#include "Joi.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
typedef long long ll;
typedef pair<int, int> pint;
typedef pair<ll, ll> pll;
#define vint vector<int>
#define vpint vector<pint>
#define vll vector<ll>
#define vpll vector<pll>
#define fast_cin() \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
#define MOD %= 1000000007
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
template <class T>
using Tree =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// are you certain that you have a clear idea of your code in your head?
// don't rush to the computer it'll only make it worse, it never works
// if this is the first time reading this you definitely need to go back and
// think about the implementation
void Joi(int N, int M, int A[], int B[], long long X, int T) {
int cnt = 1;
bool b[60];
for(int i = 0; i<60;i++){
if(X>>i){
b[i] = (X>>i)&1;
}
else{
b[i] = 0;
}
}
for(int i = 0; i<N; i++){
MessageBoard(i,b[i%60]);
}
cerr<<endl;
}
#include "Ioi.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
typedef long long ll;
typedef pair<int, int> pint;
typedef pair<ll, ll> pll;
#define vint vector<int>
#define vpint vector<pint>
#define vll vector<ll>
#define vpll vector<pll>
#define fast_cin() \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
#define MOD %= 1000000007
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
template <class T>
using Tree =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// are you certain that you have a clear idea of your code in your head?
// don't rush to the computer it'll only make it worse, it never works
// if this is the first time reading this you definitely need to go back and
// think about the implementation
long long Ioi(int N, int M, int A[], int B[], int P, int V, int T) {
if(T!=3) return 0;
bool b[60];
b[P%60] = V;
int cnt = 0;
while(P<N-1&&cnt<250){
P++;
b[P%60] = Move(P);
cnt++;
}
while(P&&cnt<250){
P--;
b[P%60] = Move(P);
cnt++;
}
ll X = 0;
for(int i = 0; i<60; i++){
X+=b[i]<<i;
}
return X;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |