(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

Submission #426342

#TimeUsernameProblemLanguageResultExecution timeMemory
426342Kushagra_JMemory (IOI10_memory)C++14
100 / 100
3 ms328 KiB
#include "grader.h" #include "memory.h" #include <bits/stdc++.h> using namespace std; void play() { char a, b; int candies = 0; vector<int> v[25]; for(int i=0;i<50;i++){ a=int(faceup(i+1))-65; v[a].push_back(i+1); } for(int i=0;i<25;i++){ a=faceup(v[i][0]); b=faceup(v[i][1]); } }

Compilation message (stderr)

memory.cpp: In function 'void play()':
memory.cpp:12:11: warning: array subscript has type 'char' [-Wchar-subscripts]
   12 |         v[a].push_back(i+1);
      |           ^
memory.cpp:7:13: warning: variable 'b' set but not used [-Wunused-but-set-variable]
    7 |     char a, b;
      |             ^
memory.cpp:8:9: warning: unused variable 'candies' [-Wunused-variable]
    8 |     int candies = 0;
      |         ^~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...