답안 #213376

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
213376 2020-03-25T16:22:19 Z _Ice_Tea_ Data Transfer (IOI19_transfer) C++14
5 / 100
524 ms 5228 KB
#include<bits/stdc++.h>
#include "transfer.h"

using namespace std;

std::vector<int> get_attachment(std::vector<int> source) {

	int i,j;

	int N = source.size();
	vector<int> attach;
	for( i=0; i<N; i++)
		attach.push_back( source[i]);
	for( i=0; i<N; i++)
		attach.push_back( source[i]);
	return attach;
}

std::vector<int> retrieve(std::vector<int> data) {

	int i,j;
	int N = data.size() / 3;

	vector<int> ans;
	for( i=0; i<N; i++)
	{
		int a = data[i];
		int b = data[i+N];
		int c = data[i+2*N];
		if( a == b )
			ans.push_back(a);
		else if( a == c)
			ans.push_back(c);
		else
			ans.push_back(b);
	}
	return ans;
}

Compilation message

transfer.cpp: In function 'std::vector<int> get_attachment(std::vector<int>)':
transfer.cpp:8:8: warning: unused variable 'j' [-Wunused-variable]
  int i,j;
        ^
transfer.cpp: In function 'std::vector<int> retrieve(std::vector<int>)':
transfer.cpp:21:8: warning: unused variable 'j' [-Wunused-variable]
  int i,j;
        ^
# 결과 실행 시간 메모리 Grader output
1 Partially correct 21 ms 1244 KB Partially correct
2 Partially correct 22 ms 1244 KB Partially correct
3 Partially correct 24 ms 1248 KB Partially correct
4 Partially correct 21 ms 1380 KB Partially correct
5 Partially correct 23 ms 1248 KB Partially correct
6 Partially correct 21 ms 1392 KB Partially correct
7 Partially correct 23 ms 1472 KB Partially correct
8 Partially correct 22 ms 1384 KB Partially correct
9 Partially correct 22 ms 1388 KB Partially correct
10 Partially correct 22 ms 1372 KB Partially correct
11 Partially correct 21 ms 1248 KB Partially correct
12 Partially correct 22 ms 1248 KB Partially correct
13 Partially correct 22 ms 1248 KB Partially correct
14 Partially correct 22 ms 1240 KB Partially correct
15 Partially correct 21 ms 1508 KB Partially correct
16 Partially correct 21 ms 1248 KB Partially correct
17 Partially correct 27 ms 1236 KB Partially correct
# 결과 실행 시간 메모리 Grader output
1 Partially correct 500 ms 4984 KB Partially correct
2 Partially correct 484 ms 4976 KB Partially correct
3 Partially correct 514 ms 4984 KB Partially correct
4 Partially correct 490 ms 4984 KB Partially correct
5 Partially correct 491 ms 4980 KB Partially correct
6 Partially correct 514 ms 4980 KB Partially correct
7 Partially correct 502 ms 4980 KB Partially correct
8 Partially correct 496 ms 4984 KB Partially correct
9 Partially correct 500 ms 4968 KB Partially correct
10 Partially correct 500 ms 4984 KB Partially correct
11 Partially correct 506 ms 5096 KB Partially correct
12 Partially correct 524 ms 4976 KB Partially correct
13 Partially correct 498 ms 4980 KB Partially correct
14 Partially correct 499 ms 4980 KB Partially correct
15 Partially correct 500 ms 5228 KB Partially correct
16 Partially correct 512 ms 4976 KB Partially correct
17 Partially correct 508 ms 4984 KB Partially correct
18 Partially correct 516 ms 4992 KB Partially correct
19 Partially correct 500 ms 4984 KB Partially correct