답안 #739255

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
739255 2023-05-10T09:06:58 Z onebit1024 Data Transfer (IOI19_transfer) C++17
5 / 100
817 ms 4884 KB
#include "transfer.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
std::vector<int> get_attachment(std::vector<int> source) {
	vector<int>ret = source;
	for(auto x : source)ret.push_back(x);
	return ret;
}

std::vector<int> retrieve(std::vector<int> data) {
	int n = data.size()/3;
	vector<vector<int>>dp;
	for(int i = 0;i<data.size();i+=n){
		vector<int>p;
		for(int j = i;j<i+n;++j)p.pb(data[j]);
		dp.pb(p);
	}
	if(dp[0]==dp[1])return dp[0];
	if(dp[0]==dp[2])return dp[0];
	if(dp[1]==dp[2])return dp[1];
}

Compilation message

transfer.cpp: In function 'std::vector<int> retrieve(std::vector<int>)':
transfer.cpp:14:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   14 |  for(int i = 0;i<data.size();i+=n){
      |                ~^~~~~~~~~~~~
transfer.cpp:13:21: warning: control reaches end of non-void function [-Wreturn-type]
   13 |  vector<vector<int>>dp;
      |                     ^~
# 결과 실행 시간 메모리 Grader output
1 Partially correct 19 ms 908 KB Partially correct
2 Partially correct 24 ms 908 KB Partially correct
3 Partially correct 22 ms 1004 KB Partially correct
4 Partially correct 24 ms 908 KB Partially correct
5 Partially correct 20 ms 916 KB Partially correct
6 Partially correct 21 ms 860 KB Partially correct
7 Partially correct 20 ms 872 KB Partially correct
8 Partially correct 22 ms 944 KB Partially correct
9 Partially correct 21 ms 904 KB Partially correct
10 Partially correct 23 ms 972 KB Partially correct
11 Partially correct 20 ms 880 KB Partially correct
12 Partially correct 19 ms 868 KB Partially correct
13 Partially correct 21 ms 1004 KB Partially correct
14 Partially correct 19 ms 1032 KB Partially correct
15 Partially correct 21 ms 908 KB Partially correct
16 Partially correct 21 ms 912 KB Partially correct
17 Partially correct 22 ms 948 KB Partially correct
# 결과 실행 시간 메모리 Grader output
1 Partially correct 770 ms 4804 KB Partially correct
2 Partially correct 773 ms 4796 KB Partially correct
3 Partially correct 744 ms 4808 KB Partially correct
4 Partially correct 715 ms 4804 KB Partially correct
5 Partially correct 721 ms 4792 KB Partially correct
6 Partially correct 727 ms 4780 KB Partially correct
7 Partially correct 736 ms 4792 KB Partially correct
8 Partially correct 765 ms 4792 KB Partially correct
9 Partially correct 766 ms 4884 KB Partially correct
10 Partially correct 741 ms 4800 KB Partially correct
11 Partially correct 743 ms 4796 KB Partially correct
12 Partially correct 764 ms 4804 KB Partially correct
13 Partially correct 781 ms 4792 KB Partially correct
14 Partially correct 743 ms 4756 KB Partially correct
15 Partially correct 817 ms 4800 KB Partially correct
16 Partially correct 756 ms 4800 KB Partially correct
17 Partially correct 758 ms 4792 KB Partially correct
18 Partially correct 742 ms 4780 KB Partially correct
19 Partially correct 753 ms 4800 KB Partially correct