Submission #953591

#TimeUsernameProblemLanguageResultExecution timeMemory
953591emad234Gondola (IOI14_gondola)C++17
10 / 100
8 ms1776 KiB
#include "gondola.h" #include <bits/stdc++.h> #define ll long long #define F first #define S second #define pii pair<ll, ll> const ll mod = 1e9 + 7; const ll mxN = 1e6 + 5; using namespace std; int valid(int n, int inputSeq[]) { vector<bool> vis(n + 3); int st = 0; int val = 1; for (int i = 0; i < n; i++) { if (vis[inputSeq[i]]) return 0; vis[inputSeq[i]] = 1; if (inputSeq[i] <= n) { st = i; val = inputSeq[i]; } } int og = st; while (1) { st++; val++; if (st >= n) st = 0; if (val > n) val = 1; if (st == og) break; if (inputSeq[st] != val && inputSeq[st] <= n) return 0; } return 1; } //---------------------- int replacement(int n, int gondolaSeq[], int replacementSeq[]) { return -2; } //---------------------- int countReplacement(int n, int inputSeq[]) { return -3; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...