submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s709701277 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int l = 1000000000
vector <int> a(l);
vector <int> b(l);
vector <int> c(l);
cin >> a.at(0) >> b.at(0) >> c.at(0);
int ans =0 ;
for ( int i=0 ; ; i++){
if ( a.at(i)%2==1 || b.at(i)%2==1 || c.at(i)%2==1){
cout << ans << endl ;
return 0 ;
}
if ( a.at(i)%4==0 && b.at(i)%4==0 && c.at(i)%4==0){
cout << -1 << endl;
return 0 ;
}
a.at(i+1) = (b.at(i)+c.at(i))/2 ;
b.at(i+1) = (c.at(i)+c.at(i))/2 ;
c.at(i+1) = (b.at(i)+a.at(i))/2 ;
ans ++ ;
}
} | a.cc: In function 'int main()':
a.cc:6:3: error: expected ',' or ';' before 'vector'
6 | vector <int> a(l);
| ^~~~~~
a.cc:9:10: error: 'a' was not declared in this scope
9 | cin >> a.at(0) >> b.at(0) >> c.at(0);
| ^
|
s837204457 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int l = 1000000000
vector <int> a(l), b(l) ,c(l);
cin >> a.at(0) >> b.at(0) >> c.at(0);
int ans =0 ;
for ( int i=0 ; ; i++){
if ( a.at(i)%2==1 || b.at(i)%2==1 || c.at(i)%2==1){
cout << ans << endl ;
return 0 ;
}
if ( a.at(i)%4==0 && b.at(i)%4==0 && c.at(i)%4==0){
cout << -1 << endl;
return 0 ;
}
a.at(i+1) = (b.at(i)+c.at(i))/2 ;
b.at(i+1) = (c.at(i)+c.at(i))/2 ;
c.at(i+1) = (b.at(i)+a.at(i))/2 ;
ans ++ ;
}
} | a.cc: In function 'int main()':
a.cc:6:3: error: expected ',' or ';' before 'vector'
6 | vector <int> a(l), b(l) ,c(l);
| ^~~~~~
a.cc:7:10: error: 'a' was not declared in this scope
7 | cin >> a.at(0) >> b.at(0) >> c.at(0);
| ^
a.cc:7:21: error: 'b' was not declared in this scope
7 | cin >> a.at(0) >> b.at(0) >> c.at(0);
| ^
a.cc:7:32: error: 'c' was not declared in this scope
7 | cin >> a.at(0) >> b.at(0) >> c.at(0);
| ^
|
s813447917 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int l = 9000000000
vector <int> a(l), b(l) ,c(l);
cin >> a.at(0) >> b.at(0) >> c.at(0);
int ans =0 ;
for ( int i=0 ; ; i++){
if ( a.at(i)%2==1 || b.at(i)%2==1 || c.at(i)%2==1){
cout << ans << endl ;
return 0 ;
}
if ( a.at(i)%4==0 && b.at(i)%4==0 && c.at(i)%4==0){
cout << -1 << endl;
return 0 ;
}
a.at(i+1) = (b.at(i)+c.at(i))/2 ;
b.at(i+1) = (c.at(i)+c.at(i))/2 ;
c.at(i+1) = (b.at(i)+a.at(i))/2 ;
ans ++ ;
}
} | a.cc: In function 'int main()':
a.cc:5:11: warning: overflow in conversion from 'long int' to 'int' changes value from '9000000000' to '410065408' [-Woverflow]
5 | int l = 9000000000
| ^~~~~~~~~~
a.cc:6:3: error: expected ',' or ';' before 'vector'
6 | vector <int> a(l), b(l) ,c(l);
| ^~~~~~
a.cc:7:10: error: 'a' was not declared in this scope
7 | cin >> a.at(0) >> b.at(0) >> c.at(0);
| ^
a.cc:7:21: error: 'b' was not declared in this scope
7 | cin >> a.at(0) >> b.at(0) >> c.at(0);
| ^
a.cc:7:32: error: 'c' was not declared in this scope
7 | cin >> a.at(0) >> b.at(0) >> c.at(0);
| ^
|
s092813742 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector <int> a , b ,c;
cin >> a.at(0) >> b.at(0) >> c.at(0);
int ans =0 ;
for ( int i=0 ; ; i++){
if ( a.at(i)%2=1 || b.at(i)%2=1 || c.at(i)%2=1){
cout << ans << endl ;
return 0 ;
}
if ( a.at(i)%4=0 && b.at(i)%4=0 && c.at(i)%4=0){
cout << -1 << endl;
return 0 ;
}
a.at(i+1) = (b.at(i)+c.at(i))/2 ;
b.at(i+1) = (c.at(i)+c.at(i))/2 ;
c.at(i+1) = (b.at(i)+a.at(i))/2 ;
ans ++ ;
}
} | a.cc: In function 'int main()':
a.cc:9:37: error: lvalue required as left operand of assignment
9 | if ( a.at(i)%2=1 || b.at(i)%2=1 || c.at(i)%2=1){
| ~~^~~~~~~~~~~~
a.cc:13:37: error: lvalue required as left operand of assignment
13 | if ( a.at(i)%4=0 && b.at(i)%4=0 && c.at(i)%4=0){
| ~~^~~~~~~~~~~~
|
s127973704 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vecotr <int> a , b ,c;
cin >> a.at(0) >> b.at(0) >> c.at(0);
int ans =0 ;
for ( int i=0 ; ; i++){
if ( a.at(i)%2=1 || b.at(i)%2=1 || c.at(i)%2=1){
cout << ans << endl ;
return 0 ;
}
if ( a.at(i)%4=0 && b.at(i)%4=0 && c.at(i)%4=0){
cout << -1 << endl;
return 0 ;
}
a.at(i+1) = (b.at(i)+c.at(i))/2 ;
b.at(i+1) = (c.at(i)+c.at(i))/2 ;
c.at(i+1) = (b.at(i)+a.at(i))/2 ;
ans ++ ;
}
} | a.cc: In function 'int main()':
a.cc:5:3: error: 'vecotr' was not declared in this scope
5 | vecotr <int> a , b ,c;
| ^~~~~~
a.cc:5:11: error: expected primary-expression before 'int'
5 | vecotr <int> a , b ,c;
| ^~~
a.cc:6:10: error: 'a' was not declared in this scope
6 | cin >> a.at(0) >> b.at(0) >> c.at(0);
| ^
a.cc:6:21: error: 'b' was not declared in this scope
6 | cin >> a.at(0) >> b.at(0) >> c.at(0);
| ^
a.cc:6:32: error: 'c' was not declared in this scope
6 | cin >> a.at(0) >> b.at(0) >> c.at(0);
| ^
|
s257194028 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >>a >>b >>c;
if (a==b && b==c) {
cout << -1 << endl;
}
else {
int count = 0;
while (1) {
count ++;
int a2 = a, b2 = b, c2 = c;
a = (b2 + c2) / 2;
b = (a2 + c2) / 2;
c = (a2 + b2) / 2;
if (a%2==1 || b%2==1 || c%2==1)
break;
}
cout << count << endl;
} | a.cc: In function 'int main()':
a.cc:25:2: error: expected '}' at end of input
25 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s849627316 | p03723 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int long long A; int long long B; int long long C;
cin>>A>>B>>C;
if(A%2!=0||B%2!=0||C%2!=0)
cout<<0<<endl;
else if (A==B&&A==C)
cout<<-1<<endl;
else {
int L=A/2; int M=B/2; int N=C/2;
int Ans=0;
while(A%2==&&B%2==0&&C%2==0){
Ans++;
A=M+N;
B=N+L;
C=M+L;
L=A/2;
M=B/2;
N=C/2;
}
cout<<Ans<<endl;
}
} | a.cc: In function 'int main()':
a.cc:13:19: error: invalid operands of types 'void*' and 'int' to binary 'operator%'
13 | while(A%2==&&B%2==0&&C%2==0){
| ~~~^~
| | |
| | int
| void*
a.cc:13:18: error: label 'B' used but not defined
13 | while(A%2==&&B%2==0&&C%2==0){
| ^
|
s331291070 | p03723 | Java | import java.util.Scanner;ass Main{
public static void main(String args[]){
boolean flag=false;
Scanner scan=new Scanner(System.in);
String s;
s=scan.next();
int a=Integer.parseInt(s);
s=scan.next();
int b=Integer.parseInt(s);
s=scan.next();
int c=Integer.parseInt(s);
int t1,t2,t3,ans=0;
while(a*b*c!=0){
t1=a%2;
t2=b%2;
t3=c%2;
if(!(t1==t2&&t2==t3))break;
a/=2;b/=2;c/=2;
ans++;
}
if(a+b+c==0)System.out.println(-1);
else System.out.println(ans);
}
///////////////////////////////////////////////
public static boolean prime(long a){
if(a<=1)return false;
for(int i=2;i*i<=a;i++){
if(a%i==0)return false;
}
return true;
}
public static long llpow(long x,long n){
long ans=1;
for(int i=0;i<n;i++)ans*=x;
return ans;
}
public static long max(long a,long b){
if(a<b)return b;
else return a;
}
public static long min(long a,long b){
if(a>b)return b;
else return a;
}
public static long cei(long x,long y){
long ans=x/y;
if(x%y!=0)ans++;
return ans;
}
public static long gcd(long x,long y){
return (y==1)?gcd(y,x%y):x;
}
public static long lcm(long x,long y){
return x/gcd(x,y)*y;
}
public static long fact(long x){
long ans=1;
for(int i=0;i<x;i++)ans*=(x-i);
return ans;
}
public static long ncr(long n,long r){
long ans=1,l=2;
for(int i=0;i<min(n-r,r);i++){
ans*=(n-i);
while(ans%l==0&&l<=min(r,n-r)){
ans/=l;l++;
}
}
return ans;
}
public static long npr(long n,long r){
long ans=1;
for(int i=0;i<r;i++)ans*=(n-i);
return ans;
}
public static long fib(int x){
long fibo[]=new long[x+10];
fibo[0]=1;fibo[1]=1;
for(int i=2;i<x+1;i++)fibo[i]=fibo[i-1]+fibo[i-2];
return fibo[x];
}
public static long dig(long n){
long d=1,tmp=n;
while(tmp/10>0){
tmp/=10;d++;
}
return d;}
} | Main.java:1: error: class, interface, enum, or record expected
import java.util.Scanner;ass Main{
^
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String args[]){
^
(use --enable-preview to enable unnamed classes)
Main.java:91: error: class, interface, enum, or record expected
}
^
3 errors
|
s060485339 | p03723 | C++ | %0A%23ifndef%20TEMPLATE_HPP%0A%23define%20TEMPLATE_HPP%0A%0A%23include%20%3Calgorithm%3E%0A%23include%20%3Cbitset%3E%0A%23include%20%3Ccmath%3E%0A%23include%20%3Cdeque%3E%0A%23include%20%3Cfunctional%3E%0A%23include%20%3Ciomanip%3E%0A%23include%20%3Ciostream%3E%0A%23include%20%3Citerator%3E%0A%23include%20%3Clist%3E%0A%23include%20%3Cmap%3E%0A%23include%20%3Cmemory%3E%0A%23include%20%3Cnumeric%3E%0A%23include%20%3Cset%3E%0A%23include%20%3Cstring%3E%0A%23include%20%3Ctuple%3E%0A%23include%20%3Ctype_traits%3E%0A%23include%20%3Cunordered_map%3E%0A%23include%20%3Cunordered_set%3E%0A%23include%20%3Cutility%3E%0A%23include%20%3Cvector%3E%0A%0A%23define%20_GLIBCXX_DEBUG%0A%0A%2F%2F%20Utility%0Ausing%20std%3A%3Adeclval%3B%0Ausing%20std%3A%3Adistance%3B%0Ausing%20std%3A%3Aenable_if_t%3B%0Ausing%20std%3A%3Aget%3B%0Ausing%20std%3A%3Aindex_sequence%3B%0Ausing%20std%3A%3Ais_array%3B%0Ausing%20std%3A%3Ais_pointer%3B%0Ausing%20std%3A%3Ais_same%3B%0Ausing%20std%3A%3Aiterator_traits%3B%0Ausing%20std%3A%3Amake_index_sequence%3B%0Ausing%20std%3A%3Amake_pair%3B%0Ausing%20std%3A%3Amake_tuple%3B%0Ausing%20std%3A%3Amake_unique%3B%0Ausing%20std%3A%3Arandom_access_iterator_tag%3B%0Ausing%20std%3A%3Astold%3B%0Ausing%20std%3A%3Astoll%3B%0Ausing%20std%3A%3Aoperator%22%22s%3B%0Ausing%20std%3A%3Aabs%3B%0A%0A%2F%2F%20Types%0Ausing%20std%3A%3Abitset%3B%0Ausing%20std%3A%3Adeque%3B%0Ausing%20std%3A%3Alist%3B%0Ausing%20std%3A%3Amultiset%3B%0Ausing%20std%3A%3Anullptr_t%3B%0Ausing%20std%3A%3Apair%3B%0Ausing%20std%3A%3Atuple%3B%0Ausing%20std%3A%3Aunordered_multimap%3B%0Ausing%20std%3A%3Aunordered_multiset%3B%0Ausing%20ll%20%3D%20%2F%2A%2A%20__int128%3B%20%2F%2F%2A%2F%20long%20long%20int%3B%0Ausing%20lf%20%3D%20long%20double%3B%0Ausing%20str%20%3D%20std%3A%3Astring%3B%0Atemplate%20%3Cclass%20T%3E%20using%20u_set%20%3D%20std%3A%3Aunordered_set%3CT%3E%3B%0Atemplate%20%3Cclass%20T%3E%20using%20vec%20%3D%20std%3A%3Avector%3CT%3E%3B%0Ausing%20vecl%20%3D%20vec%3Cll%3E%3B%0Ausing%20vecf%20%3D%20vec%3Clf%3E%3B%0Ausing%20vecs%20%3D%20vec%3Cstr%3E%3B%0Atemplate%20%3Cclass%20K%2C%20class%20V%3E%20using%20u_map%20%3D%20std%3A%3Aunordered_map%3CK%2C%20V%3E%3B%0Atemplate%20%3Cclass%20V%3E%20using%20graph%20%3D%20u_map%3CV%2C%20u_set%3CV%3E%3E%3B%0Atemplate%20%3Ctypename%20_Signature%3E%20using%20fun%20%3D%20std%3A%3Afunction%3C_Signature%3E%3B%0A%0A%2F%2F%20Algorithms%0Ausing%20std%3A%3Aaccumulate%3B%0Ausing%20std%3A%3Aall_of%3B%0Ausing%20std%3A%3Aany_of%3B%0Ausing%20std%3A%3Aback_inserter%3B%0Ausing%20std%3A%3Acopy%3B%0Ausing%20std%3A%3Acopy_if%3B%0Ausing%20std%3A%3Acount%3B%0Ausing%20std%3A%3Acount_if%3B%0Ausing%20std%3A%3Afind_if%3B%0Ausing%20std%3A%3Afor_each%3B%0Ausing%20std%3A%3Ainserter%3B%0Ausing%20std%3A%3Alower_bound%3B%0Ausing%20std%3A%3Amax%3B%0Ausing%20std%3A%3Amax_element%3B%0Ausing%20std%3A%3Amin%3B%0Ausing%20std%3A%3Amin_element%3B%0Ausing%20std%3A%3Anext_permutation%3B%0Ausing%20std%3A%3Anone_of%3B%0Ausing%20std%3A%3Apartial_sum%3B%0Ausing%20std%3A%3Aremove_if%3B%0Ausing%20std%3A%3Areplace_if%3B%0Ausing%20std%3A%3Areverse%3B%0Ausing%20std%3A%3Aset_difference%3B%0Ausing%20std%3A%3Aset_intersection%3B%0Ausing%20std%3A%3Aset_symmetric_difference%3B%0Ausing%20std%3A%3Aset_union%3B%0Ausing%20std%3A%3Asort%3B%0Ausing%20std%3A%3Aswap%3B%0Ausing%20std%3A%3Atransform%3B%0Ausing%20std%3A%3Aunique%3B%0Ausing%20std%3A%3Aupper_bound%3B%0A%0Anamespace%20utils%20%7B%0Astr%20to_string%28__int128%20const%20%26x%29%20%7B%20return%20std%3A%3Ato_string%28%28long%20long%29x%29%3B%20%7D%0Atemplate%20%3Cclass%20T%3E%20T%20clamp%28T%20const%20%26v%2C%20T%20const%20%26l%2C%20T%20const%20%26h%29%20%7B%0A%20%20return%20min%28h%2C%20max%28l%2C%20v%29%29%3B%0A%7D%0All%20gcd%28ll%20p%2C%20ll%20q%29%20%7B%20return%20%28q%20%3D%3D%200%29%20%3F%20p%20%3A%20gcd%28q%2C%20p%20%25%20q%29%3B%20%7D%0All%20lcm%28ll%20p%2C%20ll%20q%29%20%7B%20return%20p%20%2F%20gcd%28q%2C%20p%29%20%2A%20q%3B%20%7D%0A%7D%20%2F%2F%20namespace%20utils%0Ausing%20std%3A%3Ato_string%3B%0Ausing%20utils%3A%3Aclamp%3B%0Ausing%20utils%3A%3Agcd%3B%0Ausing%20utils%3A%3Alcm%3B%0Ausing%20utils%3A%3Ato_string%3B%0A%0Anamespace%20io%20%7B%0A%2F%2F%20Input%0Ausing%20IS%20%3D%20std%3A%3Aistream%3B%0AIS%20%26in%28IS%20%26%29%3B%0AIS%20%26in%28IS%20%26i%29%20%7B%20return%20i%3B%20%7D%0Atemplate%20%3Cclass%20T%2C%20class...%20Ts%3E%20IS%20%26in%28IS%20%26i%2C%20T%20%26a%2C%20Ts%20%26...%20as%29%20%7B%0A%20%20return%20in%28i%20%3E%3E%20a%2C%20as...%29%3B%0A%7D%0AIS%20%26operator%3E%3E%28IS%20%26i%2C%20__int128%20%26x%29%20%7B%0A%20%20long%20long%20int%20xx%3B%0A%20%20i%20%3E%3E%20xx%3B%0A%20%20x%20%3D%20xx%3B%0A%20%20return%20i%3B%0A%7D%0Atemplate%20%3Cclass%20V%3E%20IS%20%26operator%3E%3E%28IS%20%26i%2C%20vec%3CV%3E%20%26a%29%20%7B%0A%20%20for%20%28auto%20%26ai%20%3A%20a%29%0A%20%20%20%20i%20%3E%3E%20ai%3B%0A%20%20return%20i%3B%0A%7D%0Atemplate%20%3Cclass%20F%2C%20class%20S%3E%20IS%20%26operator%3E%3E%28IS%20%26i%2C%20pair%3CF%2C%20S%3E%20%26p%29%20%7B%0A%20%20return%20i%20%3E%3E%20p.first%20%3E%3E%20p.second%3B%0A%7D%0Atemplate%20%3Cclass...%20Ts%3E%20IS%20%26operator%3E%3E%28IS%20%26i%2C%20tuple%3CTs...%3E%20%26t%29%20%7B%0A%20%20return%20apply%28%5B%26%5D%28auto%20%26...%20ts%29%20-%3E%20IS%20%26%20%7B%20return%20in%28i%2C%20ts...%29%3B%20%7D%2C%20t%29%3B%0A%7D%0A%2F%2F%20Output%0Ausing%20OS%20%3D%20std%3A%3Aostream%3B%0AOS%20%26out_join%28OS%20%26o%2C%20str%20const%20%26%29%20%7B%20return%20o%3B%20%7D%0Atemplate%20%3Cclass%20T%3E%20OS%20%26out_join%28OS%20%26o%2C%20str%20const%20%26%2C%20T%20const%20%26a%29%20%7B%0A%20%20return%20o%20%3C%3C%20a%3B%0A%7D%0Atemplate%20%3Cclass%20T%2C%20class...%20Ts%3E%0AOS%20%26out_join%28OS%20%26o%2C%20str%20const%20%26sep%2C%20T%20const%20%26a%2C%20Ts%20const%20%26...%20as%29%20%7B%0A%20%20return%20out_join%28o%20%3C%3C%20a%20%3C%3C%20sep%2C%20sep%2C%20as...%29%3B%0A%7D%0AOS%20%26operator%3C%3C%28OS%20%26o%2C%20__int128%20const%20%26x%29%20%7B%20return%20o%20%3C%3C%20%28long%20long%20int%29x%3B%20%7D%0Atemplate%20%3Cclass%20F%2C%20class%20S%3E%20OS%20%26operator%3C%3C%28OS%20%26o%2C%20pair%3CF%2C%20S%3E%20const%20%26p%29%20%7B%0A%20%20return%20o%20%3C%3C%20p.first%20%3C%3C%20%22%3A%22%20%3C%3C%20p.second%3B%0A%7D%0Atemplate%20%3Cclass...%20Ts%2C%20size_t...%20I%3E%0AOS%20%26tuple_out%28OS%20%26o%2C%20tuple%3CTs...%3E%20const%20%26t%2C%20index_sequence%3CI...%3E%29%20%7B%0A%20%20return%20out_join%28o%2C%20%22%2C%22%2C%20get%3CI%3E%28t%29...%29%3B%0A%7D%0Atemplate%20%3Cclass...%20Ts%3E%20OS%20%26operator%3C%3C%28OS%20%26o%2C%20tuple%3CTs...%3E%20const%20%26t%29%20%7B%0A%20%20return%20tuple_out%28o%20%3C%3C%20%22%28%22%2C%20t%2C%20make_index_sequence%3Csizeof...%28Ts%29%3E%28%29%29%20%3C%3C%20%22%29%22%3B%0A%7D%0Atemplate%20%3Cclass%20T%3E%20struct%20Joiner%20%7B%0A%20%20str%20const%20pre%3B%0A%20%20str%20const%20post%3B%0A%20%20str%20const%20sep%3B%0A%20%20vec%3CT%3E%20const%20container%3B%0A%20%20template%20%3Cclass%20Itr%3E%0A%20%20Joiner%28Itr%20const%20%26begin%2C%20Itr%20const%20%26end%2C%20str%20const%20%26sep%2C%20str%20const%20%26pre%2C%0A%20%20%20%20%20%20%20%20%20str%20const%20%26post%29%0A%20%20%20%20%20%20%3A%20pre%28pre%29%2C%20post%28post%29%2C%20sep%28sep%29%2C%20container%28begin%2C%20end%29%20%7B%7D%0A%7D%3B%0Atemplate%20%3Cclass%20T%3E%20OS%20%26operator%3C%3C%28OS%20%26o%2C%20Joiner%3CT%3E%20const%20%26joiner%29%20%7B%0A%20%20auto%20itr%20%3D%20joiner.container.begin%28%29%3B%0A%20%20auto%20end%20%3D%20joiner.container.end%28%29%3B%0A%20%20o%20%3C%3C%20joiner.pre%3B%0A%20%20if%20%28itr%20%21%3D%20end%29%0A%20%20%20%20o%20%3C%3C%20%2A%28itr%2B%2B%29%3B%0A%20%20while%20%28itr%20%21%3D%20end%29%0A%20%20%20%20o%20%3C%3C%20joiner.sep%20%3C%3C%20%2A%28itr%2B%2B%29%3B%0A%20%20return%20o%20%3C%3C%20joiner.post%3B%0A%7D%0Atemplate%20%3Cclass%20Itr%3E%0Aauto%20join%28Itr%20const%20%26b%2C%20Itr%20const%20%26e%2C%20str%20const%20%26sep%20%3D%20%22%22s%2C%0A%20%20%20%20%20%20%20%20%20%20str%20const%20%26pre%20%3D%20%22%22s%2C%20str%20const%20%26post%20%3D%20%22%22s%29%20%7B%0A%20%20using%20T%20%3D%20typename%20iterator_traits%3CItr%3E%3A%3Avalue_type%3B%0A%20%20return%20Joiner%3CT%3E%28b%2C%20e%2C%20sep%2C%20pre%2C%20post%29%3B%0A%7D%0Atemplate%20%3Cclass%20C%2C%20enable_if_t%3C%21is_same%3CC%2C%20str%3E%3A%3Avalue%20%26%26%20%21is_array%3CC%3E%3A%3Avalue%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%21is_pointer%3CC%3E%3A%3Avalue%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%21std%3A%3Ais_arithmetic%3CC%3E%3A%3Avalue%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20nullptr_t%3E%20%3D%20nullptr%3E%0AOS%20%26operator%3C%3C%28OS%20%26o%2C%20C%20const%20%26a%29%20%7B%0A%20%20return%20o%20%3C%3C%20join%28a.begin%28%29%2C%20a.end%28%29%2C%20%22%2C%22%2C%20%22%5B%22%2C%20%22%5D%22%29%3B%0A%7D%0A%7D%20%2F%2F%20namespace%20io%0Ausing%20std%3A%3Acerr%3B%0Ausing%20std%3A%3Acin%3B%0Ausing%20std%3A%3Acout%3B%0Aauto%20init_io%20%3D%20%5B%5D%28%29%20%7B%0A%20%20std%3A%3Aios_base%3A%3Async_with_stdio%28false%29%3B%0A%20%20cin.tie%28nullptr%29%3B%0A%20%20cout.tie%28nullptr%29%3B%0A%20%20cout%20%3C%3C%20std%3A%3Afixed%20%3C%3C%20std%3A%3Asetprecision%2815%29%3B%0A%7D%3B%0Aauto%20input%20%3D%20%5B%5D%28auto%20%26...%20a%29%20%7B%20io%3A%3Ain%28cin%2C%20a...%29%3B%20%7D%3B%0Aauto%20print%20%3D%20%5B%5D%28auto%20const%20%26...%20a%29%20%7B%20io%3A%3Aout_join%28cout%2C%20%22%20%22%2C%20a...%29%20%3C%3C%20%22%5Cn%22%3B%20%7D%3B%0A%23ifdef%20JUMPAKU_DEBUG%0Aauto%20dump%20%3D%20%5B%5D%28auto%20const%20%26...%20a%29%20%7B%20io%3A%3Aout_join%28cerr%2C%20%22%20%22s%2C%20a...%29%20%3C%3C%20%22%5Cn%22%3B%20%7D%3B%0A%23else%0Aauto%20dump%20%3D%20%5B%5D%28auto%20const%20%26...%29%20%7B%7D%3B%0A%23endif%0Ausing%20io%3A%3Ajoin%3B%0A%0A%2F%2F%20Hash%0Anamespace%20hashcode%20%7B%0Atemplate%20%3Cclass...%20Ts%3E%20size_t%20hash_args%28size_t%20h%2C%20Ts%20const%20%26...%20ts%29%3B%0Asize_t%20hash_args%28size_t%20h%29%20%7B%20return%20h%3B%20%7D%0Atemplate%20%3Cclass%20T%2C%20class...%20Ts%3E%0Asize_t%20hash_args%28size_t%20h%2C%20T%20const%20%26t%2C%20Ts%20const%20%26...%20ts%29%20%7B%0A%20%20constexpr%20std%3A%3Ahash%3CT%3E%20hasher%3B%0A%20%20return%20hash_args%28%28%28h%20%3C%3C%2019%29%20-%20h%29%20%5E%20hasher%28t%29%2C%20ts...%29%3B%0A%7D%0Atemplate%20%3Cclass...%20Ts%2C%20size_t...%20I%3E%0Asize_t%20hash_tuple%28tuple%3CTs...%3E%20const%20%26t%2C%20index_sequence%3CI...%3E%29%20%7B%0A%20%20return%20hash_args%2817%2C%20get%3CI%3E%28t%29...%29%3B%0A%7D%0A%7D%20%2F%2F%20namespace%20hashcode%0Anamespace%20std%20%7B%0A%23if%20__GNUC__%20%3D%3D%205%20%7C%7C%20defined%28__STRICT_ANSI__%29%0Atemplate%20%3C%3E%20struct%20hash%3C__int128%3E%20%7B%0A%20%20size_t%20operator%28%29%28__int128%20const%20%26t%29%20const%20%7B%0A%20%20%20%20return%20%28t%20%26%200xffffff%29%20%5E%20%28%28t%20%3E%3E%2063%29%20%26%200xffffff%29%3B%0A%20%20%7D%0A%7D%3B%0A%23endif%0Atemplate%20%3Cclass...%20Ts%3E%20struct%20hash%3Ctuple%3CTs...%3E%3E%20%7B%0A%20%20size_t%20operator%28%29%28tuple%3CTs...%3E%20const%20%26t%29%20const%20%7B%0A%20%20%20%20size_t%20h%20%3D%20hashcode%3A%3Ahash_tuple%28t%2C%20index_sequence_for%3CTs...%3E%28%29%29%3B%0A%20%20%20%20return%20h%20%5E%20%28h%20%3E%3E%2032%29%3B%0A%20%20%7D%0A%7D%3B%0Atemplate%20%3Cclass%20T%3E%20struct%20hash%3Cu_set%3CT%3E%3E%20%7B%0A%20%20size_t%20operator%28%29%28u_set%3CT%3E%20const%20%26t%29%20const%20%7B%0A%20%20%20%20constexpr%20std%3A%3Ahash%3CT%3E%20hasher%3B%0A%20%20%20%20return%20accumulate%28%0A%20%20%20%20%20%20%20%20t.begin%28%29%2C%20t.end%28%29%2C%20%28size_t%290%2C%0A%20%20%20%20%20%20%20%20%5B%26%5D%28auto%20acc%2C%20auto%20const%20%26ti%29%20%7B%20return%20acc%20%2B%20hasher%28ti%29%3B%20%7D%29%3B%0A%20%20%7D%0A%7D%3B%0A%7D%20%2F%2F%20namespace%20std%0A%0A%2F%2F%20Range%0Anamespace%20ranges%20%7B%0Atemplate%20%3Cclass%20T%2C%20class%20Itr%3E%20struct%20iterator_base%20%7B%0A%20%20using%20difference_type%20%3D%20ll%3B%0A%20%20using%20value_type%20%3D%20T%3B%0A%20%20using%20pointer%20%3D%20T%20%2A%3B%0A%20%20using%20reference%20%3D%20T%20%26%3B%0A%20%20using%20iterator_category%20%3D%20random_access_iterator_tag%3B%0A%20%20ll%20i%3B%0A%20%20iterator_base%28ll%20const%20%26i%29%20%3A%20i%28i%29%20%7B%7D%0A%20%20bool%20operator%3D%3D%28Itr%20const%20%26itr%29%20const%20%7B%20return%20i%20%3D%3D%20itr.i%3B%20%7D%0A%20%20bool%20operator%21%3D%28Itr%20const%20%26itr%29%20const%20%7B%20return%20i%20%21%3D%20itr.i%3B%20%7D%0A%20%20ll%20operator-%28Itr%20const%20%26itr%29%20const%20%7B%20return%20i%20-%20itr.i%3B%20%7D%0A%20%20Itr%20operator%2B%2B%28int%29%20%7B%20return%20with%28i%2B%2B%29%3B%20%7D%0A%20%20Itr%20operator--%28int%29%20%7B%20return%20with%28i--%29%3B%20%7D%0A%20%20Itr%20operator%2B%28ll%20const%20%26n%29%20const%20%7B%20return%20with%28i%20%2B%20n%29%3B%20%7D%0A%20%20Itr%20operator-%28ll%20const%20%26n%29%20const%20%7B%20return%20with%28i%20-%20n%29%3B%20%7D%0A%20%20Itr%20%26operator%2B%3D%28ll%20const%20%26n%29%20%7B%0A%20%20%20%20i%20%2B%3D%20n%3B%0A%20%20%20%20return%20self%28%29%3B%0A%20%20%7D%0A%20%20Itr%20%26operator-%3D%28ll%20const%20%26n%29%20%7B%20return%20self%28%29%20%2B%3D%20%28-n%29%3B%20%7D%0A%20%20Itr%20%26operator%2B%2B%28%29%20%7B%20return%20self%28%29%20%2B%3D%201%3B%20%7D%0A%20%20Itr%20%26operator--%28%29%20%7B%20return%20self%28%29%20-%3D%201%3B%20%7D%0A%0Aprotected%3A%0A%20%20virtual%20Itr%20with%28ll%20i%29%20const%20%3D%200%3B%0A%20%20virtual%20Itr%20%26self%28%29%20%3D%200%3B%0A%7D%3B%0Atemplate%20%3Cclass%20T%3E%20struct%20seq_base%20%7B%0A%20%20ll%20const%20b%3B%0A%20%20ll%20const%20e%3B%0A%20%20seq_base%28ll%20b%2C%20ll%20e%29%20%3A%20b%28b%29%2C%20e%28max%28b%2C%20e%29%29%20%7B%7D%0A%20%20ll%20size%28%29%20const%20%7B%20return%20e%20-%20b%3B%20%7D%0A%20%20bool%20empty%28%29%20const%20%7B%20return%20size%28%29%20%3D%3D%200%3B%20%7D%0A%7D%3B%0Atemplate%20%3Cclass%20T%3E%20struct%20seq%20%3A%20seq_base%3CT%3E%20%7B%0A%20%20struct%20iterator%20%3A%20iterator_base%3CT%2C%20iterator%3E%20%7B%0A%20%20%20%20seq%3CT%3E%20const%20%26s%3B%0A%20%20%20%20iterator%28seq%3CT%3E%20const%20%26s%2C%20ll%20const%20%26i%29%0A%20%20%20%20%20%20%20%20%3A%20iterator_base%3CT%2C%20iterator%3E%28i%29%2C%20s%28s%29%20%7B%7D%0A%20%20%20%20iterator%28iterator%20const%20%26%29%20%3D%20default%3B%0A%20%20%20%20iterator%20with%28ll%20i%29%20const%20override%20%7B%20return%20iterator%28s%2C%20i%29%3B%20%7D%0A%20%20%20%20iterator%20%26self%28%29%20override%20%7B%20return%20%2Athis%3B%20%7D%0A%20%20%20%20T%20operator%2A%28%29%20const%20%7B%20return%20s%5Bthis-%3Ei%5D%3B%20%7D%0A%20%20%20%20iterator%20%26operator%3D%28iterator%20const%20%26itr%29%20%7B%0A%20%20%20%20%20%20this-%3Ei%20%3D%20itr.i%3B%0A%20%20%20%20%20%20return%20%2Athis%3B%0A%20%20%20%20%7D%0A%20%20%7D%3B%0A%20%20fun%3CT%28ll%29%3E%20const%20f%3B%0A%20%20seq%28ll%20b%2C%20ll%20e%2C%20fun%3CT%28ll%29%3E%20const%20%26f%29%20%3A%20seq_base%3CT%3E%28b%2C%20e%29%2C%20f%28f%29%20%7B%7D%0A%20%20iterator%20begin%28%29%20const%20%7B%20return%20iterator%28%2Athis%2C%200%29%3B%20%7D%0A%20%20iterator%20end%28%29%20const%20%7B%20return%20iterator%28%2Athis%2C%20this-%3Esize%28%29%29%3B%20%7D%0A%20%20T%20operator%5B%5D%28ll%20i%29%20const%20%7B%20return%20f%28i%20%2B%20this-%3Eb%29%3B%20%7D%0A%7D%3B%0A%0Astruct%20range%20%3A%20seq_base%3Cll%3E%20%7B%0A%20%20struct%20iterator%20%3A%20iterator_base%3Cll%2C%20iterator%3E%20%7B%0A%20%20%20%20iterator%28ll%20const%20%26i%29%20%3A%20iterator_base%3Cll%2C%20iterator%3E%28i%29%20%7B%7D%0A%20%20%20%20iterator%20with%28ll%20i%29%20const%20override%20%7B%20return%20iterator%28i%29%3B%20%7D%0A%20%20%20%20iterator%20%26self%28%29%20override%20%7B%20return%20%2Athis%3B%20%7D%0A%20%20%20%20ll%20operator%2A%28%29%20const%20%7B%20return%20i%3B%20%7D%0A%20%20%7D%3B%0A%20%20range%28ll%20n%29%20%3A%20range%280%2C%20n%29%20%7B%7D%0A%20%20range%28ll%20b%2C%20ll%20e%29%20%3A%20seq_base%3Cll%3E%28b%2C%20e%29%20%7B%7D%0A%20%20iterator%20begin%28%29%20const%20%7B%20return%20iterator%28b%29%3B%20%7D%0A%20%20iterator%20end%28%29%20const%20%7B%20return%20iterator%28e%29%3B%20%7D%0A%20%20bool%20has%28ll%20x%29%20const%20%7B%20return%20b%20%3C%3D%20x%20%26%26%20x%20%3C%20e%3B%20%7D%0A%20%20ll%20operator%5B%5D%28ll%20i%29%20const%20%7B%20return%20i%20%2B%20b%3B%20%7D%0A%7D%3B%0A%7D%20%2F%2F%20namespace%20ranges%0Ausing%20range%20%3D%20ranges%3A%3Arange%3B%0Arange%3A%3Aiterator%20end%28ll%20i%29%20%7B%20return%20range%3A%3Aiterator%28i%29%3B%20%7D%0Arange%3A%3Aiterator%20begin%28ll%20i%20%3D%200%29%20%7B%20return%20range%3A%3Aiterator%28i%29%3B%20%7D%0Atemplate%20%3Cclass%20F%3E%20auto%20seq%28ll%20n%2C%20F%20const%20%26f%29%20%7B%0A%20%20using%20T%20%3D%20decltype%28f%28declval%3Cll%3E%28%29%29%29%3B%0A%20%20return%20ranges%3A%3Aseq%3CT%3E%280LL%2C%20n%2C%20f%29%3B%0A%7D%0A%0Anamespace%20optional%20%7B%0Atemplate%20%3Cclass%20T%3E%20struct%20opt%20%7B%0A%20%20std%3A%3Aunique_ptr%3CT%3E%20ptr%3B%0A%20%20opt%28nullptr_t%20ptr%20%3D%20nullptr%29%20%3A%20ptr%28ptr%29%7B%7D%3B%0A%20%20opt%28T%20const%20%26val%29%20%3A%20ptr%28make_unique%3CT%3E%28val%29%29%7B%7D%3B%0A%20%20opt%28opt%3CT%3E%20const%20%26o%29%20%3A%20opt%3CT%3E%28nullptr%29%20%7B%0A%20%20%20%20if%20%28o%29%0A%20%20%20%20%20%20ptr%20%3D%20make_unique%3CT%3E%28%2Ao%29%3B%0A%20%20%7D%0A%20%20opt%28opt%3CT%3E%20%26%26%29%20%3D%20default%3B%0A%20%20opt%3CT%3E%20%26operator%3D%28opt%3CT%3E%20const%20%26o%29%20%7B%0A%20%20%20%20ptr%20%3D%20o%20%3F%20make_unique%3CT%3E%28%2Ao%29%20%3A%20nullptr%3B%0A%20%20%20%20return%20%2Athis%3B%0A%20%20%7D%0A%20%20opt%3CT%3E%20%26operator%3D%28opt%3CT%3E%20%26%26%29%20%3D%20default%3B%0A%20%20operator%20bool%28%29%20const%20%7B%20return%20has_value%28%29%3B%20%7D%0A%20%20T%20%26operator%2A%28%29%20%7B%20return%20value%28%29%3B%20%7D%0A%20%20T%20const%20%26operator%2A%28%29%20const%20%7B%20return%20value%28%29%3B%20%7D%0A%20%20T%20%2Aoperator-%3E%28%29%20%7B%20return%20%26%28%2Aptr%29%3B%20%7D%0A%20%20T%20const%20%2Aoperator-%3E%28%29%20const%20%7B%20return%20%26%28%2Aptr%29%3B%20%7D%0A%20%20T%20%26value%28%29%20%7B%20return%20%2Aptr%3B%20%7D%0A%20%20T%20const%20%26value%28%29%20const%20%7B%20return%20%2Aptr%3B%20%7D%0A%20%20T%20value_or%28T%20const%20%26val%29%20const%20%7B%20return%20%28ptr%29%20%3F%20value%28%29%20%3A%20val%3B%20%7D%0A%20%20bool%20has_value%28%29%20const%20%7B%20return%20ptr%20%21%3D%20nullptr%3B%20%7D%0A%7D%3B%0Atemplate%20%3Cclass%20T%3E%20io%3A%3AOS%20%26operator%3C%3C%28io%3A%3AOS%20%26o%2C%20opt%3CT%3E%20const%20%26opt%29%20%7B%0A%20%20using%20io%3A%3Aoperator%3C%3C%3B%0A%20%20return%20opt.has_value%28%29%20%3F%20%28o%20%3C%3C%20%22Some%28%22%20%3C%3C%20opt.value%28%29%20%3C%3C%20%22%29%22%29%20%3A%20%28o%20%3C%3C%20%22None%22%29%3B%0A%7D%0A%7D%20%2F%2F%20namespace%20optional%0Ausing%20optional%3A%3Aopt%3B%0A%0Abool%20odd%28ll%20n%29%20%7B%20return%20n%20%26%201%3B%20%7D%0Abool%20even%28ll%20n%29%20%7B%20return%20%21odd%28n%29%3B%20%7D%0A%0Abool%20imply%28bool%20p%2C%20bool%20q%29%20%7B%20return%20%21p%20%7C%7C%20q%3B%20%7D%0Abool%20iff%28bool%20p%2C%20bool%20q%29%20%7B%20return%20p%20%3D%3D%20q%3B%20%7D%0A%0Aconstexpr%20lf%20PI%20%3D%203.141592653589793238462643383279502884L%3B%0Aconstexpr%20ll%20MOD%20%3D%201e9%20%2B%207%3B%0A%0A%23endif%20%2F%2A%20TEMPLATE_HPP%20%2A%2F%0A%0A%2F%2A%2A%0A%2F%2F%20DP%20Definition%0Ausing%20Data%20%3D%20struct%20%7B%7D%3B%0Ausing%20Key%20%3D%20tuple%3C%3E%3B%0Ausing%20Value%20%3D%20ll%3B%0Ausing%20Cache%20%3D%20u_map%3CKey%2C%20Value%3E%3B%0Astruct%20DP%20%7B%0A%20%20Data%20data%3B%0A%20%20Cache%20cache%3B%0A%20%20DP%28Data%20const%20%26data%29%20%3A%20data%28data%29%2C%20cache%28%28ll%291e6%29%20%7B%7D%0A%20%20Value%20compute%28Key%20const%20%26key%29%20%7B%0A%20%20%20%20if%20%28IS_INITIAL%29%0A%20%20%20%20%20%20return%20INITIAL_VALUE%3B%0A%20%20%20%20auto%20found%20%3D%20cache.find%28key%29%3B%0A%20%20%20%20if%20%28found%20%21%3D%20cache.end%28%29%29%0A%20%20%20%20%20%20return%20found-%3Esecond%3B%0A%20%20%20%20return%20cache%5Bkey%5D%20%3D%20RECURSION_CALL%28this-%3Ecompute%28Key%7B%7D%29%29%3B%0A%20%20%7D%0A%7D%3B%0A%2F%2F%20DP%20Call%0A%2F%2A%0A%20%20DP%20dp%28Data%7B%7D%29%3B%0A%20%20print%28dp.compute%28Key%7B%7D%29%29%3B%0A%2A%2F%0A%0Avoid%20solve%28%29%3B%0Aint%20main%28int%2C%20char%20%2A%5B%5D%29%20%7B%0A%20%20init_io%28%29%3B%0A%20%20ll%20t%20%3D%201%3B%0A%20%20%2F%2A%2A%20input%28t%29%3B%20%2F%2A%2A%2F%0A%20%20while%20%28t--%29%0A%20%20%20%20solve%28%29%3B%0A%20%20cout.flush%28%29%3B%0A%7D%0A%0Avoid%20solve%28%29%20%7B%0A%20%20ll%20A%2C%20B%2C%20C%3B%0A%20%20input%28A%2C%20B%2C%20C%29%3B%0A%20%20ll%20a%20%3D%20A%2C%20b%20%3D%20B%2C%20c%20%3D%20C%3B%0A%20%20for%20%28auto%20%26%26n%20%3A%20range%281e8%29%29%20%7B%0A%20%20%20%20if%20%28odd%28a%29%20%7C%7C%20odd%28b%29%20%7C%7C%20odd%28c%29%29%20%7B%0A%20%20%20%20%20%20print%28n%29%3B%0A%20%20%20%20%20%20return%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20%28n%20%3E%200%20%26%26%20a%20%3D%3D%20A%20%26%26%20b%20%3D%3D%20B%20%26%26%20c%20%3D%3D%20C%29%20%7B%0A%20%20%20%20%20%20print%28-1%29%3B%0A%20%20%20%20%20%20return%3B%0A%20%20%20%20%7D%0A%20%20%20%20ll%20a2%20%3D%20a%20%2F%202%2C%20b2%20%3D%20b%20%2F%202%2C%20c2%20%3D%20c%20%2F%202%3B%0A%20%20%20%20a%20%3D%20b2%20%2B%20c2%3B%0A%20%20%20%20b%20%3D%20a2%20%2B%20c2%3B%0A%20%20%20%20c%20%3D%20b2%20%2B%20a2%3B%0A%20%20%7D%0A%7D%0A | a.cc:1:87: error: exponent has no digits
1 | %0A%23ifndef%20TEMPLATE_HPP%0A%23define%20TEMPLATE_HPP%0A%0A%23include%20%3Calgorithm%3E%0A%23include%20%3Cbitset%3E%0A%23include%20%3Ccmath%3E%0A%23include%20%3Cdeque%3E%0A%23include%20%3Cfunctional%3E%0A%23include%20%3Ciomanip%3E%0A%23include%20%3Ciostream%3E%0A%23include%20%3Citerator%3E%0A%23include%20%3Clist%3E%0A%23include%20%3Cmap%3E%0A%23include%20%3Cmemory%3E%0A%23include%20%3Cnumeric%3E%0A%23include%20%3Cset%3E%0A%23include%20%3Cstring%3E%0A%23include%20%3Ctuple%3E%0A%23include%20%3Ctype_traits%3E%0A%23include%20%3Cunordered_map%3E%0A%23include%20%3Cunordered_set%3E%0A%23include%20%3Cutility%3E%0A%23include%20%3Cvector%3E%0A%0A%23define%20_GLIBCXX_DEBUG%0A%0A%2F%2F%20Utility%0Ausing%20std%3A%3Adeclval%3B%0Ausing%20std%3A%3Adistance%3B%0Ausing%20std%3A%3Aenable_if_t%3B%0Ausing%20std%3A%3Aget%3B%0Ausing%20std%3A%3Aindex_sequence%3B%0Ausing%20std%3A%3Ais_array%3B%0Ausing%20std%3A%3Ais_pointer%3B%0Ausing%20std%3A%3Ais_same%3B%0Ausing%20std%3A%3Aiterator_traits%3B%0Ausing%20std%3A%3Amake_index_sequence%3B%0Ausing%20std%3A%3Amake_pair%3B%0Ausing%20std%3A%3Amake_tuple%3B%0Ausing%20std%3A%3Amake_unique%3B%0Ausing%20std%3A%3Arandom_access_iterator_tag%3B%0Ausing%20std%3A%3Astold%3B%0Ausing%20std%3A%3Astoll%3B%0Ausing%20std%3A%3Aoperator%22%22s%3B%0Ausing%20std%3A%3Aabs%3B%0A%0A%2F%2F%20Types%0Ausing%20std%3A%3Abitset%3B%0Ausing%20std%3A%3Adeque%3B%0Ausing%20std%3A%3Alist%3B%0Ausing%20std%3A%3Amultiset%3B%0Ausing%20std%3A%3Anullptr_t%3B%0Ausing%20std%3A%3Apair%3B%0Ausing%20std%3A%3Atuple%3B%0Ausing%20std%3A%3Aunordered_multimap%3B%0Ausing%20std%3A%3Aunordered_multiset%3B%0Ausing%20ll%20%3D%20%2F%2A%2A%20__int128%3B%20%2F%2F%2A%2F%20long%20long%20int%3B%0Ausing%20lf%20%3D%20long%20double%3B%0Ausing%20str%20%3D%20std%3A%3Astring%3B%0Atemplate%20%3Cclass%20T%3E%20using%20u_set%20%3D%20std%3A%3Aunordered_set%3CT%3E%3B%0Atemplate%20%3Cclass%20T%3E%20using%20vec%20%3D%20std%3A%3Avector%3CT%3E%3B%0Ausing%20vecl%20%3D%20vec%3Cll%3E%3B%0Ausing%20vecf%20%3D%20vec%3Clf%3E%3B%0Ausing%20vecs%20%3D%20vec%3Cstr%3E%3B%0Atemplate%20%3Cclass%20K%2C%20class%20V%3E%20using%20u_map%20%3D%20std%3A%3Aunordered_map%3CK%2C%20V%3E%3B%0Atemplate%20%3Cclass%20V%3E%20using%20graph%20%3D%20u_map%3CV%2C%20u_set%3CV%3E%3E%3B%0Atemplate%20%3Ctypename%20_Signature%3E%20using%20fun%20%3D%20std%3A%3Afunction%3C_Signature%3E%3B%0A%0A%2F%2F%20Algorithms%0Ausing%20std%3A%3Aaccumulate%3B%0Ausing%20std%3A%3Aall_of%3B%0Ausing%20std%3A%3Aany_of%3B%0Ausing%20std%3A%3Aback_inserter%3B%0Ausing%20std%3A%3Acopy%3B%0Ausing%20std%3A%3Acopy_if%3B%0Ausing%20std%3A%3Acount%3B%0Ausing%20std%3A%3Acount_if%3B%0Ausing%20std%3A%3Afind_if%3B%0Ausing%20std%3A%3Afor_each%3B%0Ausing%20std%3A%3Ainserter%3B%0Ausing%20std%3A%3Alower_bound%3B%0Ausing%20std%3A%3Amax%3B%0Ausing%20std%3A%3Amax_element%3B%0Ausing%20std%3A%3Amin%3B%0Ausing%20std%3A%3Amin_element%3B%0Ausing%20std%3A%3Anext_permutation%3B%0Ausing%20std%3A%3Anone_of%3B%0Ausing%20std%3A%3Apartial_sum%3B%0Ausing%20std%3A%3Aremove_if%3B%0Ausing%20std%3A%3Areplace_if%3B%0Ausing%20std%3A%3Areverse%3B%0Ausing%20std%3A%3Aset_difference%3B%0Ausing%20std%3A%3Aset_intersection%3B%0Ausing%20std%3A%3Aset_symmetric_difference%3B%0Ausing%20std%3A%3Aset_union%3B%0Ausing%20std%3A%3Asort%3B%0Ausing%20std%3A%3Aswap%3B%0Ausing%20std%3A%3Atransform%3B%0Ausing%20std%3A%3Aunique%3B%0Ausing%20std%3A%3Aupper_bound%3B%0A%0Anamespace%20utils%20%7B%0Astr%20to_string%28__int128%20const%20%26x%29%20%7B%20return%20std%3A%3Ato_string%28%28long%20long%29x%29%3B%20%7D%0Atemplate%20%3Cclass%20T%3E%20T%20clamp%28T%20const%20%26v%2C%20T%20const%20%26l%2C%20T%20const%20%26h%29%20%7B%0A%20%20return%20min%28h%2C%20max%28l%2C%20v%29%29%3B%0A%7D%0All%20gcd%28ll%20p%2C%20ll%20q%29%20%7B%20return%20%28q%20%3D%3D%200%29%20%3F%20p%20%3A%20gcd%28q%2C%20p%20%25%20q%29%3B%20%7D%0All%20lcm%28ll%20p%2C%20ll%20q%29%20%7B%20return%20p%20%2F%20gcd%28q%2C%20p%29%20%2A%20q%3B%20%7D%0A%7D%20%2F%2F%20namespace%20utils%0Ausing%20std%3A%3Ato_string%3B%0Ausing%20utils%3A%3Aclamp%3B%0Ausing%20utils%3A%3Agcd%3B%0Ausing%20utils%3A%3Alcm%3B%0Ausing%20utils%3A%3Ato_string%3B%0A%0Anamespace%20io%20%7B%0A%2F%2F%20Input%0Ausing%20IS%20%3D%20std%3A%3Aistream%3B%0AIS%20%26in%28IS%20%26%29%3B%0AIS%20%26in%28IS%20%26i%29%20%7B%20return%20i%3B%20%7D%0Atemplate%20%3Cclass%20T%2C%20class...%20Ts%3E%20IS%20%26in%28IS%20%26i%2C%20T%20%26a%2C%20Ts%20%26...%20as%29%20%7B%0A%20%20return%20in%28i%20%3E%3E%20a%2C%20as...%29%3B%0A%7D%0AIS%20%26operator%3E%3E%28IS%20%26i%2C%20__int128%20%26x%29%20%7B%0A%20%20long%20long%20int%20xx%3B%0A%20%20i%20%3E%3E%20xx%3B%0A%20%20x%20%3D%20xx%3B%0A%20%20return%20i%3B%0A%7D%0Atemplate%20%3Cclass%20V%3E%20IS%20%26operator%3E%3E%28IS%20%26i%2C%20vec%3CV%3E%20%26a%29%20%7B%0A%20%20for%20%28auto%20%26ai%20%3A%20a%29%0A%20%20%20%20i%20%3E%3E%20ai%3B%0A%20%20return%20i%3B%0A%7D%0Atemplate%20%3Cclass%20F%2C%20class%20S%3E%20IS%20%26operator%3E%3E%28IS%20%26i%2C%20pair%3CF%2C%20S%3E%20%26p%29%20%7B%0A%20%20return%20i%20%3E%3E%20p.first%20%3E%3E%20p.second%3B%0A%7D%0Atemplate%20%3Cclass...%20Ts%3E%20IS%20%26operator%3E%3E%28IS%20%26i%2C%20tuple%3CTs...%3E%20%26t%29%20%7B%0A%20%20return%20apply%28%5B%26%5D%28auto%20%26...%20ts%29%20-%3E%20IS%20%26%20%7B%20return%20in%28i%2C%20ts...%29%3B%20%7D%2C%20t%29%3B%0A%7D%0A%2F%2F%20Output%0Ausing%20OS%20%3D%20std%3A%3Aostream%3B%0AOS%20%26out_join%28OS%20%26o%2C%20str%20const%20%26%29%20%7B%20return%20o%3B%20%7D%0Atemplate%20%3Cclass%20T%3E%20OS%20%26out_join%28OS%20%26o%2C%20str%20const%20%26%2C%20T%20const%20%26a%29%20%7B%0A%20%20return%20o%20%3C%3C%20a%3B%0A%7D%0Atemplate%20%3Cclass%20T%2C%20class...%20Ts%3E%0AOS%20%26out_join%28OS%20%26o%2C%20str%20const%20%26sep%2C%20T%20const%20%26a%2C%20Ts%20const%20%26...%20as%29%20%7B%0A%20%20return%20out_join%28o%20%3C%3C%20a%20%3C%3C%20sep%2C%20sep%2C%20as...%29%3B%0A%7D%0AOS%20%26operator%3C%3C%28OS%20%26o%2C%20__int128%20const%20%26x%29%20%7B%20return%20o%20%3C%3C%20%28long%20long%20int%29x%3B%20%7D%0Atemplate%20%3Cclass%20F%2C%20class%20S%3E%20OS%20%26operator%3C%3C%28OS%20%26o%2C%20pair%3CF%2C%20S%3E%20const%20%26p%29%20%7B%0A%20%20return%20o%20%3C%3C%20p.first%20%3C%3C%20%22%3A%22%20%3C%3C%20p.second%3B%0A%7D%0Atemplate%20%3Cclass...%20Ts%2C%20size_t...%20I%3E%0AOS%20%26tuple_out%28OS%20%26o%2C%20tuple%3CTs...%3E%20const%20%26t%2C%20index_sequence%3CI...%3E%29%20%7B%0A%20%20return%20out_join%28o%2C%20%22%2C%22%2C%20get%3CI%3E%28t%29...%29%3B%0A%7D%0Atemplate%20%3Cclass...%20Ts%3E%20OS%20%26operator%3C%3C%28OS%20%26o%2C%20tuple%3CTs...%3E%20const%20%26t%29%20%7B%0A%20%20return%20tuple_out%28o%20%3C%3C%20%22%28%22%2C%20t%2C%20make_index_sequence%3Csizeof...%28Ts%29%3E%28%29%29%20%3C%3C%20%22%29%22%3B%0A%7D%0Atemplate%20%3Cclass%20T%3E%20struct%20Joiner%20%7B%0A%20%20str%20const%20pre%3B%0A%20%20str%20const%20post%3B%0A%20%20str%20const%20sep%3B%0A%20%20vec%3CT%3E%20const%20container%3B%0A%20%20template%20%3Cclass%20Itr%3E%0A%20%20Joiner%28Itr%20const%20%26begin%2C%20Itr%20const%20%26end%2C%20str%20const%20%26sep%2C%20str%20const%20%26pre%2C%0A%20%20%20%20%20%20%20%20%20str%20const%20%26post%29%0A%20%20%20%20%20%20%3A%20pre%28pre%29%2C%20post%28post%29%2C%20sep%28sep%29%2C%20container%28begin%2C%20end%29%20%7B%7D%0A%7D%3B%0Atemplate%20%3Cclass%20T%3E%20OS%20%26operator%3C%3C%28OS%20%26o%2C%20Joiner%3CT%3E%20const%20%26joiner%29%20%7B%0A%20%20auto%20itr%20%3D%20joiner.container.begin%28%29%3B%0A%20%20auto%20end%20%3D%20joiner.container.end%28%29%3B%0A%20%20o%20%3C%3C%20joiner.pre%3B%0A%20%20if%20%28itr%20%21%3D%20end%29%0A%20%20%20%20o%20%3C%3C%20%2A%28itr%2B%2B%29%3B%0A%20%20while%20%28itr%20%21%3D%20end%29%0A%20%20%20%20o%20%3C%3C%20joiner.sep%20%3C%3C%20%2A%28itr%2B%2B%29%3B%0A%20%20return%20o%20%3C%3C%20joiner.post%3B%0A%7D%0Atemplate%20%3Cclass%20Itr%3E%0Aauto%20join%28Itr%20const%20%26b%2C%20Itr%20const%20%26e%2C%20str%20const%20%26sep%20%3D%20%22%22s%2C%0A%20%20%20%20%20%20%20%20%20%20str%20const%20%26pre%20%3D%20%22%22s%2C%20str%20const%20%26post%20%3D%20%22%22s%29%20%7B%0A%20%20using%20T%20%3D%20typename%20iterator_traits%3CItr%3E%3A%3Avalue_type%3B%0A%20%20return%20Joiner%3CT%3E%28b%2C%20e%2C%20sep%2C%20pre%2C%20post%29%3B%0A%7D%0Atemplate%20%3Cclass%20C%2C%20enable_if_t%3C%21is_same%3CC%2C%20str%3E%3A%3Avalue%20%26%26%20%21is_array%3CC%3E%3A%3Avalue%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%21is_pointer%3CC%3E%3A%3Avalue%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%21std%3A%3Ais_arithmetic%3CC%3E%3A%3Avalue%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20nullptr_t%3E%20%3D%20nullptr%3E%0AOS%20%26operator%3C%3C%28OS%20%26o%2C%20C%20const%20%26a%29%20%7B%0A%20%20return%20o%20%3C%3C%20join%28a.begin%28%29%2C%20a.end%28%29%2C%20%22%2C%22%2C%20%22%5B%22%2C%20%22%5D%22%29%3B%0A%7D%0A%7D%20%2F%2F%20namespace%20io%0Ausing%20std%3A%3Acerr%3B%0Ausing%20std%3A%3Acin%3B%0Ausing%20std%3A%3Acout%3B%0Aauto%20init_io%20%3D%20%5B%5D%28%29%20%7B%0A%20%20std%3A%3Aios_base%3A%3Async_with_stdio%28false%29%3B%0A%20%20cin.tie%28nullptr%29%3B%0A%20%20cout.tie%28nullptr%29%3B%0A%20%20cout%20%3C%3C%20std%3A%3Afixed%20%3C%3C%20std%3A%3Asetprecision%2815%29%3B%0A%7D%3B%0Aauto%20input%20%3D%20%5B%5D%28auto%20%26...%20a%29%20%7B%20io%3A%3Ain%28cin%2C%20a...%29%3B%20%7D%3B%0Aauto%20print%20%3D%20%5B%5D%28auto%20const%20%26...%20a%29%20%7B%20io%3A%3Aout_join%28cout%2C%20%22%20%22%2C%20a...%29%20%3C%3C%20%22%5Cn%22%3B%20%7D%3B%0A%23ifdef%20JUMPAKU_DEBUG%0Aauto%20dump%20%3D%20%5B%5D%28auto%20const%20%26...%20a%29%20%7B%20io%3A%3Aout_join%28cerr%2C%20%22%20%22s%2C%20a...%29%20%3C%3C%20%22%5Cn%22%3B%20%7D%3B%0A%23else%0Aauto%20dump%20%3D%20%5B%5D%28auto%20const%20%26...%29%20%7B%7D%3B%0A%23endif%0Ausing%20io%3A%3Ajoin%3B%0A%0A%2F%2F%20Hash%0Anamespace%20hashcode%20%7B%0Atemplate%20%3Cclass...%20Ts%3E%20size_t%20hash_args%28size_t%20h%2C%20Ts%20const%20%26...%20ts%29%3B%0Asize_t%20hash_args%28size_t%20h%29%20%7B%20return%20h%3B%20%7D%0Atemplate%20%3Cclass%20T%2C%20class...%20Ts%3E%0Asize_t%20hash_args%28size_t%20h%2C%20T%20const%20%26t%2C%20Ts%20const%20%26...%20ts%29%20%7B%0A%20%20constexpr%20std%3A%3Ah |
s419869684 | p03723 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
int A,B,C;
cin>>A>>B>>C;
for(;A%2==0 && B%2==0 && C%2==0;i++){
int a=(B+C)/2,b=(A+C)/2,c=(A+B)/2;
A=a,B=b;C=c;
if(i>=30){
cout<<-1<<endl;
return 0;
}
}
cout<<i<<endl;
} | a.cc: In function 'int main()':
a.cc:7:35: error: 'i' was not declared in this scope
7 | for(;A%2==0 && B%2==0 && C%2==0;i++){
| ^
a.cc:15:9: error: 'i' was not declared in this scope
15 | cout<<i<<endl;
| ^
|
s257474001 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
#define fo(i,n) for(int i=0;i<n;i++)
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
int main(){
int a,b,c;cin>>a>>b>>c;
if(a%2!=0||c%2!=0||b%2!=0){
cout << 0;return 0;
}
if else(a==b&&b==c){
cout << -1;return 0;
}
else{
int cnt =0;
while(a%2==0&&b%2==0&&c%2==0){
int y =b,z =a;
a=b/2 + c/2; b=c/2+z/2;c=z/2 +y/2;
++cnt;
}
cout << cnt;
}
} | a.cc: In function 'int main()':
a.cc:10:8: error: expected '(' before 'else'
10 | if else(a==b&&b==c){
| ^~~~
| (
a.cc:13:5: error: 'else' without a previous 'if'
13 | else{
| ^~~~
|
s950841382 | p03723 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int64_t a,b,c;
cin>>a>>b>>c;
if(a % 4 == b % 4&& b % 4 == c % 4) cout <<"-1"<<endl;
else{int count=0;bool A;int64_t d=b/2+c/2,e=c/2+a/2,f=a/2+b/2;
bool A=false;
while(a % 2 ==0 && b % 2 ==0 && c % 2 ==0){
a=d;
b=e;
c=f;
count++;
}
cout << count <<endl;
}
} | a.cc: In function 'int main()':
a.cc:8:13: error: redeclaration of 'bool A'
8 | bool A=false;
| ^
a.cc:7:25: note: 'bool A' previously declared here
7 | else{int count=0;bool A;int64_t d=b/2+c/2,e=c/2+a/2,f=a/2+b/2;
| ^
|
s378675198 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
long long A,B,C;
cin >> A >> B >> C;
long long cnt = 0;
if (A%==1 || B%2==0 || C%2==0) {
cout << 0 << endl;
return 0;
}
if (A==B && B==C) {
cout << -1 << endl;
return 0;
}
while (true) {
if (A%==0 && B%2==0 && C%2==0) {
cnt++;
long long a = B/2 + C/2;
long long b = A/2 + C/2;
long long c = A/2 + B/2;
A = a;
B = b;
C = c;
}
else {
cout << cnt << endl;
break;
}
}
} | a.cc: In function 'int main()':
a.cc:9:10: error: expected primary-expression before '=' token
9 | if (A%==1 || B%2==0 || C%2==0) {
| ^
a.cc:20:12: error: expected primary-expression before '=' token
20 | if (A%==0 && B%2==0 && C%2==0) {
| ^
|
s183892169 | p03723 | C++ | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
#define rep(i,n) for (ll i = 0; i < (ll)(n); ++i)
#define rrep(i,j,n) for(ll i = (ll)(j); i < (ll)(n); i++)
#define mrep(i,n) for (ll i = (ll)(n-1); i > 0; i--)
#define be(v) (v).begin(), (v).end()
#define scout cout << fixed << setprecision(20)
ll INF = 1LL << 60;
ll mod = 1e9 + 7;
int main() {
int a,b,c; cin >. a >> b >> c;
if(a==b&&b==c) {
cout << -1 << endl;
reutrn 0;
}
int ans=0;
while(a%2==0&&b%2==0&&c%2==0) {
int A = a/2; int B = b/2; int C = c/2;
a=B+C;
b=A+C;
c=A+B;
ans++;
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:15:25: error: expected primary-expression before '.' token
15 | int a,b,c; cin >. a >> b >> c;
| ^
a.cc:18:17: error: 'reutrn' was not declared in this scope
18 | reutrn 0;
| ^~~~~~
|
s359850257 | p03723 | C++ | /*
* じょえチャンネル
* 高評価・チャンネル登録よろしくおねがいします!
* https://www.youtube.com/channel/UCRXsI3FL_kvaVL9zoolBfbQ
*/
#include <bits/stdc++.h>
//GCC
#define _GLIBCXX_DEBUG
//Clang
//#define _LIBCPP_DEBUG 0
//#pragma GCC target("avx2")
//#pragma GCC optimize("O3")
//#pragma GCC optimize("unroll-loops")
#define f(i,n) for(int i=0;i<(n);i++)
//here!!!
// define int long long !!!!!
#define int long long
// define int long long !!!!!
#define mod (int)((1e9)+7)
//constexpr int mod = 998244353ll;
#ifdef int
#define inf (int)(3e18)
#else
#define inf (int)(5e8)
#endif
#define intt long long
#define itn long long
#define P pair<long long,long long>
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,n) for(int i=1;i<=n;i++)
#define ALL(v) v.begin(),v.end()
#define smallpriority_queue(x) priority_queue<x,vector<x>,greater<x>>
using namespace std;
//Library
//モッドパウ
inline int modpow(int x, int y, int m = mod) {
int res = 1;
while (y) {
if (y & 1) {
res *= x;
res %= m;
}
x = x * x % m;
y /= 2;
}
return res;
}
int mypow(int x, int y) {
int res = 1;
while (y) {
if (y % 2) {
res *= x;
}
x = x * x;
y /= 2;
}
return res;
}
//is the number (x) a prime number?
bool prime(int x) {
if (!x || x == 1) {
return false;
}
for (int i = 2; i * i <= x; i++) {
if (!(x % i)) {
return false;
}
}
return true;
}
//saidai-kouyakusuu
inline int gcd(int x, int y) {
if (!y) {
return x;
}
return gcd(y, x % y);
}
//number of keta
int keta(int x) {
int ans = 0;
while (x) {
x /= 10;
ans++;
}
return ans;
}
//sum of keta
int ketasum(int x) {
int ans = 0;
while (x) {
ans += x % 10;
x /= 10;
}
return ans;
}
inline int lcm(int x, int y) {
int ans = x / gcd(x, y) * y;
return ans;
}
int twobeki(int x) {
int ans = 0;
while (1) {
if (!(x & 1)) {
ans++;
x /= 2;
}
else {
break;
}
}
return ans;
}
template <class T, class U>
inline bool chmax(T& lhs, const U& rhs) {
if (lhs < rhs) {
lhs = rhs;
return 1;
}
return 0;
}
template <class T, class U>
inline bool chmin(T& lhs, const U& rhs) {
if (lhs > rhs) {
lhs = rhs;
return 1;
}
return 0;
}
void Yes(){
cout<<"Yes"<<endl;
}
void No(){
cout<<"No"<<endl;
}
void YES(){
cout<<"YES"<<endl;
}
void NO(){
cout<<"NO"<<endl;
}
#define fin(i) scanf("%lld",&i)
#define fout(i) printf("%lld",i)
#define fendl printf("\n")
int kai(int x, int y) {
int res = 1;
for (int i = x - y + 1; i <= x; i++) {
res *= i; res %= mod;
}
return res;
}
int comb(int x, int y) {
if (y > x)return 0;
// cout<<kai(x, y)<<' '<<modpow(kai(y, y), mod - 2)<<endl;
return kai(x, y) * modpow(kai(y, y), mod - 2) % mod;
}
//Library-End
#define vecin(v) for(int i=0;i<v.size();i++)scanf("%lld",&v[i]);
#define vecout(v) {for(int i=0;i<(int)v.size();i++)printf("%lld ",v[i]);printf("\n");}
//template<typename T, typename U>
//class SegTree {
//protected:
// unsigned int n = 1, rank = 0;
// std::vector<T> node;
// T nodee;
// virtual T nodef(const T&, const T&)const = 0;
//public:
// SegTree(unsigned int m, T init, T nodee):nodee(nodee) {
// while (n < m) {
// n *= 2;
// rank++;
// }
// node.resize(2 * n);
// for (unsigned int i = n; i < 2 * n; i++)node[i] = init;
// }
// SegTree(const std::vector<T>& initvec, T nodee):nodee(nodee) {
// unsigned int m = initvec.size();
// while (n < m) {
// n *= 2;
// rank++;
// }
// node.resize(2 * n);
// for (unsigned int i = n; i < 2 * n; i++) {
// if (i - n < m)node[i] = initvec[i - n];
// }
// }
// virtual void update(int i, U x) {
// i += n;
// node[i] = x;
// while (i != 1) {
// i >>= 1;
// node[i] = nodef(node[2 * i], node[2 * i + 1]);
// }
// }
// virtual T query(int l, int r) {
// l += n; r += n;
// int ls = nodee, rs = nodee;
// while (l < r) {
// if (l & 1) {
// ls = nodef(ls, node[l]);
// l++;
// }
// if (r & 1) {
// r--;
// rs = nodef(node[r], rs);
// }
// l >>= 1; r >>= 1;
// }
// return nodef(ls, rs);
// }
// virtual T operator[](const int& x) {
// return node[n + x];
// }
// void fill(T x) {
// std::fill(all(node), x);
// }
// void print() {
// rep(i, n)std::cout << operator[](i) << " ";
// std::cout << std::endl;
// }
//};
//class RSQ :public SegTree<int, int> {
// int nodef(const int& lhs,const int& rhs){return lhs+rhs;}
//public:
// RSQ(int size, const int& def = 0) :SegTree<int, int>(size, def, 0) {}
// RSQ(const std::vector<int>& initvec) :SegTree<int, int>(initvec, 0) {}
//};
//class RMiQ :public SegTree<int, int> {
// int nodef(const int& lhs,const int& rhs){return std::min(lhs,rhs);}
//public:
// RMiQ(int size, const int& def = 0) :SegTree<int, int>(size, def, 0) {}
// RMiQ(const std::vector<int>& initvec) :SegTree<int, int>(initvec, 0) {}
//};
//class RMaQ :public SegTree<int, int> {
// int nodef(const int& lhs,const int& rhs){return std::max(lhs,rhs);}
//public:
// RMaQ(int size, const int& def = 0) :SegTree<int, int>(size, def, 0) {}
// RMaQ(const std::vector<int>& initvec) :SegTree<int, int>(initvec, 0) {}
//};
//template<typename T, typename U>
//class IntervalSegTree :public SegTree<T, U> {
//protected:
// using SegTree<T, U>::n;
// using SegTree<T, U>::rank;
// using SegTree<T, U>::node;
// using SegTree<T, U>::nodef;
// using SegTree<T, U>::nodee;
// std::vector<U> lazy;
// std::vector<bool> lazyflag;
// std::vector<int> width;
// virtual void lazyf(U&, const U&) = 0;
// virtual void updf(T&, const U&, const unsigned int&) = 0;
// void eval(int k) {
// for (int i = rank; i > 0; i--) {
// int nk = k >> i;
// if (lazyflag[nk]) {
// updf(node[2 * nk], lazy[nk], width[2 * nk]);
// updf(node[2 * nk + 1], lazy[nk], width[2 * nk + 1]);
// if (lazyflag[2 * nk])lazyf(lazy[2 * nk], lazy[nk]);
// else lazy[2 * nk] = lazy[nk];
// if (lazyflag[2 * nk + 1])lazyf(lazy[2 * nk + 1], lazy[nk]);
// else lazy[2 * nk + 1] = lazy[nk];
// lazyflag[2 * nk] = lazyflag[2 * nk + 1] = true;
// lazyflag[nk] = false;
// }
// }
// }
//public:
// IntervalSegTree(unsigned int m, T init, T nodee) :SegTree<T, U>(m, init, nodee) {
// lazy.resize(2 * n); lazyflag.resize(2 * n); width.resize(2 * n);
// width[1] = n;
// for (unsigned int i = 2; i < 2 * n; i++) {
// width[i] = width[i >> 1] >> 1;
// }
// }
// IntervalSegTree(T nodee, const std::vector<T>& initvec) :SegTree<T, U>(initvec, nodee) {
// lazy.resize(2 * n); lazyflag.resize(2 * n); width.resize(2 * n);
// width[1] = n;
// for (unsigned int i = 2; i < 2 * n; i++) {
// width[i] = width[i >> 1] >> 1;
// }
// }
// void update(int i, U x) {
// i += n;
// eval(i);
// updf(node[i], x, width[i]);
// if (lazyflag[i])lazyf(lazy[i], x);
// else {
// lazyflag[i] = true;
// lazy[i] = x;
// }
// while (i /= 2)node[i] = nodef(node[2 * i], node[2 * i + 1]);
// }
// void update(int l, int r, U x) {
// l += n; r += n;
// int nl = l, nr = r;
// while (!(nl & 1))nl >>= 1;
// while (!(nr & 1))nr >>= 1;
// nr--;
// eval(nl); eval(nr);
// while (l < r) {
// if (l & 1) {
// updf(node[l], x, width[l]);
// if (lazyflag[l])lazyf(lazy[l], x);
// else {
// lazyflag[l] = true;
// lazy[l] = x;
// }
// l++;
// }
// if (r & 1) {
// r--;
// updf(node[r], x, width[r]);
// if (lazyflag[r])lazyf(lazy[r], x);
// else {
// lazyflag[r] = true;
// lazy[r] = x;
// }
// }
// l >>= 1; r >>= 1;
// }
// while (nl >>= 1)node[nl] = nodef(node[2 * nl], node[2 * nl + 1]);
// while (nr >>= 1)node[nr] = nodef(node[2 * nr], node[2 * nr + 1]);
// }
// T query(int l, int r) {
// l += n; r += n;
// eval(l); eval(r - 1);
// int ls = nodee, rs = nodee;
// while (l < r) {
// if (l & 1) {
// ls = nodef(ls, node[l]);
// l++;
// }
// if (r & 1) {
// r--;
// rs = nodef(node[r], rs);
// }
// l >>= 1; r >>= 1;
// }
// return nodef(ls, rs);
// }
// T operator[](const int& x) {
// eval(n + x);
// return node[n + x];
// }
// T queryForAll() {
// return node[1];
// }
//};
//class RAQRSQ :public IntervalSegTree<int, int> {
// int nodef(const int& a, const int& b)const { return a + b; }
// void lazyf(int& a, const int& b) { a += b; }
// void updf(int& a, const int& b, const unsigned int& width) { a += width * b; }
//public:
// RAQRSQ(int size, const int& def = 0) :IntervalSegTree<int, int>(size, def, 0) {
// for (int i = n - 1; i > 0; i--)node[i] = nodef(node[2 * i], node[2 * i + 1]);
// }
// RAQRSQ(const std::vector<int>& initvec) :IntervalSegTree<int, int>((int)0, initvec) {
// for (int i = n - 1; i > 0; i--)node[i] = nodef(node[2 * i], node[2 * i + 1]);
// }
//};
//class RAQRMiQ :public IntervalSegTree<int, int> {
// int nodef(const int& a, const int& b)const { return std::min(a, b); }
// void lazyf(int& a, const int& b) { a += b; }
// void updf(int& a, const int& b, const unsigned int& width) { a += b; }
//public:
// RAQRMiQ(int size, const int& def = 0) :IntervalSegTree<int, int>(size, def, inf) {
// for (int i = n - 1; i > 0; i--)node[i] = nodef(node[2 * i], node[2 * i + 1]);
// }
// RAQRMiQ(const std::vector<int>& initvec) :IntervalSegTree<int, int>(inf, initvec) {
// for (int i = n - 1; i > 0; i--)node[i] = nodef(node[2 * i], node[2 * i + 1]);
// }
//};
//class RAQRMaQ :public IntervalSegTree<int, int> {
// int nodef(const int& a, const int& b)const { return std::max(a, b); }
// void lazyf(int& a, const int& b) { a += b; }
// void updf(int& a, const int& b, const unsigned int& width) { a += b; }
//public:
// RAQRMaQ(unsigned int size, const int& def = 0) :IntervalSegTree<int, int>(size, def, -inf) {
// for (int i = n - 1; i > 0; i--)node[i] = nodef(node[2 * i], node[2 * i + 1]);
// }
// RAQRMaQ(const std::vector<int>& initvec) :IntervalSegTree<int, int>(-inf, initvec) {
// for (int i = n - 1; i > 0; i--)node[i] = nodef(node[2 * i], node[2 * i + 1]);
// }
//};
//class RUQRSQ :public IntervalSegTree<int, int> {
// int nodef(const int& a, const int& b)const { return a + b; }
// void lazyf(int& a, const int& b) { a = b; }
// void updf(int& a, const int& b, const unsigned int& width) { a = width * b; }
//public:
// RUQRSQ(int size, const int& def = 0) :IntervalSegTree<int, int>(size, def, 0) {
// for (int i = n - 1; i > 0; i--)node[i] = nodef(node[2 * i], node[2 * i + 1]);
// }
// RUQRSQ(const std::vector<int>& initvec) :IntervalSegTree<int, int>((int)0, initvec) {
// for (int i = n - 1; i > 0; i--)node[i] = nodef(node[2 * i], node[2 * i + 1]);
// }
//};
//class RUQRMiQ :public IntervalSegTree<int, int> {
// int nodef(const int& a, const int& b)const { return std::min(a, b); }
// void lazyf(int& a, const int& b) { a = b; }
// void updf(int& a, const int& b, const unsigned int& width) { a = b; }
//public:
// RUQRMiQ(int size, const int& def = 0) :IntervalSegTree<int, int>(size, def, inf) {
// for (int i = n - 1; i > 0; i--)node[i] = nodef(node[2 * i], node[2 * i + 1]);
// }
// RUQRMiQ(const std::vector<int>& initvec) :IntervalSegTree<int, int>(inf, initvec) {
// for (int i = n - 1; i > 0; i--)node[i] = nodef(node[2 * i], node[2 * i + 1]);
// }
//};
//class RUQRMaQ :public IntervalSegTree<int, int> {
// int nodef(const int& a, const int& b)const { return std::max(a, b); }
// void lazyf(int& a, const int& b) { a = b; }
// void updf(int& a, const int& b, const unsigned int& width) { a = b; }
//public:
// RUQRMaQ(int size, const int& def = 0) :IntervalSegTree<int, int>(size, def, -inf) {
// for (int i = n - 1; i > 0; i--)node[i] = nodef(node[2 * i], node[2 * i + 1]);
// }
// RUQRMaQ(const std::vector<int>& initvec) :IntervalSegTree<int, int>(-inf, initvec) {
// for (int i = n - 1; i > 0; i--)node[i] = nodef(node[2 * i], node[2 * i + 1]);
// }
//};
//SegTree
template <class T>
class SegTree {
int n; // 葉の数
vector<T> data; // データを格納するvector
T def; // 初期値かつ単位元
function<T(T, T)> operation; // 区間クエリで使う処理
function<T(T, T)> update; // 点更新で使う処理
// 区間[a,b)の総和。ノードk=[l,r)に着目している。
T _query(int a, int b, int k, int l, int r) {
if (r <= a || b <= l) return def; // 交差しない
if (a <= l && r <= b)
return data[k]; // a,l,r,bの順で完全に含まれる
else {
T c1 = _query(a, b, 2 * k + 1, l, (l + r) / 2); // 左の子
T c2 = _query(a, b, 2 * k + 2, (l + r) / 2, r); // 右の子
return operation(c1, c2);
}
}
public:
// _n:必要サイズ, _def:初期値かつ単位元, _operation:クエリ関数,
// _update:更新関数
SegTree(size_t _n, T _def, function<T(T, T)> _operation,
function<T(T, T)> _update)
: def(_def), operation(_operation), update(_update) {
n = 1;
while (n < _n) {
n *= 2;
}
data = vector<T>(2 * n - 1, def);
}
// 場所i(0-indexed)の値をxで更新
void change(int i, T x) {
i += n - 1;
data[i] = update(data[i], x);
while (i > 0) {
i = (i - 1) / 2;
data[i] = operation(data[i * 2 + 1], data[i * 2 + 2]);
}
}
// [a, b)の区間クエリを実行
T query(int a, int b) {
return _query(a, b, 0, 0, n);
}
// 添字でアクセス
T operator[](int i) {
return data[i + n - 1];
}
};
#define R_MIN ([](long long a, long long b) { return min(a, b); })
#define R_MAX ([](long long a, long long b) { return max(a, b); })
#define R_SUM ([](long long a, long long b) { return a + b; })
#define NORMAL_UPDATE ([](long long a, long long b) { return b; })
#define ADD_UPDATE ([](long long a, long long b) { return a + b; })
#define MINUS_UPDATE ([](long long a, long long b) { return a - b; }
class Union_Find {
vector<int> par;
vector<int> rankmy;
vector<int> ookisa;
public:
Union_Find(int size) {
par = vector<int>(size);
rankmy = vector<int>(size);
ookisa=vector<int>(size);
for (int i = 0; i < size; i++) {
par[i] = i;
ookisa[i]=1;
}
}
int find(int x) {
if (par[x] == x) {
return x;
}
return par[x] = find(par[x]);
}
void unite(int x, int y) {
x = find(x);
y = find(y);
if (x == y) {
return;
}
if (rankmy[x] < rankmy[y]) {
par[x] = y;
ookisa[y]+=ookisa[x];
ookisa[x]=0;
}
else {
par[y] = x;
ookisa[x]+=ookisa[y];
ookisa[y]=0;
if (rankmy[x] == rankmy[y]) {
rankmy[x]++;
}
}
}
int size(int i){
i=find(i);
return ookisa[i];
}
bool same(int x, int y){
return find(x) == find(y);
}
};
class BIT {
vector<int> data;
int size=0;
public:
BIT(int _size){
data=vector<int>(_size+1);
size=_size;
}
void add(int i,int x){
while (i<=size) {
data[i]+=x;
i += i & -i;
}
}
int sum(int i){
assert(i<=size);
int s=0;
while(i>0){
s+=data[i];
i -= i & -i;
}
return s;
}
int lower_bound(int x){
if(x<=0){
return 0;
}else{
int i=0;int r=1;
while(r<size) r=r<<1;
for(int len=r;len>0;len=len>>1) {
if(i+len<size && data[i+len]<x){
x-=data[i+len];
i+=len;
}
}
return i+1;
}
}
};
//Union-Find-End
int perm[1000005];
void init_perm() {
perm[0] = 1;
REP(i, 1000000) {
perm[i] = perm[i - 1] * i % mod;
}
}
int nCk(int x, int y) {
return perm[x] * modpow(perm[x - y], mod - 2) % mod * modpow(perm[y], mod - 2) % mod;
}
double kyori(pair<int, int> f, pair<int, int> s) {
double ans = 0;
double t = fabs(f.first - s.first);
double y = fabs(f.second - s.second);
ans = sqrt(t * t + y * y);
return ans;
}
inline string stringmax(string& x,string& y){
if (x.size()>y.size()) {
return x;
}
if (x.size()<y.size()) {
return y;
}
rep(i,x.size()){
if (x[i]>y[i]) {
return x;
}
if (x[i]<y[i]) {
return y;
}
}
return x;
}
vector<int> RollingHash(string &s, string& t){
vector<int> ans;
__int128 h=0,hamod=0,ki=0,kim=0,hikaku=0,one=0;
one=1;
ki=1000000007ll;
hamod=(one<<61)-1;
kim=1;
rep(i,t.size()){
hikaku*=ki;
h*=ki;
kim*=ki;
hikaku+=t[i];
h+=s[i];
hikaku%=hamod;
h%=hamod;
kim%=hamod;
}
rep(i,(int)s.size()-(int)t.size()+1){
if (h==hikaku) {
ans.emplace_back(i);
}
h*=ki;
h%=hamod;
h+=s[i+(int)t.size()];
h%=hamod;
h+=hamod;
h-=s[i]*kim%hamod;
h%=hamod;
}
return ans;
}
struct edge {
int to;
int length;
edge(int _to, int _length){
to=_to;
length=_length;
}
};
vector<int> djkstra(vector<vector<edge>> &road,int start){
vector<int> kyo(road.size(),inf);
smallpriority_queue(P) q;
q.push({0,start});
kyo[start]=0;
while (q.size()) {
int x=q.top().second;
itn now=q.top().first;
q.pop();
if (kyo[x]<now) {
continue;
}
for(auto&i:road[x]){
if (kyo[i.to]>now+i.length) {
kyo[i.to]=now+i.length;
q.push({kyo[i.to],i.to});
}
}
}
return kyo;
}
#define endl "\n" //interactive の時に注意!!!
#define printd cout<<fixed<<setprecision(10)
int a,b,c,ans,d[104][3];
signed main() {
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
cin>>d[0][0]>>d[0][1]>>d[0][2];
rep(j,3){
if (d[0][j]&1) {
goto kaage;
}
g+=d[i][j];
}
if (d[0][0]==d[0][1]&&d[0][1]==d[0][2]) {
cout<<-1<<endl;
return 0;
}
rep(i,100){
int g=0;
rep(j,3){
if (d[i][j]&1) {
goto kaage;
}
g+=d[i][j];
}
rep(j,3){
d[i+1][j]=(g-d[i][j])/2;
}
ans++;
}
kaage:;;
cout<<ans<<endl;;
}
| a.cc: In function 'int main()':
a.cc:728:13: error: 'g' was not declared in this scope
728 | g+=d[i][j];
| ^
a.cc:728:18: error: 'i' was not declared in this scope
728 | g+=d[i][j];
| ^
|
s196112117 | p03723 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<cmath>
#include<cstdio>
#include<queue>
using namespace std;
typedef pair<int,int> ii;
typedef long long ll;
const int INF=1e9;
struct UnionFind{
vector<int> par,rank;
int c;
UnionFind(int n):par(n),rank(n,0){
for(int i=0;i<n;i++) par[i]=1;
c=n;
}
int root(int x){
if(par[x]==x) return x;
return par[x]=root(par[x]);
}
void unite(int x,int y){
int rx=root(x);
int ry=root(y);
if(rx==ry) return;
if(rank[rx]<rank[ry]){
par[rx]=ry;
}
else{
par[ry]=rx;
if(rank[rx]==rank[ry]) rx++;
}
c--;
}
bool same(int x,int y){
return root(x)==root(y);
}
}
int main()
{
int a,b,c;cin>>a>>b>>c;
int ans=0;
while(true){
if(a&1||b&1||c&1) break;
if(a==b&&b==c){
ans=-1;break;
}
int p,q,r;
p=a/2;q=b/2;r=c/2;
a=q+r;b=p+r;c=p+q;
}
cout<<ans<<endl;
return 0;
} | a.cc:41:2: error: expected ';' after struct definition
41 | }
| ^
| ;
|
s874370590 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A,B,C;
int X,Y,Z;
int count=0;
cin>>A>>B>>C;
if(A==B && B==C){
cout<<-1<<endkl;
return 0;
}
while(A%2==0 && B%2==0 && C%2==0){
A/=2;
B/=2;
C/=2;
X=A; Y=B; Z=C;
A=Y+Z; B=X+Z; C=X+Y;
count++;
}
cout<<count<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:15: error: 'endkl' was not declared in this scope
10 | cout<<-1<<endkl;
| ^~~~~
|
s786410463 | p03723 | C++ | #include<bits/stdc++.h>
// Useful constants
#define INF (int)1e9
#define EPS 1e-9
#define MOD 1000000007ll
#define PI 3.14159
// for input-output
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
// iteration macros: have advantage of auto-casting and not recomputing arguments
#define REP(i, a, b) \
for (int i = int(a); i <= int(b); i++) // a to b, and variable i is local!
#define TRvi(c, it) \
for (vi::iterator it = (c).begin(); it != (c).end(); it++)
#define TRvii(c, it) \
for (vii::iterator it = (c).begin(); it != (c).end(); it++)
#define TRmsi(c, it) \
for (msi::iterator it = (c).begin(); it != (c).end(); it++)
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define setBit(S, j) (S |= (1 << j))
#define clearBit(S, j) (S &= ~(1 << j))
#define toggleBit(S, j) (S ^= (1 << j))
// input macro
#define in(x,n) for(int e=0;e<n;e++){ll y;cin>>y;x.pb(y);}
//output macro
#define print(x) for(auto it:x) cout<<it<<' '; cout<<endl;
#define printii(x) for(auto it:x) cout<<it.F<<' '<<it.S<<'\t'; cout<<endl;
// shortcut for data type
#define ll long long
#define vi vector<ll>
#define vvi vector<vi>
#define ii pair<ll,ll>
#define pll pair<ll,ll>
#define vii vector<ii>
#define vvii vector<vii>
#define viii vector<pair<ii,ll>>
#define pb push_back
#define ppb pop_back
#define eb emplace_back
#define mp make_pair
#define F first
#define S second
#define uset unordered_set
#define umap unordered_map
//--namespace
using namespace std;
//--useful function
ll gcd(ll a, ll b){ll temp;while (b > 0){temp = a%b;a = b;b = temp;} return a;}
ll lcm(ll a, ll b){return a*b/gcd(a,b);}
ll fpow(ll b, ll exp, ll mod){if(exp == 0) return 1;ll t = fpow(b,exp/2,mod);if(exp&1) return t*t%mod*b%mod;return t*t%mod;}
ll divmod(ll i, ll j, ll mod){i%=mod,j%=mod;return i*fpow(j,mod-2,mod)%mod;}
// --clock funtion
clock_t time_p=clock();
void TimeTaken()
{
time_p=clock()-time_p;
cerr<<"Completion time : "<<(float)(time_p)/CLOCKS_PER_SEC<<"\n";
}
// --solve function
void solve() {
}
//--main function
#include<bits/stdc++.h>
// Useful constants
#define INF (int)1e9
#define EPS 1e-9
#define MOD 1000000007ll
#define PI 3.14159
// for input-output
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
// iteration macros: have advantage of auto-casting and not recomputing arguments
#define REP(i, a, b) \
for (int i = int(a); i <= int(b); i++) // a to b, and variable i is local!
#define TRvi(c, it) \
for (vi::iterator it = (c).begin(); it != (c).end(); it++)
#define TRvii(c, it) \
for (vii::iterator it = (c).begin(); it != (c).end(); it++)
#define TRmsi(c, it) \
for (msi::iterator it = (c).begin(); it != (c).end(); it++)
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define setBit(S, j) (S |= (1 << j))
#define clearBit(S, j) (S &= ~(1 << j))
#define toggleBit(S, j) (S ^= (1 << j))
// input macro
#define in(x,n) for(int e=0;e<n;e++){ll y;cin>>y;x.pb(y);}
//output macro
#define print(x) for(auto it:x) cout<<it<<' '; cout<<endl;
#define printii(x) for(auto it:x) cout<<it.F<<' '<<it.S<<'\t'; cout<<endl;
// shortcut for data type
#define ll long long
#define vi vector<ll>
#define vvi vector<vi>
#define ii pair<ll,ll>
#define pll pair<ll,ll>
#define vii vector<ii>
#define vvii vector<vii>
#define viii vector<pair<ii,ll>>
#define pb push_back
#define ppb pop_back
#define eb emplace_back
#define mp make_pair
#define F first
#define S second
#define uset unordered_set
#define umap unordered_map
//--namespace
using namespace std;
//--useful function
ll gcd(ll a, ll b){ll temp;while (b > 0){temp = a%b;a = b;b = temp;} return a;}
ll lcm(ll a, ll b){return a*b/gcd(a,b);}
ll fpow(ll b, ll exp, ll mod){if(exp == 0) return 1;ll t = fpow(b,exp/2,mod);if(exp&1) return t*t%mod*b%mod;return t*t%mod;}
ll divmod(ll i, ll j, ll mod){i%=mod,j%=mod;return i*fpow(j,mod-2,mod)%mod;}
// --clock funtion
clock_t time_p=clock();
void TimeTaken()
{
time_p=clock()-time_p;
cerr<<"Completion time : "<<(float)(time_p)/CLOCKS_PER_SEC<<"\n";
}
// --solve function
void solve() {
}
//--main function
int main(){
int a,b,c,a2,b2,c2;
cin>>a>>b>>c;
if(a==1&&b==1&&c==1)cout<<0<<endl;
else if(a==b&&c==a)cout<<-1<<endl;
else{
int ans=0;
while(a%2==0&&b%2==0&&c%2==0){
ans++;
a2=(b+c)/2;
b2=(a+c)/2;
c2=(a+b)/2;
a=a2;
b=b2;
c=c2;
}
cout<<ans<<endl;
}
}
| a.cc:112:4: error: redefinition of 'long long int gcd(long long int, long long int)'
112 | ll gcd(ll a, ll b){ll temp;while (b > 0){temp = a%b;a = b;b = temp;} return a;}
| ^~~
a.cc:48:4: note: 'long long int gcd(long long int, long long int)' previously defined here
48 | ll gcd(ll a, ll b){ll temp;while (b > 0){temp = a%b;a = b;b = temp;} return a;}
| ^~~
a.cc:113:4: error: redefinition of 'long long int lcm(long long int, long long int)'
113 | ll lcm(ll a, ll b){return a*b/gcd(a,b);}
| ^~~
a.cc:49:4: note: 'long long int lcm(long long int, long long int)' previously defined here
49 | ll lcm(ll a, ll b){return a*b/gcd(a,b);}
| ^~~
a.cc:114:4: error: redefinition of 'long long int fpow(long long int, long long int, long long int)'
114 | ll fpow(ll b, ll exp, ll mod){if(exp == 0) return 1;ll t = fpow(b,exp/2,mod);if(exp&1) return t*t%mod*b%mod;return t*t%mod;}
| ^~~~
a.cc:50:4: note: 'long long int fpow(long long int, long long int, long long int)' previously defined here
50 | ll fpow(ll b, ll exp, ll mod){if(exp == 0) return 1;ll t = fpow(b,exp/2,mod);if(exp&1) return t*t%mod*b%mod;return t*t%mod;}
| ^~~~
a.cc:115:4: error: redefinition of 'long long int divmod(long long int, long long int, long long int)'
115 | ll divmod(ll i, ll j, ll mod){i%=mod,j%=mod;return i*fpow(j,mod-2,mod)%mod;}
| ^~~~~~
a.cc:51:4: note: 'long long int divmod(long long int, long long int, long long int)' previously defined here
51 | ll divmod(ll i, ll j, ll mod){i%=mod,j%=mod;return i*fpow(j,mod-2,mod)%mod;}
| ^~~~~~
a.cc:117:9: error: redefinition of 'clock_t time_p'
117 | clock_t time_p=clock();
| ^~~~~~
a.cc:53:9: note: 'clock_t time_p' previously declared here
53 | clock_t time_p=clock();
| ^~~~~~
a.cc:118:6: error: redefinition of 'void TimeTaken()'
118 | void TimeTaken()
| ^~~~~~~~~
a.cc:54:6: note: 'void TimeTaken()' previously defined here
54 | void TimeTaken()
| ^~~~~~~~~
a.cc:124:6: error: redefinition of 'void solve()'
124 | void solve() {
| ^~~~~
a.cc:60:6: note: 'void solve()' previously defined here
60 | void solve() {
| ^~~~~
|
s885750738 | p03723 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long a=sc.nextLong(),b=sc.nextLong(),c=sc.nextLong();
long f=0;
if(a==b&&b==c){
System.out.println(-1);
}else{
while(true){
if(a%2!=0||b%2!=0||c%2!=0){
break;
}else{
int ha=a/2,hb=b/2,hc=c/2;
a=hb+hc;
b=ha+hc;
c=ha+hb;
f++;
}
}
System.out.println(f);
}
}
}
| Main.java:16: error: incompatible types: possible lossy conversion from long to int
int ha=a/2,hb=b/2,hc=c/2;
^
Main.java:16: error: incompatible types: possible lossy conversion from long to int
int ha=a/2,hb=b/2,hc=c/2;
^
Main.java:16: error: incompatible types: possible lossy conversion from long to int
int ha=a/2,hb=b/2,hc=c/2;
^
3 errors
|
s345834111 | p03723 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c;
if(a==b&&b==c)cout << =1;
else if(a%2==1||b%2==1||c%2==1)cout << 0;
else{
int i=0;
while(a%2==0&&b%2==0&&c%2==0){
a=(b+c)/2;
b=(a+c)/2;
c=(a+b)/2;
i++;
}
cout << i;
}
cout << endl;
} | a.cc: In function 'int main()':
a.cc:6:25: error: expected primary-expression before '=' token
6 | if(a==b&&b==c)cout << =1;
| ^
|
s394204796 | p03723 | C++ | #include<iostream>
#define ll long long
int main()
{
ll a,b,c,a1,b1,c1;
int result;
if(a%2 || b%2 || c%2)
{
cout<<0;
}
else if(a==b && b==c)
{
cout<<0;
}
else
{
while(a%2==0 && b%2==0 && c%2==0)
{
a1=a;
b1=b;
c1=c;
a=b1/2+c1/2;
b=a1/2+c1/2;
c=a1/2+b1/2;
result++;
}
cout<<result;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | cout<<0;
| ^~~~
| std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
13 | cout<<0;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:27:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
27 | cout<<result;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s687109029 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin >> a >> b >> c;
int count=0;
for(int i=1; i<=1000; i++){
if(a%2 == 1 || b%2 == 1 || c%2 == 1){
cout << count << endl;
break;
}
else if(a == b && b == c){
count = -1;
cout << count << endl;
break;
}
else{
a=(b+c)/2
b=(c+a)/2
c=(a+b)/2
count++;
}
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:22:16: error: expected ';' before 'b'
22 | a=(b+c)/2
| ^
| ;
23 | b=(c+a)/2
| ~
|
s748840530 | p03723 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int64_t A,B,C;
cin>>A>>B>>C;
int64_t ans=0;
if(A==B && B==C){
if(A%2==0)
cout<<-1<<endl;
else
cout<<0<<endl;
}else{
int64_t ans=0;
for(int i=1; ;i++){
if(A%2==0 && B%2==0 C%2==0){
int64_t a=(B+C)/2;
int64_t b=(A+C)/2;
int64_t c=(A+B)/2;
A=a; B=b; C=c;
}else break;
}cout<<ans<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:16:24: error: expected ')' before 'C'
16 | if(A%2==0 && B%2==0 C%2==0){
| ~ ^~
| )
|
s231161882 | p03723 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int64_t A,B,C;
cin>>A>>B>>C;
sort(A.begin(),A.end());
int64_t ans=0;
if(A==B && B==C){
if(A%2==0)
cout<<-1<<endl;
else
cout<<0<<endl;
}else{
int64_t ans=0;
for(int i=1; ;i++){
if(A%2==0 && B%2==0 C%2==0){
int64_t a=(B+C)/2;
int64_t b=(A+C)/2;
int64_t c=(A+B)/2;
A=a; B=b; C=c;
}else break;
}cout<<ans<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:10: error: request for member 'begin' in 'A', which is of non-class type 'int64_t' {aka 'long int'}
6 | sort(A.begin(),A.end());
| ^~~~~
a.cc:6:20: error: request for member 'end' in 'A', which is of non-class type 'int64_t' {aka 'long int'}
6 | sort(A.begin(),A.end());
| ^~~
a.cc:17:24: error: expected ')' before 'C'
17 | if(A%2==0 && B%2==0 C%2==0){
| ~ ^~
| )
|
s139383465 | p03723 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
vector<int64_t>A(3);
for(int i=0;i<3;i++)
cin>>A.at(i);
sort(A.begin(),A.end());
int64_t ans=0;
if(A==B && B==C){
if(A%2==0)
cout<<-1<<endl;
else
cout<<0<<endl;
}else{
int64_t ans=0;
for(int i=1; ;i++){
if(A%2==0 && B%2==0 C%2==0){
int64_t a=(B+C)/2;
int64_t b=(A+C)/2;
int64_t c=(A+B)/2;
A=a; B=b; C=c;
}else break;
}cout<<ans<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:9: error: 'B' was not declared in this scope
9 | if(A==B && B==C){
| ^
a.cc:9:17: error: 'C' was not declared in this scope
9 | if(A==B && B==C){
| ^
a.cc:10:7: error: no match for 'operator%' (operand types are 'std::vector<long int>' and 'int')
10 | if(A%2==0)
| ~^~
| | |
| | int
| std::vector<long int>
In file included from /usr/include/c++/14/valarray:605,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
from a.cc:1:
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:10:8: note: 'std::vector<long int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
10 | if(A%2==0)
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:10:8: note: 'std::vector<long int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
10 | if(A%2==0)
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:10:8: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
10 | if(A%2==0)
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:10:8: note: 'std::vector<long int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
10 | if(A%2==0)
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:10:8: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
10 | if(A%2==0)
| ^
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const valarray<_Tp>&, const valarray<_Tp>&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:10:8: note: 'std::vector<long int>' is not derived from 'const std::valarray<_Tp>'
10 | if(A%2==0)
| ^
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:10:8: note: 'std::vector<long int>' is not derived from 'const std::valarray<_Tp>'
10 | if(A%2==0)
| ^
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:10:8: note: mismatched types 'const std::valarray<_Tp>' and 'int'
10 | if(A%2==0)
| ^
a.cc:18:9: error: no match for 'operator%' (operand types are 'std::vector<long int>' and 'int')
18 | if(A%2==0 && B%2==0 C%2==0){
| ~^~
| | |
| | int
| std::vector<long int>
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:18:10: note: 'std::vector<long int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
18 | if(A%2==0 && B%2==0 C%2==0){
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:18:10: note: 'std::vector<long int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
18 | if(A%2==0 && B%2==0 C%2==0){
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:18:10: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
18 | if(A%2==0 && B%2==0 C%2==0){
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:18:10: note: 'std::vector<long int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
18 | if(A%2==0 && B%2==0 C%2==0){
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:18:10: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
18 | if(A%2==0 && B%2==0 C%2==0){
| ^
/usr/include/c++/14/valarray:1200:1: note: candidate: |
s405463523 | p03723 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
vector<int64_t>A(3);
for(int i=0;i<3;i++)
cin>>A.at(i);
sort(A.begin(),A.end());
int64_t ans=0;
if(A=B && B=C){
if(A%2==0)
cout<<-1<<endl;
else
cout<<0<<endl;
}else{
int64_t ans=0;
for(int i=1; ;i++){
if(A%2==0 && B%2==0 C%2==0){
int64_t a=(B+C)/2;
int64_t b=(A+C)/2;
int64_t c=(A+B)/2;
A=a; B=b; C=c;
}else break;
}cout<<ans<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:8: error: 'B' was not declared in this scope
9 | if(A=B && B=C){
| ^
a.cc:9:15: error: 'C' was not declared in this scope
9 | if(A=B && B=C){
| ^
a.cc:10:7: error: no match for 'operator%' (operand types are 'std::vector<long int>' and 'int')
10 | if(A%2==0)
| ~^~
| | |
| | int
| std::vector<long int>
In file included from /usr/include/c++/14/valarray:605,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
from a.cc:1:
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:10:8: note: 'std::vector<long int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
10 | if(A%2==0)
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:10:8: note: 'std::vector<long int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
10 | if(A%2==0)
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:10:8: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
10 | if(A%2==0)
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:10:8: note: 'std::vector<long int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
10 | if(A%2==0)
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:10:8: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
10 | if(A%2==0)
| ^
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const valarray<_Tp>&, const valarray<_Tp>&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:10:8: note: 'std::vector<long int>' is not derived from 'const std::valarray<_Tp>'
10 | if(A%2==0)
| ^
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:10:8: note: 'std::vector<long int>' is not derived from 'const std::valarray<_Tp>'
10 | if(A%2==0)
| ^
/usr/include/c++/14/valarray:1200:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__modulus, _Tp>::result_type> std::operator%(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)'
1200 | _DEFINE_BINARY_OPERATOR(%, __modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1200:1: note: template argument deduction/substitution failed:
a.cc:10:8: note: mismatched types 'const std::valarray<_Tp>' and 'int'
10 | if(A%2==0)
| ^
a.cc:18:9: error: no match for 'operator%' (operand types are 'std::vector<long int>' and 'int')
18 | if(A%2==0 && B%2==0 C%2==0){
| ~^~
| | |
| | int
| std::vector<long int>
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:18:10: note: 'std::vector<long int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
18 | if(A%2==0 && B%2==0 C%2==0){
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:18:10: note: 'std::vector<long int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
18 | if(A%2==0 && B%2==0 C%2==0){
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:18:10: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
18 | if(A%2==0 && B%2==0 C%2==0){
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:18:10: note: 'std::vector<long int>' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
18 | if(A%2==0 && B%2==0 C%2==0){
| ^
/usr/include/c++/14/bits/valarray_after.h:409:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
409 | _DEFINE_EXPR_BINARY_OPERATOR(%, struct std::__modulus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:409:5: note: template argument deduction/substitution failed:
a.cc:18:10: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int'
18 | if(A%2==0 && B%2==0 C%2==0){
| ^
/usr/include/c++/14/valarray:1200:1: note: candidate: 'templa |
s329633275 | p03723 | C++ | #pragma GCC optimize("Ofast")
#include<iostream>
#include<cstdlib>
#include<cstdio>
#include<string>
#include<iomanip>
#include<algorithm>
#include<vector>
#include<math.h>
#include<utility>
using namespace std;
int main(){
long long int a, b, c;
cin >> a >> b >> c;
int cn
if(a == b && b == c && a % 2 != 0 || b % 2 != 0 || c % 2 != 0) {
cout << -1 << endl;
return 0;
}
while(a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
int ahalf, bhalf, chalf;
ahalf = a/2;
bhalf = b/2;
chalf = c/2;
a = bhalf + chalf;
b = ahalf + chalf;
c = ahalf + bhalf;
cnt++;
}
cout << cnt << endl;
} | a.cc: In function 'int main()':
a.cc:19:5: error: expected initializer before 'if'
19 | if(a == b && b == c && a % 2 != 0 || b % 2 != 0 || c % 2 != 0) {
| ^~
a.cc:32:9: error: 'cnt' was not declared in this scope; did you mean 'int'?
32 | cnt++;
| ^~~
| int
a.cc:34:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
34 | cout << cnt << endl;
| ^~~
| int
|
s442953888 | p03723 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
int nowA = A, nowB = B, nowC = C;
int time = 0;
if((A == B) && (B == C)){
if((A % 2 != 0) || (B % 2 != 0) || (C % 2 != 0)){
break;
}
time = -1;
}
else{
while((nowA % 2 == 0) && (nowB % 2 == 0) && (nowC % 2 == 0)){
time++;
nowA = (B / 2) + (C / 2);
nowB = (A / 2) + (C / 2);
nowC = (A / 2) + (B / 2);
A = nowA, B = nowB, C = nowC;
}
}
cout << time << endl;
} | a.cc: In function 'int main()':
a.cc:12:7: error: break statement not within loop or switch
12 | break;
| ^~~~~
|
s693466987 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int A(0),B(0),C(0);
cin >> A(0) >> B(0) >> C(0);
if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
cout << -1 << endl;
}
else{
int i = 0;
while(A(i)%2+B(i)%2+C(i)%2==0){
int A(i+1) =B(i)/2+C(i)/2;
int B(i+1) =C(i)/2+A(i)/2;
int C(i+1) =A(i)/2+B(i)/2;
i++;
}
cout << i << endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:11: error: 'A' cannot be used as a function
6 | cin >> A(0) >> B(0) >> C(0);
| ~^~~
a.cc:6:19: error: 'B' cannot be used as a function
6 | cin >> A(0) >> B(0) >> C(0);
| ~^~~
a.cc:6:27: error: 'C' cannot be used as a function
6 | cin >> A(0) >> B(0) >> C(0);
| ~^~~
a.cc:7:8: error: 'A' cannot be used as a function
7 | if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
| ~^~~
a.cc:7:14: error: 'B' cannot be used as a function
7 | if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
| ~^~~
a.cc:7:22: error: 'B' cannot be used as a function
7 | if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
| ~^~~
a.cc:7:28: error: 'C' cannot be used as a function
7 | if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
| ~^~~
a.cc:7:36: error: 'A' cannot be used as a function
7 | if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
| ~^~~
a.cc:12:12: error: 'A' cannot be used as a function
12 | while(A(i)%2+B(i)%2+C(i)%2==0){
| ~^~~
a.cc:12:19: error: 'B' cannot be used as a function
12 | while(A(i)%2+B(i)%2+C(i)%2==0){
| ~^~~
a.cc:12:26: error: 'C' cannot be used as a function
12 | while(A(i)%2+B(i)%2+C(i)%2==0){
| ~^~~
a.cc:13:18: error: expected ',' or ';' before '=' token
13 | int A(i+1) =B(i)/2+C(i)/2;
| ^
a.cc:14:18: error: expected ',' or ';' before '=' token
14 | int B(i+1) =C(i)/2+A(i)/2;
| ^
a.cc:15:18: error: expected ',' or ';' before '=' token
15 | int C(i+1) =A(i)/2+B(i)/2;
| ^
|
s617779256 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int A,B,C;
cin >> A(0) >> B(0) >> C(0);
if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
cout << -1 << endl;
}
else{
int i = 0;
while(A(i)%2+B(i)%2+C(i)%2==0){
A(i+1) =B(i)/2+C(i)/2;
B(i+1) =C(i)/2+A(i)/2;
C(i+1) =A(i)/2+B(i)/2;
i++;
}
cout << i << endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:11: error: 'A' cannot be used as a function
6 | cin >> A(0) >> B(0) >> C(0);
| ~^~~
a.cc:6:19: error: 'B' cannot be used as a function
6 | cin >> A(0) >> B(0) >> C(0);
| ~^~~
a.cc:6:27: error: 'C' cannot be used as a function
6 | cin >> A(0) >> B(0) >> C(0);
| ~^~~
a.cc:7:8: error: 'A' cannot be used as a function
7 | if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
| ~^~~
a.cc:7:14: error: 'B' cannot be used as a function
7 | if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
| ~^~~
a.cc:7:22: error: 'B' cannot be used as a function
7 | if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
| ~^~~
a.cc:7:28: error: 'C' cannot be used as a function
7 | if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
| ~^~~
a.cc:7:36: error: 'A' cannot be used as a function
7 | if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
| ~^~~
a.cc:12:12: error: 'A' cannot be used as a function
12 | while(A(i)%2+B(i)%2+C(i)%2==0){
| ~^~~
a.cc:12:19: error: 'B' cannot be used as a function
12 | while(A(i)%2+B(i)%2+C(i)%2==0){
| ~^~~
a.cc:12:26: error: 'C' cannot be used as a function
12 | while(A(i)%2+B(i)%2+C(i)%2==0){
| ~^~~
a.cc:13:8: error: 'A' cannot be used as a function
13 | A(i+1) =B(i)/2+C(i)/2;
| ~^~~~~
a.cc:13:16: error: 'B' cannot be used as a function
13 | A(i+1) =B(i)/2+C(i)/2;
| ~^~~
a.cc:13:23: error: 'C' cannot be used as a function
13 | A(i+1) =B(i)/2+C(i)/2;
| ~^~~
a.cc:14:8: error: 'B' cannot be used as a function
14 | B(i+1) =C(i)/2+A(i)/2;
| ~^~~~~
a.cc:14:16: error: 'C' cannot be used as a function
14 | B(i+1) =C(i)/2+A(i)/2;
| ~^~~
a.cc:14:23: error: 'A' cannot be used as a function
14 | B(i+1) =C(i)/2+A(i)/2;
| ~^~~
a.cc:15:8: error: 'C' cannot be used as a function
15 | C(i+1) =A(i)/2+B(i)/2;
| ~^~~~~
a.cc:15:16: error: 'A' cannot be used as a function
15 | C(i+1) =A(i)/2+B(i)/2;
| ~^~~
a.cc:15:23: error: 'B' cannot be used as a function
15 | C(i+1) =A(i)/2+B(i)/2;
| ~^~~
|
s610140047 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int f(int X,int Y,int Z){
int main(){
int A,B,C;
cin >> A(0) >> B(0) >> C(0);
if (A(0)==B(0) && B(0)==C(0) && A(0)%2==0){
cout << -1 << endl;
}
else{
int i = 0;
while(A(i)%2+B(i)%2+C(i)%2==0){
A(i+1) =B(i)/2+C(i)/2;
B(i+1) =C(i)/2+A(i)/2;
C(i+1) =A(i)/2+B(i)/2;
i++;
}
cout << i << endl;
}
}
| a.cc: In function 'int f(int, int, int)':
a.cc:7:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
7 | int main(){
| ^~
a.cc:7:9: note: remove parentheses to default-initialize a variable
7 | int main(){
| ^~
| --
a.cc:7:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:7:11: error: a function-definition is not allowed here before '{' token
7 | int main(){
| ^
a.cc:23:2: error: expected '}' at end of input
23 | }
| ^
a.cc:4:25: note: to match this '{'
4 | int f(int X,int Y,int Z){
| ^
a.cc:23:2: warning: no return statement in function returning non-void [-Wreturn-type]
23 | }
| ^
|
s350755377 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int A,B,C;
cin >> A >> B >> C;
if (A%4==B%4 && B%4==C%4 && A%4=2){
cout << -1 << endl;
}
else{
int i = 0;
while(A%2+B%2+C%2==0){
A =B/2+C/2;
B =C/2+A/2;
C =A/2+B/2;
i++;
}
cout << i << endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:28: error: lvalue required as left operand of assignment
7 | if (A%4==B%4 && B%4==C%4 && A%4=2){
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~
|
s484689722 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int A,B,C;
cin >> A >> B >> c;
if (A%2+B%2+C%2!=0){
cout << 0 << endl;
}
else if (A%4==B%4&&B%4==C%4){
cout << -1 << endl;
}
else {
cout << 1 << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:20: error: 'c' was not declared in this scope
6 | cin >> A >> B >> c;
| ^
|
s639773822 | p03723 | C | #include <stdio.h>
int main()
{
int A, B, C;
scanf("%d %d %d", &A, &B, &C);
if (A == B && B == C) printf("-1\n");
else {
int a, b, c, count = 0
while (A % 2 == 0 && B % 2 == 0 && C % 2 == 0) {
count++;
a = (B + C) / 2;
b = (C + A) / 2;
c = (A + B) / 2;
A = a;
B = b;
C = c;
}
printf("%d\n", count);
}
fflush(stdout);
return 0;
} | main.c: In function 'main':
main.c:11:17: error: expected ',' or ';' before 'while'
11 | while (A % 2 == 0 && B % 2 == 0 && C % 2 == 0) {
| ^~~~~
|
s375762050 | p03723 | C++ | /*-----------------------------------------------,
| __ __ |
| | |--.-----.---.-.----.----.-----.-----.| |_ |
| | _ | -__| _ | __| __| -__| _ || _||
| |_____|_____|___._|____|____|_____| __||____||
| |__| |
`-----------------------------------------------*/
#include<algorithm>
#include<array>
#include<bitset>
#include<cmath>
#include<complex>
#include<deque>
#include<functional>
#include<iomanip>
#include<iostream>
#include<iterator>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<unordered_map>
#include<unordered_set>
#include<utility>
#include<vector>
typedef long long lint; using namespace std;
#define INF 1000000000000
#define MOD 10000007
#define rep(counter, limit) for (long long counter = 0; counter < limit; counter++)
int gcd(int a, int b) { if (a % b == 0) { return(b); } else { return(gcd(b, a % b)); } }
int lcm(int a, int b) { return a * b / gcd(a, b); }
bool primenum(int a) { if (a == 1) { return false; }if (a == 2) { return true; }if (a % 2 == 0) { return false; }for (int i = 3; i < sqrt(a) + 1; i += 2) { if (a != i) { if (a % i == 0) { return false; } } }return true; }
struct setupios{setupios(){cin.tie(0);ios::sync_with_stdio(0); /*cout<<fixed<<setprecision(20);*/};}setupios;
int main() {
int a,b,c;cin>>a>>b>>c;
int ans=0;
if(a==b and (b==c and a==c)){
cout<<-1<<endl;
return 0;
}
if(a%2==1 or (b%2==1 or c%2==1)){
cout<<0<<endl;
return 0;
}
if(a%2==0 and a==b and b==c){
cout<<-1<<endl;
}
while(true){
if(ax%2==1 or(bx%2==1 or cx%2==1)){
cout<<ans<<endl;
return 0;
}else{
int ax,bx,cx;
ax=0;bx=0;cx=0;
ax=(b+c)/2;
bx=(a+c)/2;
cx=(a+b)/2;
ans++;
a=ax;
b=bx;
c=cx;
}
}
}
| a.cc: In function 'int main()':
a.cc:52:8: error: 'ax' was not declared in this scope; did you mean 'a'?
52 | if(ax%2==1 or(bx%2==1 or cx%2==1)){
| ^~
| a
a.cc:52:19: error: 'bx' was not declared in this scope; did you mean 'b'?
52 | if(ax%2==1 or(bx%2==1 or cx%2==1)){
| ^~
| b
a.cc:52:30: error: 'cx' was not declared in this scope; did you mean 'c'?
52 | if(ax%2==1 or(bx%2==1 or cx%2==1)){
| ^~
| c
a.cc:56:9: error: redeclaration of 'int ax'
56 | int ax,bx,cx;
| ^~
a.cc:52:8: note: '<typeprefixerror>ax' previously declared here
52 | if(ax%2==1 or(bx%2==1 or cx%2==1)){
| ^~
a.cc:56:12: error: redeclaration of 'int bx'
56 | int ax,bx,cx;
| ^~
a.cc:52:19: note: '<typeprefixerror>bx' previously declared here
52 | if(ax%2==1 or(bx%2==1 or cx%2==1)){
| ^~
a.cc:56:15: error: redeclaration of 'int cx'
56 | int ax,bx,cx;
| ^~
a.cc:52:30: note: '<typeprefixerror>cx' previously declared here
52 | if(ax%2==1 or(bx%2==1 or cx%2==1)){
| ^~
|
s941943248 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c;
int A,B,C;
for(int i=0; ;i++){
if(a % 2 == 1 || b % 2 == 1 || c % 2 == 1){
cout << i << endl;
return 0;
if(a == b && b == c){
cout << -1 << endl;
return 0;
}
A=a;
B=b;
C=c;
a = B/2 + C/2;
b = A/2 + C/2;
c = A/2 + B/2;
}
}
| a.cc: In function 'int main()':
a.cc:27:2: error: expected '}' at end of input
27 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s424846362 | p03723 | C++ |
def solve():
A,B,C = map(int, input().split())
ans = 0
a = A
b = B
c = C
while(True):
x = int((b + c)/ 2)
y = int((a + c)/ 2)
z = int((a + b)/2)
a = x
b = y
c = z
ans += 1
if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
print(ans)
return
elif a == A and b == B and c == C:
print(-1)
return
solve()
| a.cc:2:1: error: 'def' does not name a type
2 | def solve():
| ^~~
|
s836474755 | p03723 | C++ | #include <math.h>
#include <algorithm> //sort,二分探索,など
#include <array>
#include <bitset> //固定長bit集合
#include <cmath> //pow,logなど
#include <complex> //複素数
#include <deque> //両端アクセスのキュー
#include <functional> //sortのgreater
#include <iomanip> //setprecision(浮動小数点の出力の誤差)
#include <iostream> //入出力
#include <map> //map(辞書)s
#include <numeric> //iota(整数列の生成),gcdとlcm(c++17)
#include <queue> //キュー
#include <set> //集合
#include <stack> //スタック
#include <string> //文字列
#include <unordered_map> //イテレータあるけど順序保持しないmap
#include <unordered_set> //イテレータあるけど順序保持しないset
#include <utility> //pair
#include <vector> //可変長配列
using namespace std;
typedef long long ll;
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = (ll)(n)-1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = (a); i <= (b); i++)
#define FORD(i, a, b) for (ll i = (a); i >= (b); i--)
#define ALL(x) (x).begin(), (x).end() // sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size()) // sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x))
#define INF 1000000000000
#define MOD 10000007
#define PB push_back
#define MP make_pair
#define F first
#define S second
int main() {
ll a, b, c;
cin >> a >> b >> c;
ll n;
n = 10 ^ 9;
int count = 0;
for (ll i = 0; i < n; ++i) {
if ((a == b && b == c) && (a % 2 == 0 && b % 2 == 0 && c % 2 == 0)) {
cout << "-1" << endl;
return 0;
break;
} else if ((a % 2 != 0) || (b % 2 != 0) || (c % 2 != 0)) {
cout << "0" << endl;
return 0;
break;
} else {
while (a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
a = a / 2;
b = b / 2;
c = c / 2;
a = b + c;
b = c + a;
c = a + b;
count++;
}
}
cout << count << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:43:10: warning: result of '10^9' is 3; did you mean '1e9'? [-Wxor-used-as-pow]
43 | n = 10 ^ 9;
| ^
| --
| 1 e
a.cc:43:7: note: you can silence this warning by using a hexadecimal constant (0xa rather than 10)
43 | n = 10 ^ 9;
| ^~
| 0xa
a.cc:67:4: error: expected '}' at end of input
67 | }
| ^
a.cc:39:12: note: to match this '{'
39 | int main() {
| ^
|
s332742020 | p03723 | C++ | a,b,c = map(int,input().split())
i=0
if a==b==c :
print("-1")
else:
while a%2==0 and b%2==0 and c%2==0:
a/2
b/2
c/2
i+=1
print(i) | a.cc:1:1: error: 'a' does not name a type
1 | a,b,c = map(int,input().split())
| ^
|
s172347316 | p03723 | C++ | #include<iostream>
int main(){
int A,B,C;
cin>>A>>B>>C;
cout<<0<<endl;
} | a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | cin>>A>>B>>C;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
5 | cout<<0<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:5:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
5 | cout<<0<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s075491476 | p03723 | C++ | #include<iostream>
int main(){
int A,B,C;
cin>>A>>B>>C;
cout<<0<<endl;
} | a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | cin>>A>>B>>C;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
5 | cout<<0<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:5:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
5 | cout<<0<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s435288652 | p03723 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i = 0;i < (n);i++)
using namespace std;
using ll = long long;
using pii = pair<int,int>;
int main(){
ll a,b,c;
cin >> a >> b >> c;
if(a == b && b== c){
cout << -1 << endl;
return 0;
}
if(a%2 != 0 || b%2 != 0 || c%2 != 0){
cout << 0 << endl;
return 0;
}
int cnt = 0;
while(){
ll x = (a+b)/2;
ll y = (b+c)/2;
ll z = (a+c)/2;
a = x,b = y,c = z;
cnt++;
if(a%2 != 0 || b%2 != 0 || c%2 != 0){
cout << cnt << endl;
return 0;
}
}
} | a.cc: In function 'int main()':
a.cc:19:11: error: expected primary-expression before ')' token
19 | while(){
| ^
|
s595502436 | p03723 | C++ | A,B,C = map(int,input().split())
#print(A,B,C)
if A==B and B==C:
print(-1)
else:
count=0
while A%2==0 and B%2==0 and C%2==0:
Ax=A/2
Bx=B/2
Cx=C/2
#print(Ax,Bx,Cx)
A = int(Bx+Cx)
B = int(Cx+Ax)
C = int(Ax+Bx)
count +=1
#print(A,B,C)
print(count)
| a.cc:3:2: error: invalid preprocessing directive #print
3 | #print(A,B,C)
| ^~~~~
a.cc:13:6: error: invalid preprocessing directive #print
13 | #print(Ax,Bx,Cx)
| ^~~~~
a.cc:18:6: error: invalid preprocessing directive #print
18 | #print(A,B,C)
| ^~~~~
a.cc:1:1: error: 'A' does not name a type
1 | A,B,C = map(int,input().split())
| ^
|
s180127025 | p03723 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
#define rrep(i, n) for(int i = n-1; i >= 0; --i)
#define fi first
#define se second
using namespace std;
using lint = long long;
using uint = unsigned int;
using ulint = unsigned long long;
using ldouble = long double;
using pii = pair<int, int>;
using pli = pair<lint, lint>;
using pdd = pair<double, double>;
using pld = pair<ldouble, ldouble>;
using v1i = vector<int>;
using v1li = vector<lint>;
using v2i = vector<vector<int>>;
using v2li = vector<vector<lint>>;
using v3i = vector<vector<vector<int>>>;
using v3li = vector<vector<vector<lint>>>;
using v1b = vector<bool>;
using v2b = vector<vector<bool>>;
using v3b = vector<vector<vector<bool>>>;
using v1c = vector<char>;
using v2c = vector<vector<char>>;
using v3c = vector<vector<vector<char>>>;
constexpr lint mod1 = 1e9+7;
constexpr lint mod2 = 998244353;
int main() {
int a, b, c, d = -1, e = 0;
scanf("%d %d %d", &a, &b, &c);
while(){
if(a & 1 || b & 1 || c & 1){
d = e;
break;
}
++e;
int f = a/2, g = b/2, h = c/2;
a = g + h;
b = f + h;
c = f + g;
if(e > 1e5) break;
}
printf("%d\n", d);
return 0;
} | a.cc: In function 'int main()':
a.cc:33:9: error: expected primary-expression before ')' token
33 | while(){
| ^
|
s551441501 | p03723 | C++ | #include<bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(),v.end()
#define INF INT_MAX;
typedef long long ll;
using namespace std;
int main(){
int64_t a,b,c; cin >> a >> b >> c;
if(a==b&&b==c) {
puts("-1");
return 0;
int cont=0;
while(a%2==0&&b%2==0&&c%2==0){
int aa,bb,cc;
aa=b/2+c/2;
bb=c/2+a/2;
cc=a/2+b/2;
a=aa;
b=bb;
c=cc;
cont++;
}
cout << cont << endl;
}
| a.cc: In function 'int main()':
a.cc:30:2: error: expected '}' at end of input
30 | }
| ^
a.cc:9:11: note: to match this '{'
9 | int main(){
| ^
|
s637918432 | p03723 | C++ | #include<bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(),v.end()
#define INF INT_MAX;
typedef long long ll;
using namespace std;
int main(){
int64_t a,b,c; cin >> a >> b >> c;
if(a==b&&b==c) {
puts("-1");
return 0;
int cont=0
while(a%2==0&&b%2==0&&c%2==0){
int aa,bb,cc;
aa=b/2+c/2;
bb=c/2+a/2;
cc=a/2+b/2;
a=aa;
b=bb;
c=cc;
cont++;
}
cout << cont << endl;
}
| a.cc: In function 'int main()':
a.cc:18:3: error: expected ',' or ';' before 'while'
18 | while(a%2==0&&b%2==0&&c%2==0){
| ^~~~~
a.cc:30:2: error: expected '}' at end of input
30 | }
| ^
a.cc:9:11: note: to match this '{'
9 | int main(){
| ^
|
s933839168 | p03723 | C++ | #include <bits/stdc++.h>
#include<chrono>
using namespace std;
using ll = long long;
void change_cookie(ll A, ll B, ll C, ll &count, bool &end) {
if ((A == B) && (A == C)) {
end = false;
return;
}
else if (A % 2 == 1 || B % 2 == 1 || C % 2 == 1) {
return;
}
else {
ll a = A / 2;
ll b = B / 2;
ll c = C / 2;
count++;
end = true;
change_cookie(b+c, a+c, a+b, count, end);
}
} | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s399522534 | p03723 | C++ | a, b, c = gets.split.map(&:to_i)
ans = 0
while [a, b, c].all?(&:even?)
if a == b && b == c
ans = "-1"
break
end
a, b, c = [(b + c) / 2, (c + a) / 2, (a + b) / 2]
ans += 1
end
puts ans
| a.cc:1:1: error: 'a' does not name a type
1 | a, b, c = gets.split.map(&:to_i)
| ^
|
s240674165 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll=long long;
const ll MOD=1000000007;
int main() {
int a,b,c;
cin >> a >> b >> c;
ll cnt=0;
while(cnt<10000&&(a-1)(b-1)(c-1)%2!=0){
cnt++;
a=(b+c)/2;
b=(a+c)/2;
c=(a+b)/2;
}
if(cnt==10000){
cout << -1 << endl;
}
else
cout << cnt << endl;
} | a.cc: In function 'int main()':
a.cc:11:25: error: expression cannot be used as a function
11 | while(cnt<10000&&(a-1)(b-1)(c-1)%2!=0){
| ~~~~~^~~~~
|
s940844386 | p03723 | C++ | #include <bits/stdc++.h>
#define rep(i, n, m) for (int i = (int)(n); i < (int)(m); i++)
#define repr(i, n, m) for (int i = (int)(n) - 1; i >= (int)(m); i--)
using namespace std;
using ll = int64_t;
const int MOD = 1000000007; // 10^9+7
int main() {
ll a, b, c; cin >> a >> b >> c;
if (a == b && b == c)
{
cout << (a % 2 == 0) ? -1 : 0 << endl;
return 0;
}
ll ans = 0;
while (a % 2 == 0 && b % 2 == 0 && c % 2 == 0)
{
ll ha = a / 2, hb = b / 2, hc = c / 2;
a = hb + hc;
b = hc + ha;
c = ha + hb;
ans++;
}
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:12:39: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
12 | cout << (a % 2 == 0) ? -1 : 0 << endl;
| ~~^~~~~~~
|
s591960857 | p03723 | C++ | 454 414 444#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0;i<n;i++)
#define erep(i,n) for(int i = 0;i<=n;i++)
#define rep1(i,n) for(int i = 1;i<n;i++)
#define erep1(i,n) for(int i = 1;i<=n;i++)
typedef long long ll;
#define vint vector<int>
#define vvint vector<vector<int>>
#define vstring vector<string>
#define vll vector<ll>
#define vbool vector<bool>
#define INF 100000000
int main(){
int a,b,c;
cin >> a >> b >> c;
int ans = INF;
int count = 0;
ll aa = a + c;
ll bb = b + c;
ll cc = a + b;
while(aa%2 == 0){
aa /= 2;
count++;
}
ans = min(ans,count);
count = 0;
while(bb%2 == 0){
bb /= 2;
count++;
}
ans = min(ans,count);
count = 0;
while(cc%2 == 0){
cc /= 2;
count++;
}
ans = min(ans,count);
if(a == b && b == c){
cout << -1 << endl;
}
else cout << ans << endl;
}
| a.cc:1:12: error: stray '#' in program
1 | 454 414 444#include<bits/stdc++.h>
| ^
a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 454 414 444#include<bits/stdc++.h>
| ^~~
a.cc: In function 'int main()':
a.cc:18:3: error: 'cin' was not declared in this scope
18 | cin >> a >> b >> c;
| ^~~
a.cc:28:9: error: 'min' was not declared in this scope; did you mean 'main'?
28 | ans = min(ans,count);
| ^~~
| main
a.cc:42:9: error: 'cout' was not declared in this scope; did you mean 'count'?
42 | cout << -1 << endl;
| ^~~~
| count
a.cc:42:23: error: 'endl' was not declared in this scope
42 | cout << -1 << endl;
| ^~~~
a.cc:44:8: error: 'cout' was not declared in this scope; did you mean 'count'?
44 | else cout << ans << endl;
| ^~~~
| count
a.cc:44:23: error: 'endl' was not declared in this scope
44 | else cout << ans << endl;
| ^~~~
|
s570759512 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A , B , C;
cin >> A >> B >> C;
int sum = a + b + c;
int result = 0;
while (result >= 0) {
if (a % 2 == 1 || b % 2 == 1 || c % 2 == 1)
break;
else if (a == b && b == c) {
result = -1;
break;
}
a = (sum - a) / 2;
b = (sum - b) / 2;
c = (sum - c) / 2;
result++;
}
cout << result << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:13: error: 'a' was not declared in this scope
6 | int sum = a + b + c;
| ^
a.cc:6:17: error: 'b' was not declared in this scope
6 | int sum = a + b + c;
| ^
a.cc:6:21: error: 'c' was not declared in this scope
6 | int sum = a + b + c;
| ^
|
s799979486 | p03723 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); i++)
#define FOR(i, a, b) for(int (i) = a; (i) < (int)b; i++)
#define RREP(i, n) for(int (i)=((int)(n)-1); (i)>=0; i--)
#define RFOR(i, a, b) for(int (i) =((int)(b)-1); (i)>=(int)a; i--)
#define ALL(v) (v).begin(),(v).end()
#define MOD 1000000007
#define NIL -1
#define FI first
#define SE second
#define MP make_pair
#define PB push_back
#define SZ(x) (int)x.size()
#define SP(x) setprecision((int)x)
using namespace std ;
typedef long long ll;
typedef vector<int> vint;
typedef vector<vint> vvint;
typedef vector<string> vstr;
typedef pair<int, int> pii;
const int INF = 1e9;
const ll LINF = 1e18;
const double EPS = 1e-9;
ll gcd(ll a, ll b) {return b ? gcd(b, a % b) : a;} //最大公約数
ll lcm(ll a, ll b) {return a / gcd(a, b) * b;} //最小公倍数
//-------------------------------------------------
//
void yes(){
cout <<"Yes"<<endl ;
}
void no(){
cout <<"No"<<endl ;
}
//-------------------------------------------------
// メモ
/*
*/
//-------------------------------------------------
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
int a, b, c ;
cin >> a >> b >> c ;
int cnt = 0 :
while(1){
if(a%2==1 ||b%2==1 || a%2==1){
cout << cnt <<endl ;
return 0 ;
}
else{
cnt++ ;
int sum = a+b+c ;
a = sum - a;
b = sum - b;
c = sum - c;
a /= 2 ;
b /= 2 ;
c /= 2 ;
}
if(max{(a,b,c)}==min{(a,b,c)}){
cout << -1 <<endl ;
}
}
return 0 ;
}
| a.cc: In function 'int main()':
a.cc:58:15: error: expected ',' or ';' before ':' token
58 | int cnt = 0 :
| ^
|
s987662207 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin>>a>>b>>c;
if(a==b==c&&a % 2 == 0)
{
cout<<-1<<endl;
}
else
{
for(int i = 0;;i++)
{
if(a % 2 == 1 || b % 2 == 1 || c % 2 == 1){
cout << i << endl;
break;
}
int a2 = (b+c)/2, b2 = (a+c)/2, c2 = (a+b)/2;
a = a2,b = b2,c = c2;
}
} | a.cc: In function 'int main()':
a.cc:24:5: error: expected '}' at end of input
24 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s387242500 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int A,B,C,,n;
cin>>A,B,C;
n=0;
if((A%2==1)||(B%2==1)||(C%2==1))
{
cout << n << endl;
}
else if(A==B==C)
{
n=-1;
cout << n << endl;
}
else
{
do
{
A=(A/2)+(B/2);
B=(B/2)+(C/2);
C=(C/2)+(A/2);
n++;
}while(A%2==B%2==C%2==0);
cout << n << endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:13: error: expected unqualified-id before ',' token
6 | int A,B,C,,n;
| ^
|
s844210130 | p03723 | C++ | include <bits/stdc++.h>
using namespace std;
int main()
{
int A,B,C,n;
cin >>A>>B>>C;
if(A%2==1||B%2==1||C%2==1)
{
cout <<0<< endl;
}
else if(A==B==C)
{
cout <<-1<< endl;
}
else
{
do
{
A=(A/2)+(B/2);
B=(B/2)+(C/2);
C=(C/2)+(A/2);
n++;
}while(A%2==0&&B%2==0&&C%2==0);
cout <<n<< endl;
}
}
| a.cc:1:1: error: 'include' does not name a type
1 | include <bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
7 | cin >>A>>B>>C;
| ^~~
a.cc:10:5: error: 'cout' was not declared in this scope
10 | cout <<0<< endl;
| ^~~~
a.cc:10:16: error: 'endl' was not declared in this scope
10 | cout <<0<< endl;
| ^~~~
a.cc:14:5: error: 'cout' was not declared in this scope
14 | cout <<-1<< endl;
| ^~~~
a.cc:14:17: error: 'endl' was not declared in this scope
14 | cout <<-1<< endl;
| ^~~~
a.cc:25:5: error: 'cout' was not declared in this scope
25 | cout <<n<< endl;
| ^~~~
a.cc:25:16: error: 'endl' was not declared in this scope
25 | cout <<n<< endl;
| ^~~~
|
s459517629 | p03723 | C++ | include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c,n;
cin >>a>>b>>c;
if(a%2==1||b%2==1||c%2==1)
{
cout <<0<< endl;
}
else if(a==b==c)
{
cout <<-1<< endl;
}
else
{
do
{
a=(a/2)+(b/2);
b=(b/2)+(c/2);
c=(c/2)+(a/2);
n++;
}while(a%2==1||b%2==1||c%2==1);
cout <<n<< endl;
}
} | a.cc:1:1: error: 'include' does not name a type
1 | include <bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
7 | cin >>a>>b>>c;
| ^~~
a.cc:10:5: error: 'cout' was not declared in this scope
10 | cout <<0<< endl;
| ^~~~
a.cc:10:16: error: 'endl' was not declared in this scope
10 | cout <<0<< endl;
| ^~~~
a.cc:14:5: error: 'cout' was not declared in this scope
14 | cout <<-1<< endl;
| ^~~~
a.cc:14:17: error: 'endl' was not declared in this scope
14 | cout <<-1<< endl;
| ^~~~
a.cc:25:5: error: 'cout' was not declared in this scope
25 | cout <<n<< endl;
| ^~~~
a.cc:25:16: error: 'endl' was not declared in this scope
25 | cout <<n<< endl;
| ^~~~
|
s550769234 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int A,B,C,i,n;
cin>>A,B,C;
i=0;
n=0;
do
{
if((A%2==1)||(B%2==1)||(C%2==1))
{
i++;
}
else if(n>=1000000000000)
{
n=-1;
i++;
}
else if((A/2)%2==(B/2)%2))&&((A/2)%2==(B/2)%2))
{
A=(A/2)+(B/2);
B=(C/2)+(B/2);
C=(A/2)+(C/2);
n++;
}
else
{
i++;
}
}while(i=0) ;
cout<<n<< endl ;
}
| a.cc: In function 'int main()':
a.cc:21:30: error: expected primary-expression before ')' token
21 | else if((A/2)%2==(B/2)%2))&&((A/2)%2==(B/2)%2))
| ^
|
s451034676 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int A,B,C,i,n;
cin>>A,B,C;
i=0;
n=0;
do
{
if((A%2==1)||(B%2==1)||(C%2==1))
{
i++;
}
else if(n>=1000000000000)
{
n=-1;
i++;
}
else if(((A/2)%2==(B/2)%2))&&((A/2)%2==(B/2)%2))
{
A=(A/2)+(B/2);
B=(C/2)+(B/2);
C=(A/2)+(C/2);
n++;
}
else
{
i++;
}
}while(i=0) ;
cout<<n<< endl ;
}
| a.cc: In function 'int main()':
a.cc:21:34: error: expected identifier before '(' token
21 | else if(((A/2)%2==(B/2)%2))&&((A/2)%2==(B/2)%2))
| ^
|
s992544709 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int A,B,C,i,n;
cin>>A,B,C;
i=0;
n=0;
do
{
if(((A%2==1)||(B%2==1))||(C%2==1))
{
i++;
}
else if((A%2==B%2)&&(A%2==B%2))
{
A=(A/2)+(B/2);
B=(C/2)+(B/2);
C=(A/2)+(C/2);
n++;
}
else if(n>=10000000000000)
{
n=-1;
}
else
{
i++;
}
}while(i=0) ;
cout<<n<< endl ;
}
cin>>A,B,C;
i=0;
n=0;
do
{
if(((A%2==1)||(B%2==1))||(C%2==1))
{
i++;
}
else if((A%2==B%2)&&(A%2==B%2))
{
A=(A/2)+(B/2);
B=(C/2)+(B/2);
C=(A/2)+(C/2);
n++;
}
else if(x==1)
{
n=-1;
i++;
}
else
{
i++;
}
}while(i=0) ;
cout<<n<< endl ;
}
| a.cc:40:3: error: 'cin' does not name a type
40 | cin>>A,B,C;
| ^~~
a.cc:41:3: error: 'i' does not name a type
41 | i=0;
| ^
a.cc:42:3: error: 'n' does not name a type
42 | n=0;
| ^
a.cc:43:3: error: expected unqualified-id before 'do'
43 | do
| ^~
a.cc:65:4: error: expected unqualified-id before 'while'
65 | }while(i=0) ;
| ^~~~~
a.cc:67:3: error: 'cout' does not name a type
67 | cout<<n<< endl ;
| ^~~~
a.cc:70:1: error: expected declaration before '}' token
70 | }
| ^
|
s831520153 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int A,B,C,i,n;
int main()
{
int A,B,C,i,n;
cin>>A,B,C;
i=0;
n=0;
do
{
if(((A%2==1)||(B%2==1))||(C%2==1))
{
i++;
}
else if((A%2==B%2)&&(A%2==B%2))
{
A=(A/2)+(B/2);
B=(C/2)+(B/2);
C=(A/2)+(C/2);
n++;
}
else if(n>=10000000000000)
{
n=-1;
}
else
{
i++;
}
}while(i=0) ;
cout<<n<< endl ;
}
cin>>A,B,C;
i=0;
n=0;
do
{
if(((A%2==1)||(B%2==1))||(C%2==1))
{
i++;
}
else if((A%2==B%2)&&(A%2==B%2))
{
A=(A/2)+(B/2);
B=(C/2)+(B/2);
C=(A/2)+(C/2);
n++;
}
else if(x==1)
{
n=-1;
i++;
}
else
{
i++;
}
}while(i=0) ;
cout<<n<< endl ;
}
| a.cc: In function 'int main()':
a.cc:7:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
7 | int main()
| ^~
a.cc:7:9: note: remove parentheses to default-initialize a variable
7 | int main()
| ^~
| --
a.cc:7:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:8:1: error: a function-definition is not allowed here before '{' token
8 | {
| ^
a.cc:58:13: error: 'x' was not declared in this scope
58 | else if(x==1)
| ^
|
s560609611 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int A,B,C,i,n;
bool isinf(float x);
cin>>A,B,C;
i=0;
n=0;
do
{
if(((A%2==1)||(B%2==1))||(C%2==1))
{
i++;
}
else if((A%2==B%2)&&(A%2==B%2))
{
A=(A/2)+(B/2);
B=(C/2)+(B/2);
C=(A/2)+(C/2);
n++;
}
else if(x==1)
{
n=-1;
i++;
}
else
{
i++;
}
}while(i=0) ;
cout<<n<< endl ;
}
| a.cc: In function 'int main()':
a.cc:24:13: error: 'x' was not declared in this scope
24 | else if(x==1)
| ^
|
s185218907 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int A,B,C,i,n;
bool isinf(float x);
cin>>A,B,C;
i=0;
n=0;
do
{
if(((A%2==1)||(B%2==1))||(C%2==1))
{
i++;
}
else if((A%2==B%2)&&(A%2==B%2))
{
A=(A/2)+(B/2);
B=(C/2)+(B/2);
C=(A/2)+(C/2);
n++;
}
if else(x==1)
{
n=-1;
i++;
}
else
{
i++;
}
}while(i=0) ;
cout<<n<< endl ;
}
| a.cc: In function 'int main()':
a.cc:24:8: error: expected '(' before 'else'
24 | if else(x==1)
| ^~~~
| (
a.cc:29:5: error: 'else' without a previous 'if'
29 | else
| ^~~~
|
s189173601 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int A,B,C,i,n;
bool isinf(float x);
cin>>A,B,C;
i=0;
n=0;
do
{
if(((A%2==1)||(B%2==1))||(C%2==1))
{
i++;
}
else if((A%2==B%2)&&(A%2==B%2))
{
A=(A/2)+(B/2);
B=(C/2)+(B/2);
C=(A/2)+(C/2);
n++;
}
else
{
i++;
}
}while(i=0)
cout<<n<< endl ;
}
| a.cc: In function 'int main()':
a.cc:28:14: error: expected ';' before 'cout'
28 | }while(i=0)
| ^
| ;
29 | cout<<n<< endl ;
| ~~~~
|
s929468650 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int A,B,C,i,n;
bool isinf(float x);
cin>>A,B,C;
i=0;
n=0;
do
{
if(((A%2==1)||(B%2==1))||(C%2==1))
{
i++;
}
else if((A%2==B%2)&&(A%2==B%2))
{
A=(A/2)+(B/2);
B=(C/2)+(B/2);
C=(A/2)+(C/2);
n++;
}
else
{
i++;
}
}while(i=0)
cout<<n<< endl ;
}
| a.cc: In function 'int main()':
a.cc:28:14: error: expected ';' before 'cout'
28 | }while(i=0)
| ^
| ;
29 | cout<<n<< endl ;
| ~~~~
|
s578414126 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int A,B,C,i,n;
bool isinf(float x);
cin>>A,B,C;
i=0;
n=0;
do
{
if(((A%2==1)||(B%2==1))||(C%2==1))
{
i++;
}
else if((A%2==B%2)&&(A%2==B%2))
{
A=(A/2)+(B/2);
B=(C/2)+(B/2);
C=(A/2)+(C/2);
n++;
}
else
{
i++;
}
}while(i=0)
cout<<n<< end1 ;
}
| a.cc: In function 'int main()':
a.cc:28:14: error: expected ';' before 'cout'
28 | }while(i=0)
| ^
| ;
29 | cout<<n<< end1 ;
| ~~~~
a.cc:29:12: error: 'end1' was not declared in this scope
29 | cout<<n<< end1 ;
| ^~~~
|
s721154702 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int A,B,C,i,n;
bool isinf(float x);
cin>>A,B,c;
i=0;
n=0;
do
{
if(((A%2==1)||(B%2==1))||(C%2==1))
{
i++;
}
else if((A%2==B%2)&&(A%2==B%2))
{
A=(A/2)+(B/2);
B=(C/2)+(B/2);
C=(A/2)+(C/2);
n++;
}
else
{
i++;
}
}while(i=0)
cout<<n ;
}
| a.cc: In function 'int main()':
a.cc:8:12: error: 'c' was not declared in this scope
8 | cin>>A,B,c;
| ^
a.cc:28:14: error: expected ';' before 'cout'
28 | }while(i=0)
| ^
| ;
29 | cout<<n ;
| ~~~~
|
s375202885 | p03723 | C++ | #include <iostream>
//#include <iomanip>
//#include <string>
//#include <vector>
//#include <algorithm>
//#include <utility>
//#include <set>
//#include <map>
//#include <queue>
//#include <bitset>
//#include <math.h>
using namespace std ;
using ll = long long ;
//using ld = long double ;
//using vll = vector<ll> ;
//using vvll = vector<vll> ;
//using vc = vector<char> ;
//using vvc = vector<vc> ;
//using vb = vector<bool> ;
//using vvb = vector<vb> ;
//using pll = pair<ll,ll> ;
//ll mod = 1000000007 ;
//long double pie = acos(-1) ;
//string yorn(bool a){if(a) return"Yes" ; return "No" ;}
//string YorN(bool a){if(a) return"YES" ; return "NO" ;}
//ll gcd(long long a,long long b){if(b==0) return a ; return gcd(b,a%b) ;}
//ll lcm(long long a,long long b){return a/gcd(a,b)*b ;}
//ll sa(long long a,long long b){if(a>b) return a-b ; return b-a ;}
//void mysort(vector<long long> &a){sort(a.begin(),a.end()) ;}
//void myrev(vector<long long> &a){reverse(a.begin(),a.end()) ;}
int main(){
ll a,b,c ;
cin >> a >> b >> c ;
if(a==b&&b==c)[{]
if(a&1) cout << 0 << endl ;
else cout << -1 << endl ;
}
else{
ll ans = 0 ;
while(a%2==0&&b%2==0&&c%2==0){
ans++ ;
ll sum = a+b+c ;
a = (sum-a)/2 ;
b = (sum-b)/2 ;
c = (sum-c)/2 ;
}
cout << ans << endl ;
}
}
| a.cc: In function 'int main()':
a.cc:37:24: error: expected identifier before '{' token
37 | if(a==b&&b==c)[{]
| ^
a.cc: In lambda function:
a.cc:38:17: error: expected '{' before 'if'
38 | if(a&1) cout << 0 << endl ;
| ^~
a.cc: In function 'int main()':
a.cc:37:26: error: expected ';' before 'if'
37 | if(a==b&&b==c)[{]
| ^
| ;
38 | if(a&1) cout << 0 << endl ;
| ~~
a.cc: At global scope:
a.cc:41:9: error: expected unqualified-id before 'else'
41 | else{
| ^~~~
a.cc:52:1: error: expected declaration before '}' token
52 | }
| ^
|
s734025832 | p03723 | C++ | #pragma GCC optimize ("O3")
#include <iostream>
#include <iomanip>
#include <istream>
#include <ostream>
#include <sstream>
#include <iterator>
#include <vector>
#include <algorithm>
#include <queue>
#include <deque>
#include <list>
#include <stack>
#include <map>
#include <unordered_map>
#include <set>
#include <utility>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
#include <ctime>
#include <cctype>
#include <cstdlib>
#define IINF 10e8
#define INF 1<<30
#define MOD 1000000007
#define mod 10007
#define REP(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define REPE(i, a, n) for (ll i = a; i <= (ll)(n); i++)
#define Endl endl
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define mmax(x,y)(x>y?x:y)
#define mmin(x,y)(x<y?x:y)
#define chmax(x,y) x=mmax(x,y)
#define chmin(x,y) x=mmin(x,y)
#define all(x) (x).begin(),(x).end()
#define siz(x) (ll)(x).size()
#define PI acos(-1.0)
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef pair<int,int>Pin;
typedef pair<ll,ll>Pll;
template<class T> using V=vector<T>;
long long GCD(long long a, long long b) {return b?GCD(b,a%b):a;}
long long LCM(long long a, long long b) {return a/GCD(a,b)*b;}
int dx[4]={-1,0,1,0};
int dy[4]={0,-1,0,1};
int ddx[8]={-1,0,1,0,1,1,-1,-1};
int ddy[8]={0,-1,0,1,1,-1,1,-1};
ll cmp(pair<ll,ll>a,pair<ll,ll> b){
if(a.se!=b.se)
return a.se<b.se;
else
return a.fi<b.fi;
}
//----------------------------------------------------------------------
int dp[1<<21];
int cnt[21][100010];
int ccnt[21];
//----------------------------------------------------------------------
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
//-------------------------------
ll a,b,c;cin>>a>>b>>c;
ll ans=0;
while(a%2==0&&b%2==0&&c%2==0){
ll bb=a/2+c/2;
ll aa=b/2+c/2;
ll cc=a/2+b/2;
ans++;
a=aa;b=bb;c=cc;
if(ans==1e6){
cout<<-1<<endl;
return 0;
}
}
cout<<ans<<endl;
//-------------------------------
return 0;
}
//----------------------------------------------------------------------
#pragma GCC optimize ("O3")
#include <iostream>
#include <iomanip>
#include <istream>
#include <ostream>
#include <sstream>
#include <iterator>
#include <vector>
#include <algorithm>
#include <queue>
#include <deque>
#include <list>
#include <stack>
#include <map>
#include <unordered_map>
#include <set>
#include <utility>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
#include <ctime>
#include <cctype>
#include <cstdlib>
#define IINF 10e8
#define INF 1<<30
#define MOD 1000000007
#define mod 10007
#define REP(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define REPE(i, a, n) for (ll i = a; i <= (ll)(n); i++)
#define Endl endl
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define mmax(x,y)(x>y?x:y)
#define mmin(x,y)(x<y?x:y)
#define chmax(x,y) x=mmax(x,y)
#define chmin(x,y) x=mmin(x,y)
#define all(x) (x).begin(),(x).end()
#define siz(x) (ll)(x).size()
#define PI acos(-1.0)
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef pair<int,int>Pin;
typedef pair<ll,ll>Pll;
template<class T> using V=vector<T>;
long long GCD(long long a, long long b) {return b?GCD(b,a%b):a;}
long long LCM(long long a, long long b) {return a/GCD(a,b)*b;}
int dx[4]={-1,0,1,0};
int dy[4]={0,-1,0,1};
int ddx[8]={-1,0,1,0,1,1,-1,-1};
int ddy[8]={0,-1,0,1,1,-1,1,-1};
ll cmp(pair<ll,ll>a,pair<ll,ll> b){
if(a.se!=b.se)
return a.se<b.se;
else
return a.fi<b.fi;
}
//----------------------------------------------------------------------
int dp[1<<21];
int cnt[21][100010];
int ccnt[21];
//----------------------------------------------------------------------
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
//-------------------------------
ll a,b,c;cin>>a>>b>>c;
ll ans=0;
while(a%2==0&&b%2==0&&c%2==0){
ll bb=a/2+c/2;
ll aa=b/2+c/2;
ll cc=a/2+b/2;
ans++;
a=aa;b=bb;c=cc;
if(ans==1e6){
cout<<-1<<endl;
return 0;
}
}
cout<<ans<<endl;
//-------------------------------
return 0;
}
//----------------------------------------------------------------------
| a.cc:170:11: error: redefinition of 'long long int GCD(long long int, long long int)'
170 | long long GCD(long long a, long long b) {return b?GCD(b,a%b):a;}
| ^~~
a.cc:50:11: note: 'long long int GCD(long long int, long long int)' previously defined here
50 | long long GCD(long long a, long long b) {return b?GCD(b,a%b):a;}
| ^~~
a.cc:171:11: error: redefinition of 'long long int LCM(long long int, long long int)'
171 | long long LCM(long long a, long long b) {return a/GCD(a,b)*b;}
| ^~~
a.cc:51:11: note: 'long long int LCM(long long int, long long int)' previously defined here
51 | long long LCM(long long a, long long b) {return a/GCD(a,b)*b;}
| ^~~
a.cc:172:5: error: redefinition of 'int dx [4]'
172 | int dx[4]={-1,0,1,0};
| ^~
a.cc:52:5: note: 'int dx [4]' previously defined here
52 | int dx[4]={-1,0,1,0};
| ^~
a.cc:173:5: error: redefinition of 'int dy [4]'
173 | int dy[4]={0,-1,0,1};
| ^~
a.cc:53:5: note: 'int dy [4]' previously defined here
53 | int dy[4]={0,-1,0,1};
| ^~
a.cc:174:5: error: redefinition of 'int ddx [8]'
174 | int ddx[8]={-1,0,1,0,1,1,-1,-1};
| ^~~
a.cc:54:5: note: 'int ddx [8]' previously defined here
54 | int ddx[8]={-1,0,1,0,1,1,-1,-1};
| ^~~
a.cc:175:5: error: redefinition of 'int ddy [8]'
175 | int ddy[8]={0,-1,0,1,1,-1,1,-1};
| ^~~
a.cc:55:5: note: 'int ddy [8]' previously defined here
55 | int ddy[8]={0,-1,0,1,1,-1,1,-1};
| ^~~
a.cc:176:4: error: redefinition of 'll cmp(std::pair<long long int, long long int>, std::pair<long long int, long long int>)'
176 | ll cmp(pair<ll,ll>a,pair<ll,ll> b){
| ^~~
a.cc:56:4: note: 'll cmp(std::pair<long long int, long long int>, std::pair<long long int, long long int>)' previously defined here
56 | ll cmp(pair<ll,ll>a,pair<ll,ll> b){
| ^~~
a.cc:183:5: error: redefinition of 'int dp [2097152]'
183 | int dp[1<<21];
| ^~
a.cc:63:5: note: 'int dp [2097152]' previously declared here
63 | int dp[1<<21];
| ^~
a.cc:184:5: error: redefinition of 'int cnt [21][100010]'
184 | int cnt[21][100010];
| ^~~
a.cc:64:5: note: 'int cnt [21][100010]' previously declared here
64 | int cnt[21][100010];
| ^~~
a.cc:185:5: error: redefinition of 'int ccnt [21]'
185 | int ccnt[21];
| ^~~~
a.cc:65:5: note: 'int ccnt [21]' previously declared here
65 | int ccnt[21];
| ^~~~
a.cc:187:5: error: redefinition of 'int main()'
187 | int main(){
| ^~~~
a.cc:67:5: note: 'int main()' previously defined here
67 | int main(){
| ^~~~
|
s708915735 | p03723 | C++ | #include<bits/stdc++.h>
using namespace std;
#define outc cout
#define int long long
signed main(){
int a,g[1000000]={};
int b=0,c=1,d,e=0,f=0,l=0;
cin>>g[0]>>g[1]>>g[2];
while(1){
for(int i=0;i<3;i++){
if(g[i]%2==1) e=1;
else{
b=(g[0]/2);
c=(g[1]/2);
d=(g[2]/2);
//outc<<b<<" "<<c<<" "<<d<<"\n";
}
}
if(e) break;
if(f==100){
l=1;
break;
}
++f;
g[0]=c+d;
g[1]=b+d;
g[2]=c+b;
//cout<<g[0]<<" "<<g[1]<<" "<<g[2]<<"\n";
}
else cout<<f<<"\n";
}
| a.cc: In function 'int main()':
a.cc:31:3: error: 'else' without a previous 'if'
31 | else cout<<f<<"\n";
| ^~~~
|
s790812498 | p03723 | C++ | #include<bits/stdc++.h>
using namespace std;
#define outc cout
#define int long long
signed main(){
int a,g[1000000];
int b=0,c=1,d,e=0,f=0;
for(int i=0;i<3;i++){
cin>>g[i];
}
while(true){
for(int i=1;i<a;i++){
if(g[i]%2==1) e=1;
else{
b=g[0]/2;
c=g[1]/2;
d=g[2]/2;
}
}
if(e) break;
if(f==100){
l=1;
break;
}
++f;
g[0]=c+d;
g[1]=b+d;
g[2]=c+b;
}
if(l) cout<<"-1\n";
else cout<<f<<"n";
}
| a.cc: In function 'int main()':
a.cc:22:7: error: 'l' was not declared in this scope
22 | l=1;
| ^
a.cc:30:6: error: 'l' was not declared in this scope
30 | if(l) cout<<"-1\n";
| ^
|
s047972948 | p03723 | C++ | #include<bits/stdc++.h>
using namespace std;
#define outc cout
#define int long long
signed main(){
int a,g[1000000];
int b=0,c=1,d,e=0,f=0;
cin>>a;
for(int i=0;i<3;i++){
cin>>g[i];
}
while(true){
for(int i=1;i<a;i++){
if(g[i]%2==1) e=1;
else{
b=g[0]/2;
c=g[1]/2;
d=g[2]/2;
}
}
if(e) break;
if(f==100){
l=1;
break;
}
++f;
g[0]=c+d;
g[1]=b+d;
g[2]=c+b;
}
if(l) cout<<"-1\n";
else cout<<f<<"n";
} | a.cc: In function 'int main()':
a.cc:23:7: error: 'l' was not declared in this scope
23 | l=1;
| ^
a.cc:31:6: error: 'l' was not declared in this scope
31 | if(l) cout<<"-1\n";
| ^
|
s228992238 | p03723 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<map>
#include<unordered_map>
#include<stack>
#include<string>
#include<iomanip>
#include<algorithm>
#include<functional>
#include<cstring>
#include<utility>
#include<math.h>
using namespace std;
/**** Type Define ****/
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<ll, P> Q;
/**** Const List ****/
const ll INF = 1LL << 60;
const ll mod = 998244353;
const ll dx[4] = {1, 0, -1, 0};
const ll dy[4] = {0, -1, 0, 1};
/**** General Functions ****/
ll ketawa(ll n){
ll a=0;
while(n!=0){
a+=n%10;
n/=10;
}
return a;
}
ll RepeatSquaring(ll N, ll P, ll M){
if(P==0) return 1;
if(P%2==0){
ll t = RepeatSquaring(N, P/2, M);
return t*t % M;
}
return N * RepeatSquaring(N, P-1, M);
}
bool IsPrime(ll a){//order root a
if(a==1)return false;
for(int i=2;i*i<=a;i++){
if(a%i==0&&a!=i){
return false;
}
}
return true;
}
ll gcd(ll a, ll b) {
if (b == 0) return a;
return gcd(b, a % b);
}
ll extgcd(ll a, ll b, ll& x, ll& y) {
if (b == 0) {
x = 1, y = 0; return a;
}
ll q = a/b, g = extgcd(b, a - q*b, x, y);
ll z = x - q * y;
x = y;
y = z;
return g;
}
ll invmod (ll a, ll m) { // a^-1 mod m
ll x, y;
extgcd(a, m, x, y);
x %= m;
if (x < 0) x += m;
return x;
}
ll nCk(ll n, ll k, ll mod) {
ll ans = 1;
for (ll i = n, j = 1; j <= k; i--, j++) ans = (((ans * i) % mod) * invmod(j, mod)) % mod;
return ans;
}
ll lmin(ll a, ll b) { return a > b ? b : a; };
ll lmax(ll a, ll b) { return a > b ? a : b; };
ll lsum(ll a, ll b) { return a + b; };
/**** Zip ****/
template <typename T>
class Zip {
vector<T> d;
bool flag;
public:
Zip() {
flag = false;
}
void add(T x) {
d.push_back(x);
flag = true;
}
ll getNum(T x) { // T need to have operator < !!
if (flag) {
sort(d.begin(), d.end());
d.erase(unique(d.begin(), d.end()), d.end());
flag = false;
}
return lower_bound(d.begin(), d.end(), x) - d.begin();
}
ll size() {
if (flag) {
sort(d.begin(), d.end());
d.erase(unique(d.begin(), d.end()), d.end());
flag = false;
}
return (ll)d.size();
}
};
/**** Union Find ****/
class UnionFind {
vector<ll> par, rank; // par > 0: number, par < 0: -par
public:
void init(ll n) {
par.resize(n, 1); rank.resize(n, 0);
}
ll getSize(ll x) {
return par[find(x)];
}
ll find(ll x) {
if (par[x] > 0) return x;
return -(par[x] = -find(-par[x]));
}
void merge(ll x, ll y) {
x = find(x);
y = find(y);
if (x == y) return;
if (rank[x] < rank[y]) {
par[y] += par[x];
par[x] = -y;
} else {
par[x] += par[y];
par[y] = -x;
if (rank[x] == rank[y]) rank[x]++;
}
}
bool isSame(ll x, ll y) {
return find(x) == find(y);
}
};
/**** Segment Tree ****/
template <typename T>
class SegmentTree {
ll n;
vector<T> node;
function<T(T, T)> fun, fun2;
bool customChange;
T outValue, initValue;
public:
void init(ll num, function<T(T, T)> resultFunction, T init, T out, function<T(T, T)> changeFunction = NULL) {
// changeFunction: (input, beforevalue) => newvalue
fun = resultFunction;
fun2 = changeFunction;
customChange = changeFunction != NULL;
n = 1;
while (n < num) n *= 2;
node.resize(2 * n - 1, init);
outValue = out;
initValue = init;
}
void valueChange(ll num, T value) {
num += n-1;
if (customChange) node[num] = fun2(value, node[num]);
else node[num] = value;
while (num > 0) num = (num - 1) / 2, node[num] = fun(node[num * 2 + 1], node[num * 2 + 2]);
}
T rangeQuery(ll a, ll b, ll l = 0, ll r = -1, ll k = 0) { // [a, b)
if (r == -1) r = n;
if (a <= l && r <= b) return node[k];
if (b <= l || r <= a) return outValue;
ll mid = (l + r) / 2;
return fun(rangeQuery(a, b, l, mid, 2*k+1), rangeQuery(a, b, mid, r, 2*k+2));
}
};
/**** LIS ****/
ll lis(ll* a, ll n, ll* dp) {
fill(dp, dp + n, INF);//INFを代入
for (ll i = 0; i < n; i++) *lower_bound(dp, dp + n, a[i]) = a[i];
return (ll)(lower_bound(dp, dp + n, INF) - dp);
}
/**** main function ****/
ll n;
ll a,b,c;
ll ans;
int main(){
cin>>a>>b>>c;
if(!(a%2==0&&b%2==0&&c%2==0)){
break;
}
if(a==b&&b==c){
cout<<"-1"<<endl;
return 0;
}
while(1){
if(!(a%2==0&&b%2==0&&c%2==0)){
break;
}
ll karia=a;
ll karib=b;
ll karic=c;
a=(karib+karic)/2;
b=(karia+karic)/2;
c=(karib+karia)/2;
ans++;
}
cout<<ans<<endl;
}
| a.cc: In function 'int main()':
a.cc:209:5: error: break statement not within loop or switch
209 | break;
| ^~~~~
|
s201417681 | p03723 | C++ | #include<bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int cnt[N];
int main() {
int n, m, a, b;
cin >> n >> m >> a >> b;
for (int i = 0; i < m; i++) {
cin >> a >> b;
cnt[a]++:
cnt[b]++;
}
bool ans = true;
for (int i = 0; i < n; i++)
if (cnt[i] % 2)
ans = false;
cout << (ans? "YES": "NO") << "\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:12:17: error: expected ';' before ':' token
12 | cnt[a]++:
| ^
| ;
|
s166602959 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int A,B,C,i=0;
cin >> A >> B >> C;
if(A%2==1 || B%2 == 1 || C%2 == 1){
cout << "0" << endl;
}else{
for(i=0;;i++){
A /= 2;
B /= 2;
C /= 2;
if(A%2==1 || B%2==1||C%2==1){
if(A%2==B%2 && B%2==C%2){
i++;
}
break;
}
}
if(A==B && B == C){
cout << "-1" << endl;
}else if({
cout << i+1 << endl;
}
}
} | a.cc: In function 'int main()':
a.cc:25:18: error: expected primary-expression before '{' token
25 | }else if({
| ^
a.cc:25:18: error: expected ')' before '{' token
25 | }else if({
| ~^
| )
a.cc:28:5: error: expected primary-expression before '}' token
28 | }
| ^
|
s729550561 | p03723 | C++ | v#include <bits/stdc++.h>
#define pb push_back
#define F first
#define S second
#define all(x) x.begin(), x.end()
using namespace std;
typedef long long ll ;
typedef long double ld ;
typedef pair<ll , ll> pll ;
const ll N = 2e5 + 30 , Mod = 1e9 + 7 ;
const ll SQ = 330 ;
ll dp[4][100] , a[N];
bool ok(ll x , ll y , ll z) {
x &= 1 ;
y &= 1 ;
z &= 1 ;
return (x + y + z > 0) ;
}
int main () {
ios::sync_with_stdio(0), cin.tie(0) ;
for (int i = 0 ; i < 3 ; i ++)cin >> a[i] ;
for (int i = 0; i < 3 ; i ++) dp[0][i] = a[i] ;
if (a[0] == a[1] && a[1] == a[2] && (a[1] & 1) == 0) return cout << -1 , 0 ;
ll cnt = 0 ;
for (int i = 1 ; i < 100 ; i ++) {
if (ok(dp[i - 1][0] , dp[i - 1][1] , dp[i - 1][2])) return cout << i - 1 , 0 ;
for (int j = 0 ; j < 3 ; j ++) {
for (int k = 0 ; k < 3 ; k ++) {
if (j == k) continue ;
dp[i][j] += (dp[i - 1][k] / 2 );
}
}
}
return (0) ;
} | a.cc:1:2: error: stray '#' in program
1 | v#include <bits/stdc++.h>
| ^
a.cc:1:1: error: 'v' does not name a type
1 | v#include <bits/stdc++.h>
| ^
a.cc:9:9: error: 'pair' does not name a type
9 | typedef pair<ll , ll> pll ;
| ^~~~
a.cc: In function 'int main()':
a.cc:22:5: error: 'ios' has not been declared
22 | ios::sync_with_stdio(0), cin.tie(0) ;
| ^~~
a.cc:22:30: error: 'cin' was not declared in this scope
22 | ios::sync_with_stdio(0), cin.tie(0) ;
| ^~~
a.cc:25:65: error: 'cout' was not declared in this scope
25 | if (a[0] == a[1] && a[1] == a[2] && (a[1] & 1) == 0) return cout << -1 , 0 ;
| ^~~~
a.cc:28:68: error: 'cout' was not declared in this scope
28 | if (ok(dp[i - 1][0] , dp[i - 1][1] , dp[i - 1][2])) return cout << i - 1 , 0 ;
| ^~~~
|
s048068425 | p03723 | C++ | //libs
#include <bits/stdc++.h>
//other stuff
using namespace std;
//function call
//main
int main () {
int a,b,c,s2,s3,s1,g=0;
cin >> a >> b >> c;
if (a==b&&c==b&&a%2==0) {
cout<<-1<<endl;
return 0;
}
while (a%2==0&&b%2==0&&c%2==0) {
count++;
s1 = (b/2)+(c/2);
s2 = (c/2)+(a/2);
s3 = (a/2)+(b/2);
a=s1;
b=s2;
c=s3;
}
cout<<g<<endl;
return 0;
}
//functions
| a.cc: In function 'int main()':
a.cc:21:22: error: no post-increment operator for type
21 | count++;
| ^~
|
s935206521 | p03723 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
int main(){
int A, B, C; cin >> A >> B >> C;
int ans=0;
if(A == B == C && A%2 == 1){
cout << 0 << endl;
}
if(A == B == C && A%2 == 0){
cout << -1 << endl;
}
else{
while(A%2==0 && B%2==0 && C%2==0){
A = (B+C)/2;
B = (C+A)/2;
C = (A+B)/2;
ans++;
}
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:27:6: error: expected '}' at end of input
27 | }
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s973406310 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
bool is_odd(int x) {
return x % 2 == 1;
}
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a == b && b == c) {
if (a % 2 == 0) puts("-1");
else puts("0");
return 0;
}
int and = 0;
while (!is_odd(a) &&!is_odd(b) && !is_odd(c) ) {
int a_ = b / 2 + c / 2;
int b_ = a / 2 + c / 2;
int c_ = a / 2 + b / 2;
a = a_;
b = b_;
c = c_;
ans++;
}
cout << ans << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:18:11: error: expected unqualified-id before '=' token
18 | int and = 0;
| ^
a.cc:26:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
26 | ans++;
| ^~~
| abs
a.cc:29:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
29 | cout << ans << endl;
| ^~~
| abs
|
s427635652 | p03723 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (n); i++)
int int_len(int n) {
int s=0;
while(n!=0) s++, n/=10;
return s;
}
int int_sum(int n) {
int m=0,s=0,a=n;
while(a!=0) s++, a/=10;
for(int i=s-1;i>=0;i--) m+=n/((int)pow(10,i))-(n/((int)pow(10,i+1)))*10;
return m;
}
int vec_sum(vector<int> v){
int n=0;
for(int i=0;i<v.size();i++) n+=v[i];
return n;
}
int main() {
int x,a,b,c,ans=0;
vector<int> n(3);
rep(i,3) cin>>n[i];
if(n[0]==n[1] && n[1]==n[2]){
if(n[0]%2==0){
cout<<-1<<endl;
}else if(n[0]%2!=0){
cout<<0<<endl;
}
}
sort(n.begin(),b.end());
x=n[2]-n[0];
while(x%2==0){
x/=2;
if(a%2==0 && b%2==0 && c%2==0){
a=(n[0]+n[1])/2;
b=(n[0]+n[2])/2;
c=(n[1]+n[2])/2;
n[0]=a;
n[1]=b;
n[2]=c;
ans++;
}else{
cout<<ans<<endl;
return 0;
}
}
} | a.cc: In function 'int main()':
a.cc:35:20: error: request for member 'end' in 'b', which is of non-class type 'int'
35 | sort(n.begin(),b.end());
| ^~~
|
s661827995 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, j, n) for (ll i = j; i < n; i++)
#define all(x) (x).begin(),(x).end()
#define INF (1000000000)
#define MOD (1000000007)
#define MAX (100000)
#define pii pair<int, int>
/////////////////////////////////////////////////////////
class XY{
public:
ll x, y;
XY() {x = y = 0;}
XY(ll u, ll v) {x = u; y = v;}
};
template<typename T1, typename T2>
void chmin(T1 &a, T2 b) {if(a > b) a = b;}
template<typename T1, typename T2>
void chmax(T1 &a, T2 b) {if(a < b) a = b;}
template<typename T1, typename T2>
ll mypow(T1 a, T2 n){
if(n == 0) return 1;
if(n == 1) return a;
if(n % 2) return a * mypow(a, n - 1);
ll tmp = mypow(a, n / 2);
return tmp * tmp;
}
template<typename T>
int BS(vector<T> V, int left, int right, T key){
int mid = (left + right) / 2;
if(V[mid] <= key) left = mid;
else right = mid;
if(right - mid == 1) return left;
else return BS(V, left, right, key);
}
ll comb(ll n, ll r){
ll res = 1;
rep(i, 0, r){
res *= n - i;
res /= i + 1;
}
return res;
}
/////////////////////////////////////////////////////////
void Main() {
ll A, B, C; cin >> A >> B >> C;
if(A == B && B == C){
cout << -1 << endl;
return;
}
ll cnt = 0;
while(true){
bool ok = true;
if(A % 2) ok = false;
if(B % 2) ok = false;
if(C % 2) ok = false;
if(!ok) break;
ll a, b, c;
a = A; b = B; c = C;
A = b / 2 + c / 2;
B = a / 2 + c / 2:
C = a / 2 + b / 2;
cnt++;
}
cout << cnt << endl;
}
/////////////////////////////////////////////////////////
int main(){
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
cout << std::fixed << std::setprecision(15);
Main();
}
| a.cc: In function 'void Main()':
a.cc:70:22: error: expected ';' before ':' token
70 | B = a / 2 + c / 2:
| ^
| ;
|
s075148239 | p03723 | C++ | #include <iostream>
using namespace std;
int main(){
int A,B,C;
cin>>A>>B>>C;
int ans=0;
while (A%2==0 && B%2==0 && C%2==0){
A1=B/2+C/2;
B1=A/2+C/2;
C1=A/2+B/2;
ans++;
A=A1;
B=B1;
C=C1;
if(ans>10000){
ans=-1;
break;
}
}
cout<<ans<<endl;
}
| a.cc: In function 'int main()':
a.cc:8:5: error: 'A1' was not declared in this scope; did you mean 'A'?
8 | A1=B/2+C/2;
| ^~
| A
a.cc:9:5: error: 'B1' was not declared in this scope; did you mean 'B'?
9 | B1=A/2+C/2;
| ^~
| B
a.cc:10:5: error: 'C1' was not declared in this scope; did you mean 'C'?
10 | C1=A/2+B/2;
| ^~
| C
|
s740570002 | p03723 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
int wari(int a,int b) {
if(a%b==0)
return a/b;
else
return a/b+1;
}
int keta(int a){
double b=a;
b=log10(b);
int c=b;
return c+1;
}
int souwa(int a){
return a*(a+1)/2;
}
int lcm(int a,int b){
int d=a,e=b,f;
if(a<b)
swap(a,b);
int c,m=1;
while(m){
c=a%b;
if(c==0){
f=b;
m--;
}
else{
a=b;
b=c;
}
}
return d*e/f;
}
int gcm(int a,int b){
int d=a,e=b,f;
if(a<b)
swap(a,b);
int c,m=1;
while(m){
c=a%b;
if(c==0){
f=b;
m--;
}
else{
a=b;
b=c;
}
}
return f;
}
bool prime(int a){
if(a<2)
return false;
else if(a==2)
return true;
else if(a%2==0)
return false;
double b=sqrt(a);
for(int i=3;i<=b;i+=2){
if(a%i==0){
return false;
}
}
return true;
}
signed main(){
int a,b,c,d,e,f,g=0;
cin>>a>>b>>c;
if(a==b&&b==c&&a%2=0)
cout<<-1<<endl;
else{
while(1){
if(a%2==0&&b%2==0&&c%2==0){
g++;
d=a/2;
e=b/2;
f=c/2;
a=d+e;
b=e+f;
c=f+d;
}
else
break;
}
cout<<g<<endl;
}
} | a.cc: In function 'int main()':
a.cc:76:16: error: lvalue required as left operand of assignment
76 | if(a==b&&b==c&&a%2=0)
| ~~~~~~~~~~^~~~~
|
s157649440 | p03723 | Java | public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a=sc.nextInt();
int b=sc.nextInt();
int c=sc.nextInt();
cookieExchange(a,b,c);
}
public void cookieExchange(int a, int b, int c){
int steps = 1;
int d = a, e = b, f = c;
int newA = (b/2)+(c/2);
int newC = (b/2)+(a/2);
int newB = (a/2)+(c/2);
a=newA;
b=newB;
c=newC;
while(a%2 ==0&& c%2 ==0&& b%2 ==0){
newA = (b/2)+(c/2);
newC = (b/2)+(a/2);
newB = (a/2)+(c/2);
a=newA;
b=newB;
c=newC;
if(a == d && b == e && c == f){
steps = -1;
break;
}
steps++;
}
System.out.println(steps);
}
| Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args){
^
(use --enable-preview to enable unnamed classes)
1 error
|
s300727674 | p03723 | Java | public class Main(){
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a=sc.nextInt();
int b=sc.nextInt();
int c=sc.nextInt();
cookieExchange(a,b,c);
}
public void cookieExchange(int a, int b, int c){
int steps = 1;
int d = a, e = b, f = c;
int newA = (b/2)+(c/2);
int newC = (b/2)+(a/2);
int newB = (a/2)+(c/2);
a=newA;
b=newB;
c=newC;
while(a%2 ==0&& c%2 ==0&& b%2 ==0){
newA = (b/2)+(c/2);
newC = (b/2)+(a/2);
newB = (a/2)+(c/2);
a=newA;
b=newB;
c=newC;
if(a == d && b == e && c == f){
steps = -1;
break;
}
steps++;
}
System.out.println(steps);
}
} | Main.java:1: error: '{' expected
public class Main(){
^
1 error
|
s308034525 | p03723 | Java | class Main(){
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a=sc.nextInt();
int b=sc.nextInt();
int c=sc.nextInt();
cookieExchange(a,b,c);
}
public void cookieExchange(int a, int b, int c){
int steps = 1;
int d = a, e = b, f = c;
int newA = (b/2)+(c/2);
int newC = (b/2)+(a/2);
int newB = (a/2)+(c/2);
a=newA;
b=newB;
c=newC;
while(a%2 ==0&& c%2 ==0&& b%2 ==0){
newA = (b/2)+(c/2);
newC = (b/2)+(a/2);
newB = (a/2)+(c/2);
a=newA;
b=newB;
c=newC;
if(a == d && b == e && c == f){
steps = -1;
break;
}
steps++;
}
System.out.println(steps);
}
} | Main.java:1: error: '{' expected
class Main(){
^
1 error
|
s542592741 | p03723 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bitset>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<deque>
#include<iomanip>
using namespace std;
#define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) repr(i, 0, n)
#define INF 2e9
#define MOD 1000000007
#define LINF (long long)4e18
using ll = long long;
using Pi = pair<int,int>;
using Pl = pair<ll,ll>;
int main(){
int A,B,C; cin >> A >> B >> C;
if(A == B && B == C && !A&1 && !b&1 && !c&1){
cout << -1 << endl;
return 0;
}
int ans = 0;
rep(i,100000000){
if(A&1 | B&1 | C&1) break;
int a = A,b = B,c = C;
A = (b+c)/2;
B = (c+a)/2;
C = (a+b)/2;
ans++;
}
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:27:35: error: 'b' was not declared in this scope
27 | if(A == B && B == C && !A&1 && !b&1 && !c&1){
| ^
a.cc:27:43: error: 'c' was not declared in this scope
27 | if(A == B && B == C && !A&1 && !b&1 && !c&1){
| ^
|
s920263281 | p03723 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bitset>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<deque>
#include<iomanip>
using namespace std;
#define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) repr(i, 0, n)
#define INF 2e9
#define MOD 1000000007
#define LINF (long long)4e18
using ll = long long;
using Pi = pair<int,int>;
using Pl = pair<ll,ll>;
int main(){
int A,B,C; cin >> A >> B >> C;
if(A == B && B == C && !A&1 && !b&1 && !c&1){
cout << -1 << endl;
return 0;
}
int ans = 0;
rep(i,100000000){
if(A&1 | B&1 | C&1) break;
int a = A,b = B,c = C;
A = (b+c)/2;
B = (c+a)/2;
C = (a+b)/2;
ans++;
}
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:27:35: error: 'b' was not declared in this scope
27 | if(A == B && B == C && !A&1 && !b&1 && !c&1){
| ^
a.cc:27:43: error: 'c' was not declared in this scope
27 | if(A == B && B == C && !A&1 && !b&1 && !c&1){
| ^
|
s649771770 | p03723 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int A,B,C,ans,a,b,c;
cin>>A>>B>>C;
ans=0;
for(int i=0;i<101;i++){
if(A%2==1||B%2==1||C%2==!){
cout<<ans<<endl;
return 0;
}
else{
a=B/2+C/2;
b=A/2+C/2;
c=A/2+B/2;
ans++;
}
if(i==100){
cout<<-1<<endl;
return 0;
}
}
} | a.cc: In function 'int main()':
a.cc:9:30: error: expected primary-expression before ')' token
9 | if(A%2==1||B%2==1||C%2==!){
| ^
|
s470466628 | p03723 | C++ | #include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
int main() {
int a, b, c;
cin >> a >> b >> c;
if(a == b && b == c) {
cout << -1 << endl;
return 0;
}
int ans = 0;
int a[1000], b[1000], c[1000];
a[0] = a; b[0] = b; c[0] = c;
int i = 0;
while(a[i]%2 == 1 || b[i]%2 == 1 || c[i]%2 == 1) {
a[i+1] = (b[i] + c[i])/2;
b[i+1] = (c[i] + a[i])/2;
c[i+1] = (a[i] + b[i])/2;
ans++;
}
cout << ans;
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:19:9: error: conflicting declaration 'int a [1000]'
19 | int a[1000], b[1000], c[1000];
| ^
a.cc:12:9: note: previous declaration as 'int a'
12 | int a, b, c;
| ^
a.cc:19:18: error: conflicting declaration 'int b [1000]'
19 | int a[1000], b[1000], c[1000];
| ^
a.cc:12:12: note: previous declaration as 'int b'
12 | int a, b, c;
| ^
a.cc:19:27: error: conflicting declaration 'int c [1000]'
19 | int a[1000], b[1000], c[1000];
| ^
a.cc:12:15: note: previous declaration as 'int c'
12 | int a, b, c;
| ^
a.cc:20:6: error: invalid types 'int[int]' for array subscript
20 | a[0] = a; b[0] = b; c[0] = c;
| ^
a.cc:20:17: error: invalid types 'int[int]' for array subscript
20 | a[0] = a; b[0] = b; c[0] = c;
| ^
a.cc:20:28: error: invalid types 'int[int]' for array subscript
20 | a[0] = a; b[0] = b; c[0] = c;
| ^
a.cc:23:12: error: invalid types 'int[int]' for array subscript
23 | while(a[i]%2 == 1 || b[i]%2 == 1 || c[i]%2 == 1) {
| ^
a.cc:23:27: error: invalid types 'int[int]' for array subscript
23 | while(a[i]%2 == 1 || b[i]%2 == 1 || c[i]%2 == 1) {
| ^
a.cc:23:42: error: invalid types 'int[int]' for array subscript
23 | while(a[i]%2 == 1 || b[i]%2 == 1 || c[i]%2 == 1) {
| ^
a.cc:24:10: error: invalid types 'int[int]' for array subscript
24 | a[i+1] = (b[i] + c[i])/2;
| ^
a.cc:24:20: error: invalid types 'int[int]' for array subscript
24 | a[i+1] = (b[i] + c[i])/2;
| ^
a.cc:24:27: error: invalid types 'int[int]' for array subscript
24 | a[i+1] = (b[i] + c[i])/2;
| ^
a.cc:25:10: error: invalid types 'int[int]' for array subscript
25 | b[i+1] = (c[i] + a[i])/2;
| ^
a.cc:25:20: error: invalid types 'int[int]' for array subscript
25 | b[i+1] = (c[i] + a[i])/2;
| ^
a.cc:25:27: error: invalid types 'int[int]' for array subscript
25 | b[i+1] = (c[i] + a[i])/2;
| ^
a.cc:26:10: error: invalid types 'int[int]' for array subscript
26 | c[i+1] = (a[i] + b[i])/2;
| ^
a.cc:26:20: error: invalid types 'int[int]' for array subscript
26 | c[i+1] = (a[i] + b[i])/2;
| ^
a.cc:26:27: error: invalid types 'int[int]' for array subscript
26 | c[i+1] = (a[i] + b[i])/2;
| ^
|
s302740752 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
#define MD 1000000007
typedef long long int ll;
typedef pair<ll, ll> P;
template <typename T>
std::string tostr(const T &t){std::ostringstream os;os << t;return os.str();}
int dx[4]={1, 0, -1, 0}, dy[4]={0, 1, 0, -1};
int main(){
ll a,b,c;
cin>>a>>b>>c;
if(a==b && b==c) cout<<-1<<endl;
else{
ll cnt=0;
while(1){
if(tmpa%2==1||tmpb%2==1||tmpc%2==1){
cout<<cnt<<endl;
break;
}
cnt++;
ll tmpa=(b+c)/2,tmpb=(a+c)/2,tmpc=(a+b)/2;
a=tmpa;
b=tmpb;
c=tmpc;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:17:16: error: 'tmpa' was not declared in this scope; did you mean 'tmpnam'?
17 | if(tmpa%2==1||tmpb%2==1||tmpc%2==1){
| ^~~~
| tmpnam
a.cc:17:27: error: 'tmpb' was not declared in this scope; did you mean 'tm'?
17 | if(tmpa%2==1||tmpb%2==1||tmpc%2==1){
| ^~~~
| tm
a.cc:17:38: error: 'tmpc' was not declared in this scope; did you mean 'tm'?
17 | if(tmpa%2==1||tmpb%2==1||tmpc%2==1){
| ^~~~
| tm
|
s004042462 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long int A,B,C,cnt=0;
cin>>A>>B>>C;
if(A==B&&B==C){
if(A%2==0) cout<<-1<<endl;
else cout<<0<<endl;
else{
while(A%2!=1&&B%2!=1&&C%2!=1){
long int a=A,b=B,c=C;
A=(b+c)/2;
B=(a+c)/2;
C=(a+b)/2;
cnt++;
}
cout<<cnt<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:11:5: error: expected '}' before 'else'
11 | else{
| ^~~~
a.cc:8:19: note: to match this '{'
8 | if(A==B&&B==C){
| ^
|
s370104127 | p03723 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A,B,C;
cin >> A >> B >> C;
B = abs(A-B);
C = abs(A-C);
if (B+C == 0 && A%2 == 0) {
cout << -1 << endl;
return 0;
}
if (B+C == 0) {
cout << 0 << endl;
return 0;
}
int ans = 0;
for (;;) {
if (P % 2 + Q % 2 > 0) {
break;
}
ans++;
P = P/2;
Q = Q/2;
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:21:9: error: 'P' was not declared in this scope
21 | if (P % 2 + Q % 2 > 0) {
| ^
a.cc:21:17: error: 'Q' was not declared in this scope
21 | if (P % 2 + Q % 2 > 0) {
| ^
a.cc:25:5: error: 'P' was not declared in this scope
25 | P = P/2;
| ^
a.cc:26:5: error: 'Q' was not declared in this scope
26 | Q = Q/2;
| ^
|
s770257044 | p03723 | C | #include<stdio.h>
#include<math.h>
int judge(int x, int y, int z, int n){
int cnt, rx, ry, rz;
cnt = n;
if (x%2==1 || y%2==1 || z%2==1){
return cnt;
}
rx = y/2+z/2; ry = z/2+x/2; rz = x/2+y/2;
cnt += 1;
return judge(rx, ry, rz, cnt);
}
int main(){
int a, b, c, ans;
scanf("%d %d %d", &a, &b, &c);
if (xa%2==1 || b%2==1 || c%2==1){
printf("0");
return 0;
}
if (a==b && b==c){
printf("-1");
return 0;
}
ans = judge(a, b, c, 0);
printf("%d", ans);
return 0;
} | main.c: In function 'main':
main.c:18:9: error: 'xa' undeclared (first use in this function); did you mean 'a'?
18 | if (xa%2==1 || b%2==1 || c%2==1){
| ^~
| a
main.c:18:9: note: each undeclared identifier is reported only once for each function it appears in
|
s626207559 | p03723 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<memory.h>
using namespace std;
#define REP(i,m,n) for(int i=(int)m ; i < (int) n ; ++i )
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef pair<int,int> P;
typedef pair<ll,int> pli;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;
int main(){
ll a[3];
cin >> a[0] >> a[1] >> a[2];
sort(a,a+3,greater<int>());
ll x=a[0]-a[2],y=a[1]-a[2];
if(x==0 && y==0){
if(a[0]%2==0 && a[1]%2==0 && a[2]%2==0)){
cout << -1 << endl;
return 0;
}else{
cout << 0 << endl;
return 0;
}
}
ll cnt=0;
while(x%2==0 && y%2==0){
ll nx=max(x,y)/2;
ll ny=abs(x-y)/2;
x=nx;
y=ny;
cnt++;
}
cout << cnt << endl;
return 0;} | a.cc: In function 'int main()':
a.cc:32:44: error: expected primary-expression before ')' token
32 | if(a[0]%2==0 && a[1]%2==0 && a[2]%2==0)){
| ^
|
s713569719 | p03723 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<memory.h>
using namespace std;
#define REP(i,m,n) for(int i=(int)m ; i < (int) n ; ++i )
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef pair<int,int> P;
typedef pair<ll,int> pli;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;
int main(){
ll a[3];
cin >> a[0] >> a[1] >> a[2];
sort(a,a+3,greater<int>());
ll x=a[0]-a[2],y=a[1]-a[2];
if(x==0 && y==0){
cout << -1 << endl;
return 0;
}
ll cnt=0;
while(x%2==0 && y%2==0){
ll nx=max(x,y);
ll ny=abs(x-y)/2;
x=nx;
y=ny;
cnt++;
}
cout << min(cnt2,cnt1) << endl;
return 0;} | a.cc: In function 'int main()':
a.cc:43:15: error: 'cnt2' was not declared in this scope; did you mean 'cnt'?
43 | cout << min(cnt2,cnt1) << endl;
| ^~~~
| cnt
a.cc:43:20: error: 'cnt1' was not declared in this scope; did you mean 'cnt'?
43 | cout << min(cnt2,cnt1) << endl;
| ^~~~
| cnt
|
s655437124 | p03723 | C | #include <stdio.h>
int main(void){
int a,b,c,a1=0,b1=0;c1=0;
scanf("%d %d %d",&a,&b,&c);
while(a%2!=0){
a=a/2;
a1++;
}
while(b%2!=0){
b=b/2;
b1++;
}
while(c%2!=0){
c=c/2;
c1++;
}
if(a1>b1){
if(a1>c1){
printf("%d\n", a1);
}else{
printf("%d\n",c1 );
}
}else{
if(b1>c1){
printf("%d\n",b1 );
}else{
printf("%d\n", c1);
}
}
} | main.c: In function 'main':
main.c:4:29: error: 'c1' undeclared (first use in this function); did you mean 'b1'?
4 | int a,b,c,a1=0,b1=0;c1=0;
| ^~
| b1
main.c:4:29: note: each undeclared identifier is reported only once for each function it appears in
|
s079573086 | p03723 | C++ | #pragma region _head
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
#include<map>
#include<set>
#include<iomanip>
#include<queue>
#include<stack>
#include<numeric>
#include<utility>
#include<regex>
#pragma region _define
#define int LL
#define f(i,a,b) for(LL i=a;i<b;i++)
#define f_vI(v,n) f(i,0,n)cin>>v[i]
#define f_v2I(v1,v2,n) f(i,0,n)cin>>v1[i]>>v2[i]
#define f_v3I(v1,v2,v3,n) f(i,0,n)cin>>v1[i]>>v2[i]>>v3[i]
#define f_vO(v,n) f(i,0,n)cout<<v[i]<<endl
#define ei else if
#define all(a) a.begin(),a.end()
#define size(s) ((LL)s.size())
#define F first
#define S second
#define check() cout<<"! ! !"
#define endl "\n"
#define _y() cout<<"Yes"<<endl
#define _Y() cout<<"YES"<<endl
#define _n() cout<<"No"<<endl
#define _N() cout<<"NO"<<endl
#define int_INF 1<<29
#define ll_INF 1LL<<60
#define MOD 1000000007
#pragma endregion
#pragma region _using
using namespace std;
using LL = long long;
using st = string;
using vi = vector<LL>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vc = vector<char>;
using vs = vector<st>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvvb = vector<vvb>;
using qi = queue<LL>;
using qc = queue<char>;
using qs = queue<st>;
using si = stack<LL>;
using sc = stack<char>;
using ss = stack<st>;
using pi = pair<LL, LL>;
using mll = map<LL, LL>;
using vpi = vector<pi>;
#pragma endregion
#pragma region _graph
#define node 50 //グラフの最大位数 適宜変更
//bool graph[node][node]; bool visited[node] = { false };
#define link(a,b,m) f(i,0,m){cin>>a[i]>>b[i]; a[i]--; b[i]--; graph[a[i]][b[i]]=graph[b[i]][a[i]]=true;}
#pragma endregion
LL gcd(LL a, LL b) {
LL r;
while ((r = a % b) != 0) {
a = b;
b = r;
}
return b;
}
LL lcm(LL a, LL b) {
return (a / gcd(a, b) * b);
}
//素数判定
bool is_prime(int n) {
for (int i = 2; i*i <= n; i++) {
if (n % i == 0) {
return false;
}
}
return true;
}
//階乗計算
LL factorial(LL n) {
LL a = 1, ret = 1;
while (a < n) {
a++;
ret *= a;
ret %= MOD;
}
return ret;
}
#pragma endregion
/*****************************************************************************/
signed main(void) {
cin.tie(0); ios::sync_with_stdio(false);
int a, b, c;
cin >> a >> b >> c;
int ans = 0;
if (a == b && b == c) {
cout << -1;
}
else {
while (true) {
if (a % 2 == 0 && b % 2 == 0 && c % 2 = 0) {
int a1 = a / 2, b1 = b / 2, c1 = c / 2;
a = a1 + b1;
b = a1 + c1;
c = a1 + b1;
ans++;
}
else {
cout << ans;
return 0;
}
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:127:54: error: lvalue required as left operand of assignment
127 | if (a % 2 == 0 && b % 2 == 0 && c % 2 = 0) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
|
s304422773 | p03723 | C++ | /*#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <array>
#include <vector>
#include <deque>
#include <set>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <unordered_map>
#include <unordered_set>
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define SORT(c) sort((c).begin(),(c).end())
typedef long long ll;
const ll INF = LLONG_MAX - 100;
const ll mod = 1e9 + 7;
const int MAX_N = 5e5 + 5;
int dx[] = { -1LL,0,1LL,0 }, dy[] = { 0,1LL,0,-1LL };
vector<ll> prime;
ll inv[MAX_N], fac[MAX_N];
template <class T = ll> T in() { T x; cin >> x; return (x); }
inline ll GCD(ll a, ll b) { ll c; while (b != 0) { c = a % b; a = b; b = c; }return a; }
inline ll LCM(ll a, ll b) { return a * b / GCD(a, b); }
inline ll POW(ll a, ll b) { ll c = 1LL; while (b > 0) { if (b & 1LL) { c = a * c%mod; }a = a * a%mod; b >>= 1LL; }return c; }
inline void _nCr() { fac[0] = 1LL; for (int i = 1LL; i < MAX_N; i++) { fac[i] = fac[i - 1LL] * i%mod; }for (int i = 0; i < MAX_N; i++) { inv[i] = POW(fac[i], mod - 2); } }
inline ll nCr(ll n, ll r) { return (fac[n] * inv[r] % mod)*inv[n - r] % mod; }
inline void PRI(ll n) { bool a[n + 1LL]; for (int i = 0; i < n + 1LL; i++) { a[i] = 1LL; }for (int i = 2; i < n + 1LL; i++) { if (a[i]) { prime.pb(i); ll b = i; while (b <= n) { a[b] = 0; b += i; } } } }
typedef pair<int, pair<int, int>> edge;
class UnionFind {
private:
vector<int> par;
public:
UnionFind(int N) { par = vector<int>(N, -1LL); }
int find(int x);
ll size(int x);
void unite(int x, int y);
bool same(int x, int y);
};
class Kruskal {
private:
UnionFind *uf;
vector<edge> e;
public:
vector<edge> mst;
Kruskal(int N) { uf = new UnionFind(N); }
void add(int x, int y, ll z);
void run();
};
//----UnionFind-------------------------------
int UnionFind::find(int x) {
if (par[x] < 0) return x;
else return par[x] = find(par[x]);
}
ll UnionFind::size(int x) {
return -par[find(x)];
}
void UnionFind::unite(int x, int y) {
x = find(x);
y = find(y);
//大きい方に小さい方をくっ付ける
if (size(x) < size(y)) swap(x, y);
par[x] += par[y];
par[y] = x;
}
bool UnionFind::same(int x, int y) {
x = find(x);
y = find(y);
return x == y;
}
//----Kruskal-------------------------------
void Kruskal::add(int x, int y, ll z) {
//x < y
if (x > y) swap(x, y);
e.push_back({ z,{x,y} });
}
void Kruskal::run() {
sort(e.begin(), e.end());
e.erase(unique(e.begin(), e.end()), e.end());
for (auto x : e) {
if (uf->same(x.second.first, x.second.second)) {
continue;
}
else {
mst.push_back(x);
uf->unite(x.second.first, x.second.second);
}
}
}
void B() {cout << "Borys" << endl;}
void A() {cout << "Alice" << endl;}
signed main() {
int a,b,c;
cin >> a >> b >> c;
if (a == b && b == c) {cout << -1 << endl;}
int ans = 0;
else {
while (a % 2 != 1 && b % 2 != 1 && c % 2 != 1) {
ans++;
int na,nb,nc;
na = b/2 + c/2;
nb = a/2 + c/2;
nc = b/2 + a/2;
a = na;b = nb;c = nc;
}
cout << ans << endl;
}
} | a.cc: In function 'int main()':
a.cc:133:9: error: 'else' without a previous 'if'
133 | else {
| ^~~~
|
s907294755 | p03723 | C++ | /*
オーダー
10**6 余裕を持って間に合う
10**7 おそらく間に合う 余裕を持って間に合う
10**8 非常にシンプルな処理でない限り厳しい おそらく間に合う
10**9 非常にシンプルな処理でない限り厳しい
logn :OK
n :10^7
nlogn :10^6
n**2 :10^4
n**3 :300
2**n :20
n! :10
// 各桁の和を計算する関数
int findSumOfDigits(int n) {
int sum = 0;
while (n > 0) { // n が 0 になるまで
sum += n % 10;
n /= 10;
}
return sum;
}
sort(a, a + N, greater<int>()); // a[0:N] を大きい順にソート
int num[110] = {0}; // バケット
for (int i = 0; i < N; ++i) {
num[d[i]]++; // d[i] が 1 個増える
}
map<string, int> mp; // 連想配列 map<キー型, 値型> オブジェクト名
for (int i = 0; i < N; ++i) {
auto itr = mp.find(s[i]); // s[i] が設定されているか?
if(itr != mp.end() ) {
mp[s[i]] += 1;
}
else {
mp[s[i]] += 1 ;
}
}
stack<int> s; //intをデータとするスタックを用意
s.push(1); //{} -> {1}
printf("%d\n", s.top()); // 3
s.pop();
queue<int> que; //intをデータとするキューを用意
que.push(1); //{} -> {1}
printf("%d\n", que.front()); // 1
que.pop();
*/
#include <iostream>
#include <set>
#include <map>
#include <string>
#include <math.h>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <bitset>
#include <string.h>
using namespace std;
// #define for(i,a,b) for (int i=(a);i<(b);++i)
typedef long long ll;
typedef pair<ll,ll> P;
#define REP(i,n) for(long long i = 0; i < (long long)(n); i++)
#define pb push_back // vectorに要素追加
#define INF (ll)1e18
// int
// // 各桁の和を計算する関数
// int findSumOfDigits(int n) {
// int amari = 0;
// int keta = 0;
// while (n > 0) { // n が 0 になるまで
// amari += n % 2;
// if (keta%2==0)
// n /= 10;
// }
// return sum;
// }
ll gcd(ll a, ll b) {
if(b == 0) return a;
return gcd(b, a % b);
}
// const ll MAX_N = 1e5;
// ll N;
// ll h[MAX_N];
// ll dp[MAX_N+1]; // メモ化テーブル
// // i番目以降の品物から重さの総和がj以下になるように選ぶ
// void rec(ll i){
// if (i==0) dp[i] = 0;
// else if (i==1) dp[i] = abs(h[1]-h[0]);
// else dp[i] = min(dp[i-1]+abs(h[i]-h[i-1]), dp[i-2]+abs(h[i]-h[i-2]));
// return;
// }
int main() {
// 入力
ll A,B,C;cin>>A>>B>>C;
// 解法
ll ans = 0;
while ((A!=B | B!=C) & (A%2+B%2+C%2==0)){
ll a,b,c;
a = B/2 + C/2;
b = A/2 + C/2;
c = B/2 + A/2;
A=a;B=b;C=c;ans++;
}
else if (A==B & B==C & A%2==0) ans = -1;
//出力
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:120:9: error: 'else' without a previous 'if'
120 | else if (A==B & B==C & A%2==0) ans = -1;
| ^~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.