Submission #414801

# Submission time Handle Problem Language Result Execution time Memory
414801 2021-05-31T08:07:43 Z 장태환(#7553) Navigation 2 (JOI21_navigation2) C++17
0 / 100
23 ms 572 KB
#include "Anna.h"
#include <vector>
#include <stdlib.h>
namespace {

int FunctionExample(int r, int c, int K) {
  return (r + c) % K + 1;
}

} // namespace

void Anna(int N, int K, std::vector<int> R, std::vector<int> C) 
{
  for (int r = 0; r < N; r++) 
  {
    for (int c = 0; c < N; c++) 
	{
		int f = 0;
		int k;
		int ce= 1;
		for (k = 0; k < K; k++)
		{
			f += ce * ((abs(R[k] - r) + abs(C[k] - c)) % 3);
			ce *= 3;
		}
		SetFlag(r, c, f);
    }
  }
}
#include "Bruno.h"
#include <vector>

namespace {

int variable_example = 1;
int pos[4] = { 5,3,7,1 };
} // namespace

std::vector<int> Bruno(int K, std::vector<int> value) 
{
	std::vector<int>res(K);
	int i;
	for (i = 0; i < K; i++)
	{
		res[i] = 4;
		int j;
		for (j = 0; j < 4; j++)
		{
			if (value[pos[j]]%3 == (value[4] + 2) % 3)
				res[i] = j;
		}
		for (j = 0; j < 9; j++)
		{
			value[j] /= 3;
		}
	}
	return res;
}

Compilation message

Anna.cpp:6:5: warning: 'int {anonymous}::FunctionExample(int, int, int)' defined but not used [-Wunused-function]
    6 | int FunctionExample(int r, int c, int K) {
      |     ^~~~~~~~~~~~~~~

Bruno.cpp:6:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
    6 | int variable_example = 1;
      |     ^~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Partially correct 15 ms 384 KB Partially correct
2 Partially correct 13 ms 384 KB Partially correct
3 Partially correct 16 ms 384 KB Partially correct
4 Partially correct 14 ms 388 KB Partially correct
5 Partially correct 18 ms 384 KB Partially correct
6 Partially correct 14 ms 452 KB Partially correct
7 Partially correct 15 ms 384 KB Partially correct
8 Partially correct 19 ms 384 KB Partially correct
9 Partially correct 18 ms 384 KB Partially correct
10 Partially correct 16 ms 384 KB Partially correct
11 Partially correct 18 ms 384 KB Partially correct
12 Partially correct 17 ms 384 KB Partially correct
13 Partially correct 13 ms 460 KB Partially correct
14 Partially correct 14 ms 384 KB Partially correct
15 Partially correct 17 ms 388 KB Partially correct
16 Partially correct 13 ms 384 KB Partially correct
17 Partially correct 12 ms 572 KB Partially correct
18 Partially correct 16 ms 384 KB Partially correct
19 Partially correct 13 ms 384 KB Partially correct
20 Partially correct 17 ms 384 KB Partially correct
21 Partially correct 14 ms 388 KB Partially correct
22 Partially correct 18 ms 384 KB Partially correct
23 Partially correct 19 ms 456 KB Partially correct
24 Partially correct 19 ms 384 KB Partially correct
25 Partially correct 15 ms 384 KB Partially correct
26 Partially correct 15 ms 388 KB Partially correct
27 Partially correct 16 ms 452 KB Partially correct
28 Partially correct 17 ms 504 KB Partially correct
29 Partially correct 17 ms 384 KB Partially correct
30 Partially correct 22 ms 384 KB Partially correct
31 Partially correct 16 ms 388 KB Partially correct
32 Partially correct 16 ms 392 KB Partially correct
33 Partially correct 14 ms 396 KB Partially correct
34 Partially correct 16 ms 396 KB Partially correct
35 Partially correct 18 ms 468 KB Partially correct
36 Partially correct 12 ms 512 KB Partially correct
37 Partially correct 19 ms 384 KB Partially correct
38 Partially correct 23 ms 384 KB Partially correct
39 Incorrect 4 ms 200 KB Wrong Answer [2]
40 Halted 0 ms 0 KB -