Submission #717685

#TimeUsernameProblemLanguageResultExecution timeMemory
717685nikosMemory (IOI10_memory)C++17
0 / 100
1 ms208 KiB
#include "grader.h" #include "memory.h" #include <bits/stdc++.h> using namespace std; #define pb push_back #define ll long long void play() { char a, b; vector< pair<int, int> > v; for(int i = 0; i < 25; i++){ v.pb(make_pair(0, 0)); } for(int i = 1; i < 50; i += 2){ a = faceup(i); b = faceup(i + 1); if(v[a - 'A'].first != 0){ v[a - 'A'].first = i; } else{ v[a - 'A'].second = i; } if(v[b - 'A'].first != 0){ v[b - 'A'].first = i; } else{ v[b - 'A'].second = i; } } for(int i = 0; i < v.size(); i++){ faceup(v[i].first); faceup(v[i].second); } return; }

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:29:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   29 |     for(int i = 0; i < v.size(); i++){
      |                    ~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...