Submission #213376

#TimeUsernameProblemLanguageResultExecution timeMemory
213376_Ice_Tea_Data Transfer (IOI19_transfer)C++14
5 / 100
524 ms5228 KiB
#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 (stderr)

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;
        ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...