Submission #836869

#TimeUsernameProblemLanguageResultExecution timeMemory
836869AndreyQuestion (Grader is different from the original contest) (CEOI14_question_grader)C++14
27 / 100
2378 ms24108 KiB
#include<bits/stdc++.h> using namespace std; int encode (int n, int x, int y) { for(int i = 0; i < 10; i++) { if((x&(1 << i)) != (y&(1 << i))) { int ans = i+1; if(x&(1 << i)) { ans+=10; } return ans; } } }
#include<bits/stdc++.h> using namespace std; int decode (int n, int q, int h) { h--; int a = (q&(1 << (h%10)))/(1 << (h%10)); int b = h/10; if((a^b) == 0) { return 1; } else { return 0; } }

Compilation message (stderr)

encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:14:1: warning: control reaches end of non-void function [-Wreturn-type]
   14 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...