CSES - Datatähti 2017 alku - Results
Submission details
Task:Bittijono
Sender:gokuha
Submission time:2016-10-11 18:33:23 +0300
Language:C++
Status:COMPILE ERROR

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:7:6: error: 'c' was not declared in this scope
 cin>>c;
      ^
input/code.cpp:9:1: error: 'd' was not declared in this scope
 d=0;
 ^
input/code.cpp:10:1: error: 'e' was not declared in this scope
 e=1<<60;
 ^
input/code.cpp:10:6: warning: left shift count >= width of type [enabled by default]
 e=1<<60;
      ^
input/code.cpp:11:7: error: expected '(' before 'x'
 while x {
       ^
input/code.cpp:11:7: error: 'x' was not declared in this scope
input/code.cpp:11:9: error: expected ')' before '{' token
 while x {
         ^
input/code.cpp:12:4: error: expected '(' before 'z'
 if z<x+1{
    ^
input/code.cpp:15:1: error: 'z' was not declared in this scope
 z>>=1;}
 ^
input/code.cpp:16:4: error: expected '(' before 'y'
 if y%2==1{
    ^
input/code.cpp:18:1: error: 'else' without a previous 'if'
 else{
 ^
input/code.cpp:19:5: error: no match for 'operator>>' (operand types are 'std::ostream {aka std::basic_ostream<char>}' and 'int')...

Code

#include <iostream>
using namespace std;
int main(){
int a;
cin>>a;
for (int b=0; b<a;b+=1){
cin>>c;
c-=1;
d=0;
e=1<<60;
while x {
if z<x+1{
x-=z;
y+=1;}
z>>=1;}
if y%2==1{
cout<<1;}
else{
cout>>0;}}}