Submission #667883

# Submission time Handle Problem Language Result Execution time Memory
667883 2022-12-02T09:01:41 Z 600Mihnea Treasure (different grader from official contest) (CEOI13_treasure2) C++17
44 / 100
1 ms 340 KB
#include "treasure.h"
#include <bits/stdc++.h>

using namespace std;

const int N = 100 + 7;
int s[N][N];
bool deja = 0;

int get(int r1, int c1, int r2, int c2)
{
  return s[r2][c2] - s[r1 - 1][c2] - s[r2][c1 - 1] + s[r1 - 1][c1 - 1];
}

void findTreasure(int n)
{
  assert(deja == 0);
  deja = 1;
  for (int i = 1; i <= n; i++)
  {
    for (int j = 1; j <= n; j++)
    {
      s[i][j] = countTreasure(1, 1, i, j);
    }
  }
  for (int i = 1; i <= n; i++)
  {
    for (int j = 1; j <= n; j++)
    {
      if (get(i, j, i, j))
      {
        Report(i, j);
      }
    }
  }
}
# Verdict Execution time Memory Grader output
1 Partially correct 1 ms 212 KB Output is partially correct - N = 5, K = 425, score = 8
2 Partially correct 0 ms 212 KB Output is partially correct - N = 10, K = 7075, score = 4
3 Partially correct 0 ms 212 KB Output is partially correct - N = 15, K = 36450, score = 4
4 Partially correct 0 ms 212 KB Output is partially correct - N = 16, K = 47296, score = 4
5 Partially correct 0 ms 340 KB Output is partially correct - N = 55, K = 6782050, score = 4
6 Partially correct 0 ms 340 KB Output is partially correct - N = 66, K = 14090571, score = 4
7 Partially correct 1 ms 340 KB Output is partially correct - N = 77, K = 26140961, score = 4
8 Partially correct 0 ms 340 KB Output is partially correct - N = 88, K = 44642224, score = 4
9 Partially correct 1 ms 340 KB Output is partially correct - N = 99, K = 71566902, score = 4
10 Partially correct 1 ms 340 KB Output is partially correct - N = 100, K = 74507500, score = 4