Submission #1063656

# Submission time Handle Problem Language Result Execution time Memory
1063656 2024-08-17T22:20:39 Z Edu175 Gondola (IOI14_gondola) C++17
10 / 100
7 ms 1884 KB
#include "gondola.h"
#include <bits/stdc++.h>
#define pb push_back
#define fst first
#define snd second
#define fore(i,a,b) for(ll i=a,ioi=b;i<ioi;i++)
#define SZ(x) ((int)x.size())
#define ALL(x) x.begin(),x.end()
#define mset(a,v) memset((a),(v),sizeof(a))
#define imp(v) {for(auto fdgkj:v)cout<<fdgkj<<" ";cout<<"\n";}
using namespace std;
typedef long long ll;
typedef pair<ll,ll> ii;

void rotate(vector<ll>&a, ll x){
	rotate(a.begin(),a.begin()+x,a.end());
}

int valid(int n, int A[]){
	vector<ll>a(n);
	fore(i,0,n)a[i]=A[i]-1;
	ll done=0;
	// imp(a);
	fore(i,0,n)if(!done&&a[i]<n){
		// cout<<i<<": "<<a[i]<<"\n";
		rotate(a,(n-a[i])%n),done=1;
	}
	if(!done)return 1;
	// imp(a);
	ll flag=1;
	fore(i,0,n){
		ll fi=a[i]>=n||a[i]==i;
		flag&=fi;
		// if(!fi)cout<<i<<" "<<a[i]<<"\n";
	}
	return flag;
}
int replacement(int n, int A[], int res[]){
	return 0;
	/*vector<ll>a(n);
	fore(i,0,n)a[i]=A[i]-1;
	ll done=0;
	fore(i,0,n)if(!done&&a[i]<n){
		rotate(a,(n-a[i])%n),done=1;
	}
	if(!done)return 1;
	ll flag=1;
	fore(i,0,n){
		ll fi=a[i]>=n||a[i]==i;
		flag&=fi;
		// if(!fi)cout<<i<<" "<<a[i]<<"\n";
	}
	return flag;*/
}
int countReplacement(int n, int inputSeq[]){
	return 0;
}

# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 3 ms 1012 KB Output is correct
7 Correct 6 ms 1884 KB Output is correct
8 Correct 5 ms 1628 KB Output is correct
9 Correct 2 ms 604 KB Output is correct
10 Correct 7 ms 1884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 600 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 4 ms 856 KB Output is correct
7 Correct 6 ms 1884 KB Output is correct
8 Correct 5 ms 1628 KB Output is correct
9 Correct 3 ms 604 KB Output is correct
10 Correct 7 ms 1884 KB Output is correct
11 Incorrect 0 ms 348 KB Output isn't correct
12 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -