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 ;
ret... | 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)... | 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
... |
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)... | 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);
| ... |
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... | 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... |
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... | 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 ... |
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) /... | 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){
An... | 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 d... |
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... | 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)... |
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... | 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%23incl... |
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;
}
els... | 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 ... | 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... | 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 sc... | 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... | 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... | 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<<... | 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.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 ... |
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){
... | 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... |
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 << end... | 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... | 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; ///< Lin... |
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;
... | 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... | 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)... | 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.b... |
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=... | 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... |
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... | 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 ... |
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.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:3... |
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... | 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... | 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... |
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)/... | 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... |
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... | 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... |
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("%... | 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++ | /*-----------------------------------------------,
| __ __ |
| | |--.-----.---.-.----.----.-----.-----.| |_ |
| | _ | -__| _ | __| __| -__| _ || _||
| |_____|_____|___._|____|____|_____| __||____||
| |__| |
`-------------... | 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)){
| ... |
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;
r... | 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:
p... | 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(浮動小数点の出力の誤差)
#includ... | 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;
... |
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... |
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... |
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... | 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'... |
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>;
usi... | 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.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.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 = ... | /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 << ... | 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)
{
... | 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 v... | 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 | ... |
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.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 =... |
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 100000... | 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 =... | 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++... | 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=... | 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;
| ^~... |
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=... | 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;
| ^~... |
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);
... | 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);
... | 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>=100... | 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: e... |
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);
... | 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... |
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++;
... | 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++;
... | 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++;
... | 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++;
... | 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++;
... | 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++;
... | 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> ;
//u... | 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 functio... |
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 <utili... | 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)... |
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<<" "... | 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;
}
}
... | 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;
... | 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... | 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 = fals... | 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){
... | 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-expre... |
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... | 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:... |
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);
... | 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{
... | 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_ =... | 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; d... |
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;
}... | 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{... | 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 declare... |
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);
... | 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)... | 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;
... | 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;
i... | 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
#d... | 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
#d... | 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<... | 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;
re... | 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[10... |
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... | 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 | ... |
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;
... | 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) {... | 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 | ... |
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("%... | 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 )
#d... | 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 )
#d... | 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) << e... |
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... | 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 i... |
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++)
#d... | 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... | 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 ... | 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.