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

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:11:6: warning: left shift count >= width of type [enabled by default]
 e=1<<60;
      ^
input/code.cpp:12:7: error: expected '(' before 'x'
 while x {
       ^
input/code.cpp:12:7: error: 'x' was not declared in this scope
input/code.cpp:12:9: error: expected ')' before '{' token
 while x {
         ^
input/code.cpp:13:4: error: expected '(' before 'z'
 if z<x+1{
    ^
input/code.cpp:16:1: error: 'z' was not declared in this scope
 z>>=1;}
 ^
input/code.cpp:17:4: error: expected '(' before 'y'
 if y%2==1{
    ^
input/code.cpp:19:1: error: 'else' without a previous 'if'
 else{
 ^
input/code.cpp:20:5: error: no match for 'operator>>' (operand types are 'std::ostream {aka std::basic_ostream<char>}' and 'int')
 cout>>0;}}}
     ^
input/code.cpp:20:5: note: candidates are:
In file included from /usr/include/c++/4.8/string:53:0,
                 from /usr/include/c++/4.8/bits/locale_classes.h:40,
                 from /usr/include/c++/...

Code

#include <iostream>
using namespace std;
int main(){
int a;
cin>>a;
for (int b=0; b<a;b+=1){
int c,d,e;
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;}}}