# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
834862 | gagik_2007 | Prisoner Challenge (IOI22_prison) | C++17 | 14 ms | 1364 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "prison.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define ff first
#define ss second
ll ttt;
const ll INF=1e18;
const ll MOD=1e9+7;
const ll N=5007;
ll n,m,k;
ll pw[N];
int ind=0;
void comp_result(vector<vector<int>>&ans, int cur){
// cur = (k+1)*step+rem
// rem=0 -> A
// rem!=0 -> B, A_(rem-1)
int mnac=cur%(k+1);
if(mnac==0){
ans[cur][0]=0;
}
else{
ans[cur][0]=1;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |