Submission #50729

# Submission time Handle Problem Language Result Execution time Memory
50729 2018-06-13T05:50:09 Z Just_Solve_The_Problem Gondola (IOI14_gondola) C++11
20 / 100
16 ms 1032 KB
#include <bits/stdc++.h>
#include "gondola.h"

using namespace std;

#define pb push_back
#define pii pair < int, int >
#define fr first
#define sc second
#define mk make_pair

int valid(int n, int inputSeq[])
{
  int cnt = 1, start = -1;
  for (int i = 0; i < n; i++) {
    if (inputSeq[i] == cnt) {
      start = i;
      break;
    }
  }
  for (int i = start; i < n; i++) {
    if (inputSeq[i] != cnt) {
      return 0;
    }
    cnt++;
  }
  for (int i = 0; i < start; i++) {
    if (inputSeq[i] != cnt) {
      return 0;
    }
    cnt++;
  }
  return 1;
}

//----------------------

int replacement(int n, int gondolaSeq[], int replacementSeq[])
{
  return -2;
}

//----------------------

int countReplacement(int n, int inputSeq[])
{
  return -3;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 488 KB Output is correct
3 Correct 2 ms 540 KB Output is correct
4 Correct 2 ms 540 KB Output is correct
5 Correct 2 ms 616 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 652 KB Output is correct
2 Correct 2 ms 652 KB Output is correct
3 Correct 3 ms 652 KB Output is correct
4 Correct 3 ms 720 KB Output is correct
5 Correct 2 ms 720 KB Output is correct
6 Correct 11 ms 740 KB Output is correct
7 Correct 15 ms 868 KB Output is correct
8 Correct 13 ms 868 KB Output is correct
9 Correct 5 ms 868 KB Output is correct
10 Correct 13 ms 868 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 868 KB Output is correct
2 Correct 2 ms 868 KB Output is correct
3 Correct 2 ms 868 KB Output is correct
4 Correct 2 ms 868 KB Output is correct
5 Correct 2 ms 868 KB Output is correct
6 Correct 8 ms 868 KB Output is correct
7 Correct 13 ms 868 KB Output is correct
8 Correct 12 ms 868 KB Output is correct
9 Correct 8 ms 868 KB Output is correct
10 Correct 16 ms 1032 KB Output is correct
11 Correct 2 ms 1032 KB Output is correct
12 Correct 2 ms 1032 KB Output is correct
13 Correct 9 ms 1032 KB Output is correct
14 Correct 2 ms 1032 KB Output is correct
15 Correct 16 ms 1032 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 1032 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 1032 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 1032 KB Integer -2 violates the range [0, 350000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 1032 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 1032 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 1032 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 1032 KB Integer -3 violates the range [0, 1000000008]
2 Halted 0 ms 0 KB -