submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s932047596
p04033
C
#incldue<stdio.h> int main(void){ int a,b; scanf("%d%d",&a,&b); if(a>0&&b>0)printf("Positive"); else if(a<=0&&b>=0)printf("Zero"); else if(a<0&&b<0)printf("Positive"); return 0; }
main.c:1:2: error: invalid preprocessing directive #incldue; did you mean #include? 1 | #incldue<stdio.h> | ^~~~~~~ | include main.c: In function 'main': main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | scanf("%d%d",&a,&b); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | #incldue<stdio.h> main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 4 | scanf("%d%d",&a,&b); | ^~~~~ main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:5:15: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 5 | if(a>0&&b>0)printf("Positive"); | ^~~~~~ main.c:5:15: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:5:15: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:5:15: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:6:22: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 6 | else if(a<=0&&b>=0)printf("Zero"); | ^~~~~~ main.c:6:22: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:7:20: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 7 | else if(a<0&&b<0)printf("Positive"); | ^~~~~~ main.c:7:20: note: include '<stdio.h>' or provide a declaration of 'printf'
s959782120
p04033
C++
#include <bits/stdc++.h> #define int long long #define pb push_back #define l first #define r second using namespace std; const int maxn = signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int a, b; cin >> a >> b; if (a > 0) cout << "Positive"; else if (a * b <= 0) cout << "Zero"; else cout << ((b - a + 1) % 2 ? "Negative" : "Positive"); return 0; }
a.cc:10:1: error: expected primary-expression before 'signed' 10 | signed main() { | ^~~~~~
s446239295
p04033
C++
#include<iostream> #include<algorithm> #include<cmath> #include<cstdio> #include<string> #include<cstring> #include<cstdlib> using namespace std; long long a,b; int main() { cin>>a>>b; else if(b>=0&&a<=0)cout<<"Zero"<<endl; else if(a>0)cout<<"Positive"<<endl; else if(abs(b-a+1)%2==1)cout<<"Negative"<<endl; else cout<<"Positive"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:13:3: error: 'else' without a previous 'if' 13 | else if(b>=0&&a<=0)cout<<"Zero"<<endl; | ^~~~
s113123579
p04033
C++
// 002 A - Range Product 2016/07/31 #include <bits/stdc++.h> #define rep(i ,n) for(int i=0;i<(int)(n);++i) using namespace std; typedef long long int int64; typedef unsigned long long uint64; int main(){ int64 a , b; cin >> a >> b; int64 pruduct=1; for(int i=a ; i <=b ; ++i ){ if(i==0) { cout << 0 << endl; return 0; } product*=i; } if(product > 0 ) cout << "Positive" << endl; else cout << "Negative" << endl; }
a.cc: In function 'int main()': a.cc:13:9: error: 'product' was not declared in this scope; did you mean 'pruduct'? 13 | product*=i; | ^~~~~~~ | pruduct a.cc:15:8: error: 'product' was not declared in this scope; did you mean 'pruduct'? 15 | if(product > 0 ) cout << "Positive" << endl; | ^~~~~~~ | pruduct
s917516812
p04033
C++
#include <iostream> using namespace std; int main() { int a, b, sum = 1; cin >> a >> b; for(int i = a; i <= b; i++) { sum *= i; } if(sum > 0) { cout << "Positive"; } else if(num < 0) { cout << "Negative"; } else { cout << "Zero"; } return 0; }
a.cc: In function 'int main()': a.cc:15:17: error: 'num' was not declared in this scope; did you mean 'sum'? 15 | else if(num < 0) | ^~~ | sum
s286496577
p04033
C++
#include<bits/stdc++.h> using namespace std; int main() { int a, b, sum = 1; cin >> a >> b; for(int i = a; i <= b; i++) { sum *= i; } if(sum > 0) cout << "Positive"; else if(num < 0) cout << "Negative"; else cout << "Zero"; return 0; }
a.cc: In function 'int main()': a.cc:11:13: error: 'num' was not declared in this scope; did you mean 'sum'? 11 | else if(num < 0) cout << "Negative"; | ^~~ | sum
s685256511
p04033
C++
#include<iostream> #include<cmath> using namespace std; int main() { int a,b,s=1; cin>>a>>b; if(a>0) cout<<"Positive"<<endl; else if(a==0||a<0&&b>0) cout<<"Zero"<<endl; else if((abs(b)-abs(a))2!=0) cout<<"Positive"<<endl; else cout<<"Negative"<<endl; }
a.cc: In function 'int main()': a.cc:14:31: error: expected ')' before numeric constant 14 | if((abs(b)-abs(a))2!=0) | ~ ^ | )
s977492101
p04033
C++
#include<iostream> using namespace std; int main() { int a,b,s=1; cin>>a>>b; if(a>0) cout<<"Positive"<<endl; else if(a==0||a<0&&b>0) cout<<"Zero"<<endl; else if((abs(b)-abs(a))2!=0) cout<<"Positive"<<endl; else cout<<"Negative"<<endl; }
a.cc: In function 'int main()': a.cc:13:31: error: expected ')' before numeric constant 13 | if((abs(b)-abs(a))2!=0) | ~ ^ | )
s317761619
p04033
C++
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #define ll long long #define vi vector<int> #define pi pair<int, int> #define pb push_back #define ppb pop_back #pragma comment(linker, "/stack:200000000") #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") using namespace std; using namespace __gnu_pbds; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set; const int N = 2e5 + 667; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); ll a, b; cin >> a >> b; ll c = b + a; if(a == b){ if(a < 0) cout << "Negative" else if(a > 0) cout << "Positive"; else cout << "Zero"; return 0; } if(b >= 0 && a <=0){ cout << "Zero"; return 0; } if(a > 0 && b > 0){ cout << "Positive"; return 0; } if(c+1 % 2 == 0){ cout << "Positive"; } else{ cout << "Negative"; } return 0; }
a.cc: In function 'int main()': a.cc:29:37: error: expected ';' before 'else' 29 | if(a < 0) cout << "Negative" | ^ | ; 30 | else if(a > 0) cout << "Positive"; | ~~~~
s503344048
p04033
C++
#include <bits/stdc++.h> using namespace std; int main () { int a, b; cin >> a >> b; if(a > 0 && b > 0)cout << "Positive" << endl; else if(a <= 0 && 0 <= b)cout << "Zero" << endl; else cout << ((b - a + 1) % 2 == 0?"Positive":"Negative"); cout << << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:12: error: expected primary-expression before '<<' token 9 | cout << << endl; | ^~
s532049047
p04033
C++
#include<iostream> using namespace std; int main() { long long a,b; cin>>a>>b; if((a>0&&b<0)||(a<0&&b>0))cout<<"Zero"; else if(a>0&&b>0)cout<<"Positive"; else if(a<0&&b<0) if((a-b)%2=!0)cout<<"Nagative"; else cout<<"Positive"; else if(a==0||b==0)cout<<"Zero"; }
a.cc: In function 'int main()': a.cc:10:13: error: lvalue required as left operand of assignment 10 | if((a-b)%2=!0)cout<<"Nagative"; | ~~~~~^~
s435832052
p04033
C++
#include<bits/stdc++.h"> using namespace std; int a,b; int main(){ cin>>a>>b; if(a>0)cout<<"Positive"; else if(a==0||(a<0&&b>0))cout<<"Zero"; else if((abs(b)-abs(a))%2!=0)cout<<"Positive"; else cout<<"Negative"; return 0; }
a.cc:1:9: fatal error: bits/stdc++.h": No such file or directory 1 | #include<bits/stdc++.h"> | ^~~~~~~~~~~~~~~~ compilation terminated.
s628049566
p04033
C++
#include"bits/stdc++.h" using namespace std; int a,b; int main(){ cin>>a>>b; if(a>0)cout<<"Positive"; else if(a==0||(a<0&&b>0))cout<<"Zero"; else if((abs(b)-abs(a))%2!=0)cout<<"Positive"; else cout<<"Negative"; return 0; }
a.cc: In function 'int main()': a.cc:12:1: error: '\U0000ff5d' was not declared in this scope 12 | } | ^~ a.cc:12:3: error: expected '}' at end of input 12 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s081056731
p04033
C++
#include"bits/stdc++.h" using namespace std; int a,b; int main(){ cin>>a>>b; if(a>0)cout<<"Positive"; else if(a==0||(a<0&&b>0))cout<<"Zero"; else if((abs(b)-abs(a))%2!=0)cout<<"Positive"; else cout<<"Negative"; return 0;
a.cc: In function 'int main()': a.cc:11:14: error: expected '}' at end of input 11 | return 0; | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s351996727
p04033
C++
#include<bits/stdc++.h> #define rep(i,n) for(int i=0; i<(n); i++) #define reps(i,n) for(int i=1; i<(n); i++) #define pii pair<int,int> #define gsort(x,n) sort((x),(x)+(n),greater<int>()) #define all(x) (x).begin(), (x).end() #define int int64_t #define ll long long #define re(s) reverse((s).begin(),(s).end()) #define setout(n,x) setw(n) << setfill(x) #define Fixed fixed << setprecision(10) const long long mod = 1000000007; using namespace std; signed main(){ int a,b; cin>>a>>b; if(a > 0){ cout<<"Positive"<<'\n'; }else if(a <= b && b < 0){ if(b-a+1 % 2 != 0){ cout<<"Positive"<<'\n'; }else{ cout<<"Negative"<<'\n'; } }else{ cout<<"Zero"<<'\n'; }#include<bits/stdc++.h> #define rep(i,n) for(int i=0; i<(n); i++) #define reps(i,n) for(int i=1; i<(n); i++) #define pii pair<int,int> #define gsort(x,n) sort((x),(x)+(n),greater<int>()) #define all(x) (x).begin(), (x).end() #define int int64_t #define ll long long #define re(s) reverse((s).begin(),(s).end()) #define setout(n,x) setw(n) << setfill(x) #define Fixed fixed << setprecision(10) const long long mod = 1000000007; using namespace std; signed main(){ int a,b; cin>>a>>b; if(a > 0){ cout<<"Positive"<<'\n'; }else if(a <= b && b < 0){ if(b-a+1 % 2 != 0){ cout<<"Positive"<<'\n'; }else{ cout<<"Negative"<<'\n'; } }else{ cout<<"Zero"<<'\n'; } } }
a.cc:31:6: error: stray '#' in program 31 | }#include<bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:31:7: error: 'include' was not declared in this scope 31 | }#include<bits/stdc++.h> | ^~~~~~~ a.cc:31:15: error: 'bits' was not declared in this scope 31 | }#include<bits/stdc++.h> | ^~~~ a.cc:31:20: error: 'stdc' was not declared in this scope; did you mean 'std'? 31 | }#include<bits/stdc++.h> | ^~~~ | std a.cc:43:1: error: expected primary-expression before 'const' 43 | const long long mod = 1000000007; | ^~~~~ a.cc:46:12: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 46 | signed main(){ | ^~ a.cc:46:12: note: remove parentheses to default-initialize a variable 46 | signed main(){ | ^~ | -- a.cc:46:12: note: or replace parentheses with braces to value-initialize a variable a.cc:46:14: error: a function-definition is not allowed here before '{' token 46 | signed main(){ | ^
s315846514
p04033
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long a,b; cin>>a>>b; if(a>=1){ cout << "Positive"; } else if(b<=-1&&(b-a)%2==1){ cout << "Positive"; } else if(b<=-1&&(b-a)%2==0){ cout << "Negative"; } else{ cout << "Zero"; } cout << endl;
a.cc: In function 'int main()': a.cc:18:16: error: expected '}' at end of input 18 | cout << endl; | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s262060221
p04033
C++
-3 -1
a.cc:1:1: error: expected unqualified-id before '-' token 1 | -3 -1 | ^
s954877639
p04033
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; x=min(a,b); y=max(a,b); int sum=1; for(int i=x;i<=y;i++) sum*=i; if(sum>0) printf("Positive\n"); else if(sum<0) printf("Negative\n"); else printf("Zero"); return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'x' was not declared in this scope 6 | x=min(a,b); y=max(a,b); | ^ a.cc:6:21: error: 'y' was not declared in this scope 6 | x=min(a,b); y=max(a,b); | ^
s488561904
p04033
C++
include<bits/stdc++.h> using namespace std; #define ll long long int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll a,b; cin >> a >> b; if (a > 0) cout << "Positive" << endl; else if (a <= 0 && b >= 0) cout << "Zero" << endl; else { ll n = b-a+1; if (n%2 == 1) cout << "Negative" << endl; else cout << "Positive" << endl; } return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include<bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'ios' has not been declared 6 | ios::sync_with_stdio(false); | ^~~ a.cc:7:3: error: 'cin' was not declared in this scope 7 | cin.tie(nullptr); | ^~~ a.cc:9:14: error: 'cout' was not declared in this scope 9 | if (a > 0) cout << "Positive" << endl; | ^~~~ a.cc:9:36: error: 'endl' was not declared in this scope 9 | if (a > 0) cout << "Positive" << endl; | ^~~~ a.cc:10:30: error: 'cout' was not declared in this scope 10 | else if (a <= 0 && b >= 0) cout << "Zero" << endl; | ^~~~ a.cc:10:48: error: 'endl' was not declared in this scope 10 | else if (a <= 0 && b >= 0) cout << "Zero" << endl; | ^~~~ a.cc:13:19: error: 'cout' was not declared in this scope 13 | if (n%2 == 1) cout << "Negative" << endl; | ^~~~ a.cc:13:41: error: 'endl' was not declared in this scope 13 | if (n%2 == 1) cout << "Negative" << endl; | ^~~~ a.cc:14:10: error: 'cout' was not declared in this scope 14 | else cout << "Positive" << endl; | ^~~~ a.cc:14:32: error: 'endl' was not declared in this scope 14 | else cout << "Positive" << endl; | ^~~~
s435766213
p04033
C++
#include<bits/stdc++.h> using namespace std int main() { int a,b,c=0; cin>>a>>b; if(a>0&&b>0)//如果相乘得数都为正,则直接输出Positive { cout<<"Positive"; return 0; } else if(a<0&&b<0)/*如果都为负,分相乘的数是积数,则输出Negative,否则输出Positive*/ { c=b-a+1; if(c%2!=0)cout<<"Negative"; else cout<<"Positive"; return 0; } else if(a<0||b>0)cout<<"Zero";//如果相乘的数包括零,则输出Zero return 0; }
a.cc:2:20: error: expected ';' before 'int' 2 | using namespace std | ^ | ; 3 | int main() | ~~~ a.cc: In function 'int main()': a.cc:10:16: error: unable to find numeric literal operator 'operator""\U0000ff1b' 10 | return 0; | ^~~ a.cc:10:19: error: expected ';' before '}' token 10 | return 0; | ^ | ; 11 | } | ~
s746774393
p04033
C++
#include<bits/stdc++.h> using namespace std int main() { int a,b,c=0; cin>>a>>b; if(a>0&&b>0)//如果相乘得数都为正,则直接输出Positive { cout<<"Positive"; return 0; } else if(a<0&&b<0)/*如果都为负,分相乘的数是积数,则输出Negative,否则输出Positive*/ { c=b-a+1; if(c%2!=0)cout<<"Negative"; else cout<<"Positive"; return 0; } else if(a<0||b>0)cout<<"Zero";//如果相乘的数包括零,则输出Zero return 0; }
a.cc:2:20: error: expected ';' before 'int' 2 | using namespace std | ^ | ; 3 | int main() | ~~~ a.cc: In function 'int main()': a.cc:10:16: error: unable to find numeric literal operator 'operator""\U0000ff1b' 10 | return 0; | ^~~ a.cc:10:19: error: expected ';' before '}' token 10 | return 0; | ^ | ; 11 | } | ~
s980454938
p04033
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long a, b; cin >> a >> b; if(a*b <= 0) cout << "Zero" << endl; else{ if(min(a, b) > 0) cout << "Positive" << endl; else{ if(abs(a-b)%2 == 1) cout << "Positive" << endl; else cout << "Negative" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:17:2: error: expected '}' at end of input 17 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s168540058
p04033
C++
#include iostream using namespace std; int main() { long long a, b; cin >> a >> b; if (a < 0 && b > 0) { cout << "Zero"; } else if (a < 0 && b < 0) { if ((a - b - 1) % 2 == 0) { cout << "Positive"; } else { cout << "Negative"; } } else { cout << "Positive"; } }
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include iostream | ^~~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope 6 | cin >> a >> b; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #include iostream a.cc:8:5: error: 'cout' was not declared in this scope 8 | cout << "Zero"; | ^~~~ a.cc:8:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:12:7: error: 'cout' was not declared in this scope 12 | cout << "Positive"; | ^~~~ a.cc:12:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:15:7: error: 'cout' was not declared in this scope 15 | cout << "Negative"; | ^~~~ a.cc:15:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:19:5: error: 'cout' was not declared in this scope 19 | cout << "Positive"; | ^~~~ a.cc:19:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
s114542997
p04033
C++
#include bits/stdc++.h using namespace std; int main() { long long a, b; cin >> a >> b; if (a < 0 && b > 0) { cout << "Zero"; } else if (a < 0 && b < 0) { if ((a - b - 1) % 2 == 0) { cout << "Positive"; } else { cout << "Negative"; } } else { cout << "Positive"; } }
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include bits/stdc++.h | ^~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope 6 | cin >> a >> b; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #include bits/stdc++.h a.cc:8:5: error: 'cout' was not declared in this scope 8 | cout << "Zero"; | ^~~~ a.cc:8:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:12:7: error: 'cout' was not declared in this scope 12 | cout << "Positive"; | ^~~~ a.cc:12:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:15:7: error: 'cout' was not declared in this scope 15 | cout << "Negative"; | ^~~~ a.cc:15:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:19:5: error: 'cout' was not declared in this scope 19 | cout << "Positive"; | ^~~~ a.cc:19:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
s575650235
p04033
C++
#include bits/stdc++.h using namespace std; int main() { cin >> a >> b; if (a < 0 && b > 0) { cout << "Zero"; } else if (a < 0 && b < 0) { if ((a - b - 1) % 2 == 0) { cout << "Positive"; } else { cout << "Negative"; } } else { cout << "Positive"; } }
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include bits/stdc++.h | ^~~~ a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin >> a >> b; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #include bits/stdc++.h a.cc:5:10: error: 'a' was not declared in this scope 5 | cin >> a >> b; | ^ a.cc:5:15: error: 'b' was not declared in this scope 5 | cin >> a >> b; | ^ a.cc:7:5: error: 'cout' was not declared in this scope 7 | cout << "Zero"; | ^~~~ a.cc:7:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:11:7: error: 'cout' was not declared in this scope 11 | cout << "Positive"; | ^~~~ a.cc:11:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:14:7: error: 'cout' was not declared in this scope 14 | cout << "Negative"; | ^~~~ a.cc:14:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:18:5: error: 'cout' was not declared in this scope 18 | cout << "Positive"; | ^~~~ a.cc:18:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
s012698030
p04033
C++
#include bits/stdc++.h using namespace std; int main() { cin >> a >> b; if (a < 0 && b > 0) { cout << "Zero"; } else if (a < 0 && b < 0) { if ((a - b - 1) % 2 == 0) { cout << "Positive"; } else { cout << "Negative"; } } else { cout << "Positive"; } }
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include bits/stdc++.h | ^~~~ a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin >> a >> b; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #include bits/stdc++.h a.cc:5:10: error: 'a' was not declared in this scope 5 | cin >> a >> b; | ^ a.cc:5:15: error: 'b' was not declared in this scope 5 | cin >> a >> b; | ^ a.cc:7:5: error: 'cout' was not declared in this scope 7 | cout << "Zero"; | ^~~~ a.cc:7:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:11:7: error: 'cout' was not declared in this scope 11 | cout << "Positive"; | ^~~~ a.cc:11:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:14:7: error: 'cout' was not declared in this scope 14 | cout << "Negative"; | ^~~~ a.cc:14:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:18:5: error: 'cout' was not declared in this scope 18 | cout << "Positive"; | ^~~~ a.cc:18:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
s245311770
p04033
C++
#include<bits/stdc++.h> //compiling code: g++ test.cpp(file) -o script(output) -std=c++11(version) -O2(make it 2x faster) using namespace std; int a, b, b2, total; int main(){ cin >> a >> b; int value = a; if (b < 0){ b2 = -b; } else{ b2 = b; } for(int i=0; i<b; i++){ total += value*(value+1); value += 1 } } if (total > 0){ cout << "Positive" << "\n"; } else if(total < 0){ cout << "Negative" << "\n"; } else if(total == 0){ cout << "Zero" << "\n"; } return 0; }
a.cc: In function 'int main()': a.cc:18:23: error: expected ';' before '}' token 18 | value += 1 | ^ | ; 19 | } | ~ a.cc: At global scope: a.cc:22:5: error: expected unqualified-id before 'if' 22 | if (total > 0){ | ^~ a.cc:24:7: error: expected unqualified-id before 'else' 24 | } else if(total < 0){ | ^~~~ a.cc:26:7: error: expected unqualified-id before 'else' 26 | } else if(total == 0){ | ^~~~ a.cc:30:5: error: expected unqualified-id before 'return' 30 | return 0; | ^~~~~~ a.cc:31:1: error: expected declaration before '}' token 31 | } | ^
s215664580
p04033
C++
#include<iostream> using namespace std; int main() { int a,b,s=1; cin>>a>>b; for(;a<=b;b++)s*=b; if(s>0)cout<<"Positive"; if(s==0)cout<<"Zero"; if(s<0)cout<<"Negative"; return 0; }
a.cc: In function 'int main()': a.cc:8:18: error: unable to find string literal operator 'operator""\U0000ff1b' with 'const char [9]', 'long unsigned int' arguments 8 | if(s>0)cout<<"Positive"; | ^~~~~~~~~~~~
s980416227
p04033
C++
#include <bits/stdc++.h> using namespace std; int main() { cin>>a>>b; if (a+b>0) { cout << "Positive"; } else if (a+b==0) { cout << "Zero"; } else { cout << "Negative"; } }
a.cc: In function 'int main()': a.cc:5:8: error: 'a' was not declared in this scope 5 | cin>>a>>b; | ^ a.cc:5:11: error: 'b' was not declared in this scope 5 | cin>>a>>b; | ^
s636451913
p04033
C++
#include <bits/stdc++.h> using namespace std; int main() { cin>>a>>b; if (a+b>0) { cout >> "Positive"; } else if (a+b==0) { cout >> "Zero"; } else { cout >> "Negative"; } }
a.cc: In function 'int main()': a.cc:5:8: error: 'a' was not declared in this scope 5 | cin>>a>>b; | ^ a.cc:5:11: error: 'b' was not declared in this scope 5 | cin>>a>>b; | ^ a.cc:7:8: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [9]') 7 | cout >> "Positive"; | ~~~~ ^~ ~~~~~~~~~~ | | | | | const char [9] | std::ostream {aka std::basic_ostream<char>} In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41, from a.cc:1: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:7:3: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 7 | cout >> "Positive"; | ^~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | cout >> "Positive"; | ^~~~~~~~~~ /usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)' 1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) | ^~~~~~~~ /usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | cout >> "Positive"; | ^~~~~~~~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | cout >> "Positive"; | ^~~~~~~~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | cout >> "Positive"; | ^~~~~~~~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | cout >> "Positive"; | ^~~~~~~~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | cout >> "Positive"; | ^~~~~~~~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | cout >> "Positive"; | ^~~~~~~~~~ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 7 | cout >> "Positive"; | ^~~~~~~~~~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[9]]': a.cc:7:11: required from here 7 | cout >> "Positive"; | ^~~~~~~~~~ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)' 509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | cout >> "Positive"; | ^~~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143: /usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)' 76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | cout >> "Positive"; | ^~~~~~~~~~ /usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)' 106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | cout >> "Positive"; | ^~~~~~~~~~ /usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)' 137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | cout >> "Positive"; | ^~~~~~~~~~ /usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)' 177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 7 | cout >> "Positive"; | ^~~~~~~~~~ /usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)' 207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution fai
s835665807
p04033
C++
#include <bits/stdc++.h> using namespace std; int a,b; int main(){ cin >> a >> b; if (a<0){ if (b>=0){ cout << "Zero"; } else{ if((b-a)%2 == 1){ cout << "Negative"; } else{ cout << "Positive"; } } } else{ cout << "Positive"; } return 0: }
a.cc: In function 'int main()': a.cc:25:9: error: expected ';' before ':' token 25 | return 0: | ^ | ; a.cc:25:9: error: expected primary-expression before ':' token
s750569799
p04033
C++
#include <bits/stdc++.h> using namespace std; //create arrays outside of main() int a[50] = {}; int main() { int a, b; cin >> a >> b; int answer = a; for (int i = a + 1; i < b + 1; i++) { answer = answer * i; } if (answer > 0) { cout << "Positive"; } else if (answer < 0) { cout << "Negative"; } else { cout << "Zero"; } return 0; }}
a.cc:35:2: error: expected declaration before '}' token 35 | }} | ^
s854439862
p04033
C++
#include <bits/stdc++.h> using namespace std; //create arrays outside of main() int a[50] = {}; int main() { int a, b; cin >> a >> b; int answer = a; for (int i = a + 1; i < b + 1; i++) { answer = answer * i; } if (answer > 0) { cout << "Positive"; } else if (answer < 0) { cout << "Negative"; } else { cout << "Zero"; } return 0; }}
a.cc:35:2: error: expected declaration before '}' token 35 | }} | ^
s043658250
p04033
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); if (A == 0 || B == 0 || (A < 0 && B > 0)) { System.out.println("Zero"); } else if ((A > 0 && B > 0) || ((B-A+1)%2 == 0) { System.out.println("Positive"); } else { System.out.println("Negative"); } } }
Main.java:10: error: ')' expected } else if ((A > 0 && B > 0) || ((B-A+1)%2 == 0) { ^ 1 error
s313300840
p04033
C++
#include<iostream> #include<fstream> #include<algorithm> using namespace std; int a,b; int main(){ cin>>a>>b; if(a>0)cout<<"Positive"; else { if(a==0||(a<0&&b>0))cout<<"Zero"; } else { if((abs(b)-abs(a))%2!=0)cout<<"Positive"; } else { cout<<"Negative"; } return 0; }
a.cc: In function 'int main()': a.cc:13:5: error: 'else' without a previous 'if' 13 | else | ^~~~ a.cc:17:5: error: 'else' without a previous 'if' 17 | else | ^~~~
s270500662
p04033
C++
#include<iostream> #include<fstream> #include<algorithm> using namespace std; long long a,b; int main(){ cin>>a>>b; if(a>0)cout<<"Positive"; else { if(a==0||(a<0&&b>0))cout<<"Zero"; } else { if((abs(b)-abs(a))%2!=0)cout<<"Positive"; } else { cout<<"Negative"; } return 0; }
a.cc: In function 'int main()': a.cc:13:5: error: 'else' without a previous 'if' 13 | else | ^~~~ a.cc:17:5: error: 'else' without a previous 'if' 17 | else | ^~~~
s128021453
p04033
C++
#include<bits/stdc++.h> using namespace std; int main() { int n,m; unsigned long long s=1; cin>>n>>m; for(register int i=n;i<=m;i++) s*=i; if(s<0) cout<<"Negative\n"; if(s>0) cout<<"Positive\n"; else cout<<"Zero\n" return 0; }
a.cc: In function 'int main()': a.cc:8:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 8 | for(register int i=n;i<=m;i++) | ^ a.cc:12:24: error: expected ';' before 'return' 12 | else cout<<"Zero\n" | ^ | ; 13 | return 0; | ~~~~~~
s722620858
p04033
C++
//优先队列priority_queue<int>j #include<iostream> #include<cctype> #include<algorithm> #include<cmath> #include<cstdio> #include<map> #include<string> #include<cstring> #include<stack> #include<deque> #include<queue> #include<vector> using namespace std; #define O2 ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); int pows(int base,int n){ int res=1; while(n){ if(n&1) res*=base; base*=base; n>>=1; } return res; } inline int read() { int s = 0, w = 1; char b = getchar(); while (b < '0' || b > '9') { if (b == '-') w = -1; b = getchar(); } while (b <= '9' && b >= '0') { s = 10 * s + b - '0'; b = getchar(); } return w * s; } void write(int x) { if (x==0){ putchar('0'); return; } int num = 0; char c[15]; while(x) c[++num] = (x%10)+48, x /= 10; while(num) putchar(c[num--]); putchar(' '); } int txy(int x){ if(x==0||x==1) return false; for(int i=2;i<=sqrt(x);i++){ if(x%i==0) return false; } return true; } int main() { O2; int a,b; cin>>a>>b; if(a*b>0) cout<<"Negative"; else if(a*b<0) cout<<"Positive"; else if(a*b=0) cout<<"Zero"; return 0; }
a.cc: In function 'int main()': a.cc:64:13: error: lvalue required as left operand of assignment 64 | else if(a*b=0) cout<<"Zero"; | ~^~
s890766288
p04033
C++
#include<bits/stdc++.h> using namespace std; int main (){ int a,b,i; i=b-a+1; cin>>a>>b; if(a>0){ cout<<"Positive"<<endl; }else if(b>=0){ cout<<"Zero"<<endl; }else if(a==0){ cout<<"Zero"<<endl; }else if(a==b)( cout<<"Positive"<<endl; }else if(i%2==0){ cout<<"Positive"<<endl; }else{ cout<<"Negative"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:15:27: error: expected ')' before ';' token 15 | cout<<"Positive"<<endl; | ^ | ) a.cc:14:17: note: to match this '(' 14 | }else if(a==b)( | ^ a.cc: At global scope: a.cc:16:4: error: expected unqualified-id before 'else' 16 | }else if(i%2==0){ | ^~~~ a.cc:18:4: error: expected unqualified-id before 'else' 18 | }else{ | ^~~~ a.cc:21:3: error: expected unqualified-id before 'return' 21 | return 0; | ^~~~~~ a.cc:22:1: error: expected declaration before '}' token 22 | } | ^
s249082735
p04033
C++
#include<bits/stdc++.h> using namespace std; int main (){ int a,b,i; i=b-a+1; cin>>a>>b; if(a>0){ cout<<"Positive"<<endl; }else if(b>=0){ cout<<"Zero"<<endl; }else if(a==0){ cout<<"Zero"<<endl; }else if(a==b)( cout<<"Positive"<<endl; }else if(i%2==0){ cout<<"Positive"<<endl; }else{ cout<<"Negative"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:15:27: error: expected ')' before ';' token 15 | cout<<"Positive"<<endl; | ^ | ) a.cc:14:17: note: to match this '(' 14 | }else if(a==b)( | ^ a.cc: At global scope: a.cc:16:4: error: expected unqualified-id before 'else' 16 | }else if(i%2==0){ | ^~~~ a.cc:18:4: error: expected unqualified-id before 'else' 18 | }else{ | ^~~~ a.cc:21:3: error: expected unqualified-id before 'return' 21 | return 0; | ^~~~~~ a.cc:22:1: error: expected declaration before '}' token 22 | } | ^
s861103039
p04033
C++
#include<bits/stdc++.h> using namespace std; int main (){ int a,b,i; i=b-a; cin>>a>>b; if(a>0){ cout<<"Positive"<<endl; }else if(b>=0){ cout<<"0"<<endl; }else if(a==0){ cout<<"0"<<endl; }else if(i%2=1){ cout<<"Negative"<<endl; }else{ cout<<"Positive"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:14:13: error: lvalue required as left operand of assignment 14 | }else if(i%2=1){ | ~^~
s992711629
p04033
C++
#include<bits/stdc++.h> using namespace std; int main (){ int a,b,i; i=1; cin>>a>>b; if(a>0){ cout<<"Positive"<<endl; }else if(b>=0){ cout<<"0"<<endl; }else if(a==0){ cout<<"0"<<endl; }else{ while(1){ break(a==b); i++; a++; } if(i%2==1){ cout<<"Negative"<<endl; }else{ cout<<"Positive"<<endl; } } return 0; }
a.cc: In function 'int main()': a.cc:16:12: error: expected ';' before '(' token 16 | break(a==b); | ^ | ;
s877935800
p04033
C++
#include<bits/stdc++.h> using namespace std; long long int sum, k, n, j, a, b, c, h; const int maxn = 100 + 1; int e[maxn][maxn]; int q[maxn]; int w[maxn]; int main() { cin >> a >> b; sum = 1; if (a <= 0 and 0 <= b) { cout << "Zero"; return 0; } if (a > 0) { cout <<"Positive"; return 0; } else{ for(int i = a; i < b + 1; i++) { sum = sum * i; } if(sum > 0) { cout << "Positive"; retunr 0; } else if (sum == 0) { cout << "Zero"; return 0; } else{ cout <<"Negetive"; return 0; } } }
a.cc: In function 'int main()': a.cc:29:25: error: 'retunr' was not declared in this scope 29 | retunr 0; | ^~~~~~
s511337937
p04033
C++
#include<bits/stdc++.h> using namespace std; long long int sum, k, n, j, a, b, c, h; const int maxn = 100 + 1; int e[maxn][maxn]; int q[maxn]; int w[maxn]; int main() { cin >> a >> b; sum = 1; if (a <= 0 and 0 <= b) { cout << "Zero"; return 0; } if (a > 0) { cout <<"Positive"; return 0; } else{ for(int i = a; i < b + 1; i++) { sum = sum * i; } if(sum > 0) { cout << "Positive"; retunr 0; } else if (sum == 0) { cout << "Zero"; return 0; } else{ cout <<"Negetive"; return 0; } } }
a.cc: In function 'int main()': a.cc:29:25: error: 'retunr' was not declared in this scope 29 | retunr 0; | ^~~~~~
s049598715
p04033
C++
#include<bits/stdc++.h> using namespace std; int a,b; int main(){ cin>>a>>b; if(a*b<=0) cout<<"Zero"; else if(a>0) cout<<"#include<bits/stdc++.h> using namespace std; int a,b; int main(){ cin>>a>>b; if((a>=0&&b<=0)||(a<=0&&b>=0)) cout<<"Zero"; else if(a>0&&b>0) cout<<"Positive"; else{ if(abs(a-b)%2==0) cout<<"Negative"; else cout<<"Positive"; } return 0; } Positive"; else{ if(abs(a-b)%2==0) cout<<"Negative"; else cout<<"Positive"; } return 0; }
a.cc:7:28: warning: missing terminating " character 7 | else if(a>0) cout<<"#include<bits/stdc++.h> | ^ a.cc:7:28: error: missing terminating " character 7 | else if(a>0) cout<<"#include<bits/stdc++.h> | ^~~~~~~~~~~~~~~~~~~~~~~~ a.cc:19:11: warning: missing terminating " character 19 | } Positive"; | ^ a.cc:19:11: error: missing terminating " character 19 | } Positive"; | ^~ a.cc: In function 'int main()': a.cc:8:1: error: expected primary-expression before 'using' 8 | using namespace std; | ^~~~~ a.cc:10:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 10 | int main(){ | ^~ a.cc:10:9: note: remove parentheses to default-initialize a variable 10 | int main(){ | ^~ | -- a.cc:10:9: note: or replace parentheses with braces to value-initialize a variable a.cc:10:11: error: a function-definition is not allowed here before '{' token 10 | int main(){ | ^ a.cc:19:3: error: 'Positive' was not declared in this scope 19 | } Positive"; | ^~~~~~~~
s600849521
p04033
C++
#include <bits/stdc++.h> using namespace std; int a , b , ans = 1; int main() { cin >> a >> b; for(a ; a <= b ; a++){ ans *= a; } } if (ans > 0){ cout << "Positive"; } else if(ans < 0){ cout << "Negative"; } else if (ans = 0){ cout << "Zero"; } }
a.cc:15:9: error: expected unqualified-id before 'if' 15 | if (ans > 0){ | ^~ a.cc:18:9: error: expected unqualified-id before 'else' 18 | else if(ans < 0){ | ^~~~ a.cc:21:9: error: expected unqualified-id before 'else' 21 | else if (ans = 0){ | ^~~~ a.cc:24:1: error: expected declaration before '}' token 24 | } | ^
s774917144
p04033
C++
#include"bits/stdc++.h" using namespace std; int a,b; int main() { cin>>a>>b; if(a>0) { cout<<"Positive"; } else { if(a==0 || (a<0&&b>0)) { cout<<"Zero"; } else { if( (abs(b)-abs(a))%2! = 0) { cout<<"Positive"; } else cout<<"Negative"; } } return 0; }
a.cc: In function 'int main()': a.cc:19:46: error: expected ')' before '!' token 19 | if( (abs(b)-abs(a))%2! = 0) | ~ ^ | )
s140575161
p04033
C++
#include<bits/stdc++.h> using namespace std; long long a,b; int mian() { cin>>a>>b; if(a*b>0) cout<<"Positive"<<endl; if(a*b<0) cout<<"Negative"<<endl; if(a*b==0) cout<<"Zero"<<endl; return 0; }
/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
s830596222
p04033
C++
{.optimization:speed, checks:off.} #{{{ header import algorithm, sequtils, tables, macros, math, sets, strutils, streams when defined(MYDEBUG): import header proc scanf(formatstr: cstring){.header: "<stdio.h>", varargs.} proc getchar(): char {.header: "<stdio.h>", varargs.} proc nextInt(base:int = 0): int = scanf("%lld",addr result) result -= base proc nextFloat(): float = scanf("%lf",addr result) proc nextString(): string = var get = false;result = "" while true: var c = getchar() if int(c) > int(' '): get = true;result.add(c) elif get: break template `max=`*(x,y:typed):void = x = max(x,y) template `min=`*(x,y:typed):void = x = min(x,y) template infty(T): untyped = ((T(1) shl T(sizeof(T)*8-2)) - 1) #}}} #{{{ gcd and inverse const GCD_H = 0 proc gcd(a,b:int):int= if b == 0: return a else: return gcd(b,a mod b) proc lcm(a,b:int):int= return a div gcd(a, b) * b # a x + b y = gcd(a, b) proc extgcd(a,b:int, x,y:var int):int = var g = a x = 1 y = 0 if b != 0: g = extgcd(b, a mod b, y, x) y -= (a div b) * x return g; proc invMod(a,m:int):int = var x,y:int if extgcd(a, m, x, y) == 1: return (x + m) mod m else: return 0 # unsolvable #}}} let MOD = 1000000007 #{{{ Mint type Mint = object v:int proc newMint[T](a:T):Mint = var a = a a = a mod MOD if a < 0: a += MOD return Mint(v:a) proc newMint(a:Mint):Mint = return a proc `+=`[T](a:var Mint, b:T):void = a.v += newMint(b).v if a.v >= MOD: a.v -= MOD proc `+`[T](a:Mint,b:T):Mint = var c = a c += b return c proc `*=`[T](a:var Mint,b:T):void = a.v *= newMint(b).v a.v = a.v mod MOD proc `*`[T](a:Mint,b:T):Mint = var c = a c *= b return c proc `-`(a:Mint):Mint = if a.v == 0: return a else: return Mint(v:MOD - a.v) proc `-=`[T](a:var Mint,b:T):void = a.v -= newMint(b).v if a.v < 0: a.v += MOD proc `-`[T](a:Mint,b:T):Mint = var c = a c -= b return c proc `$`(a:Mint):string = return $(a.v) when declared(GCD_H): proc `/=`[T](a:var Mint,b:T):void = a.v *= invMod(newMint(b).v,MOD) a.v = a.v mod MOD proc `/`[T](a:Mint,b:T):Mint = var c = a c /= b return c #}}} #{{{ fact, comb, perm var factorial_val = @[newMint(1)] inv_factorial_val = @[newMint(1)] comb_val = @[@[newMint(1)]] proc fact(n:int):Mint = for i in len(factorial_val)..n: factorial_val.add(factorial_val[i-1] * i) return factorial_val[n] proc inv_fact(n:int):Mint = for i in len(inv_factorial_val)..n: inv_factorial_val.add(newMint(1)/fact(i)) return inv_factorial_val[n] proc comb_memo(n,r:int):Mint = if n<0 or r<0 or n<r: return newMint(0) while comb_val.len < n + 1: var t = comb_val.len comb_val.add(newSeqWith(t + 1, newMint(0))) comb_val[t][0] = newMint(1) comb_val[t][t] = newMint(1) for i in 1..t-1: comb_val[t][i] = comb_val[t-1][i-1] + comb_val[t-1][i] return comb_val[n][r] when declared(GCD_H): proc comb(n,r:int):Mint = if n<0 or r<0 or n<r: return newMint(0) else: # return fact(n)/(fact(r)*fact(n-r)) return fact(n)*inv_fact(r)*inv_fact(n-r) proc perm(n,r:int):Mint = if n<0 or n<r: return newMint(0) else: return fact(n)/fact(n-r) #}}} proc solve(N:int, K:int) = if K == 1: echo 1 return var dp = newSeqWith(2010,newSeqWith(2010,newMint(0))) dp[0][0] = newMint(1) let K1 = K - 1 for a in 0..N: var d = N * K - a - 1 for b in 0..a: # zero dp[a+1][b] += dp[a][b] # non-zero # if b < N: dp[a][b+1] += dp[a][b] * comb(N*K - a - (K - 1) * b - 1,K - 2) * (N - b) dp[a][b+1] += dp[a][b] * comb(d,K - 2) * (N - b) d -= K1 echo dp[N][N] return #{{{ main function proc main() = var N = 0 N = nextInt() var K = 0 K = nextInt() solve(N, K); return main() #}}}
a.cc:2:2: error: invalid preprocessing directive #{ 2 | #{{{ header | ^ a.cc:19:10: error: stray '`' in program 19 | template `max=`*(x,y:typed):void = x = max(x,y) | ^ a.cc:19:15: error: stray '`' in program 19 | template `max=`*(x,y:typed):void = x = max(x,y) | ^ a.cc:20:10: error: stray '`' in program 20 | template `min=`*(x,y:typed):void = x = min(x,y) | ^ a.cc:20:15: error: stray '`' in program 20 | template `min=`*(x,y:typed):void = x = min(x,y) | ^ a.cc:22:2: error: invalid preprocessing directive #} 22 | #}}} | ^ a.cc:24:2: error: invalid preprocessing directive #{ 24 | #{{{ gcd and inverse | ^ a.cc:32:3: error: invalid preprocessing directive #a 32 | # a x + b y = gcd(a, b) | ^ a.cc:47:18: error: stray '#' in program 47 | else: return 0 # unsolvable | ^ a.cc:48:2: error: invalid preprocessing directive #} 48 | #}}} | ^ a.cc:52:2: error: invalid preprocessing directive #{ 52 | #{{{ Mint | ^ a.cc:62:6: error: stray '`' in program 62 | proc `+=`[T](a:var Mint, b:T):void = | ^ a.cc:62:9: error: stray '`' in program 62 | proc `+=`[T](a:var Mint, b:T):void = | ^ a.cc:66:6: error: stray '`' in program 66 | proc `+`[T](a:Mint,b:T):Mint = | ^ a.cc:66:8: error: stray '`' in program 66 | proc `+`[T](a:Mint,b:T):Mint = | ^ a.cc:70:6: error: stray '`' in program 70 | proc `*=`[T](a:var Mint,b:T):void = | ^ a.cc:70:9: error: stray '`' in program 70 | proc `*=`[T](a:var Mint,b:T):void = | ^ a.cc:73:6: error: stray '`' in program 73 | proc `*`[T](a:Mint,b:T):Mint = | ^ a.cc:73:8: error: stray '`' in program 73 | proc `*`[T](a:Mint,b:T):Mint = | ^ a.cc:77:6: error: stray '`' in program 77 | proc `-`(a:Mint):Mint = | ^ a.cc:77:8: error: stray '`' in program 77 | proc `-`(a:Mint):Mint = | ^ a.cc:80:6: error: stray '`' in program 80 | proc `-=`[T](a:var Mint,b:T):void = | ^ a.cc:80:9: error: stray '`' in program 80 | proc `-=`[T](a:var Mint,b:T):void = | ^ a.cc:84:6: error: stray '`' in program 84 | proc `-`[T](a:Mint,b:T):Mint = | ^ a.cc:84:8: error: stray '`' in program 84 | proc `-`[T](a:Mint,b:T):Mint = | ^ a.cc:88:6: error: stray '`' in program 88 | proc `$`(a:Mint):string = | ^ a.cc:88:8: error: stray '`' in program 88 | proc `$`(a:Mint):string = | ^ a.cc:91:8: error: stray '`' in program 91 | proc `/=`[T](a:var Mint,b:T):void = | ^ a.cc:91:11: error: stray '`' in program 91 | proc `/=`[T](a:var Mint,b:T):void = | ^ a.cc:94:8: error: stray '`' in program 94 | proc `/`[T](a:Mint,b:T):Mint = | ^ a.cc:94:10: error: stray '`' in program 94 | proc `/`[T](a:Mint,b:T):Mint = | ^ a.cc:98:2: error: invalid preprocessing directive #} 98 | #}}} | ^ a.cc:101:2: error: invalid preprocessing directive #{ 101 | #{{{ fact, comb, perm | ^ a.cc:103:19: error: stray '@' in program 103 | factorial_val = @[newMint(1)] | ^ a.cc:104:23: error: stray '@' in program 104 | inv_factorial_val = @[newMint(1)] | ^ a.cc:105:14: error: stray '@' in program 105 | comb_val = @[@[newMint(1)]] | ^ a.cc:105:16: error: stray '@' in program 105 | comb_val = @[@[newMint(1)]] | ^ a.cc:124:14: error: too many decimal points in number 124 | for i in 1..t-1: | ^~~~ a.cc:133:8: error: invalid preprocessing directive #return 133 | # return fact(n)/(fact(r)*fact(n-r)) | ^~~~~~ a.cc:140:2: error: invalid preprocessing directive #} 140 | #}}} | ^ a.cc:151:12: error: too many decimal points in number 151 | for a in 0..N: | ^~~~ a.cc:153:14: error: too many decimal points in number 153 | for b in 0..a: | ^~~~ a.cc:154:9: error: invalid preprocessing directive #zero 154 | # zero | ^~~~ a.cc:156:9: error: invalid preprocessing directive #non 156 | # non-zero | ^~~ a.cc:157:16: error: ':' without preceding '?' 157 | # if b < N: dp[a][b+1] += dp[a][b] * comb(N*K - a - (K - 1) * b - 1,K - 2) * (N - b) | ^ a.cc:157: error: unterminated #if 157 | # if b < N: dp[a][b+1] += dp[a][b] * comb(N*K - a - (K - 1) * b - 1,K - 2) * (N - b) a.cc:1:1: error: expected unqualified-id before '{' token 1 | {.optimization:speed, checks:off.} | ^ a.cc:3:1: error: 'import' does not name a type 3 | import algorithm, sequtils, tables, macros, math, sets, strutils, streams | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:8:1: error: 'proc' does not name a type 8 | proc getchar(): char {.header: "<stdio.h>", varargs.} | ^~~~ a.cc:9:1: error: 'proc' does not name a type 9 | proc nextInt(base:int = 0): int = | ^~~~ a.cc:14:19: error: 'result' does not name a type 14 | var get = false;result = "" | ^~~~~~ a.cc:17:38: error: 'result' does not name a type 17 | if int(c) > int(' '): get = true;result.add(c) | ^~~~~~ a.cc:43:1: error: 'proc' does not name a type 43 | proc invMod(a,m:int):int = | ^~~~
s596456305
p04033
C++
#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 ; int main () { ios::sync_with_stdio(0), cin.tie(0) ; ll a , b ; cin >> a >> b ; if (0 >= a && 0 <= b) return cout << "Zero" , 0 ; if (a > 0) return cout << "Positive" , 0 ; ll cnt = b - a +1 ; if (cnt & 1) cout << "Negative" ; else cout << return cout << "Positive" , 0 ; return (0) ; }
a.cc: In function 'int main()': a.cc:22:18: error: expected primary-expression before 'return' 22 | else cout << return cout << "Positive" , 0 ; | ^~~~~~
s037577286
p04033
C
#include<stdio.h> int main(void) { int a,b; scanf("%d%d",&a,&b); int ans=1; for(int i=a,i<b+1;i++){ ans*=i; } if(ans>0){ puts("Positive"); } else if(ans==0){ puts("Zero"); } else{ puts("Negative"); } return 0; }
main.c: In function 'main': main.c:7:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 7 | for(int i=a,i<b+1;i++){ | ^ main.c:7:24: error: expected ';' before ')' token 7 | for(int i=a,i<b+1;i++){ | ^ | ;
s322563208
p04033
C++
#include"bits/stdc++.h" using namespace std; int a,b; int main() { cin>>a>>b; } { if(a>0)cout<<"Positive"<<endl; else if(a==0||(a<0&&b>0))cout<<"Zero"<<endl; else if((abs(b)-abs(a))%2!=0)cout<<"Positive"<<endl; else cout<<"Negative"<<endl; return 0; }
a.cc:8:5: error: expected unqualified-id before '{' token 8 | { | ^
s519548148
p04033
C++
#include<iostream> using namespace std; int main() { int a,b,h=1; cin>>a>>b; for(int i=a;i<=b;i++){ h*=i; } if(num>0) cout<<"Positive"; else if(num<0) cout<<"Negative"; else cout<<"Zero"; return 0; }
a.cc: In function 'int main()': a.cc:9:8: error: 'num' was not declared in this scope; did you mean 'enum'? 9 | if(num>0) | ^~~ | enum
s913953849
p04033
C++
#include<iostream> using namespace std; int main() { int a,b,h=1; cin>>a>>b; for(int i=a;i<=b;i++){ h*=i; } if(num>0) cout<<"Positive"; else if(num<0) cout<<"Negative"; else cout<<"Zero"; return 0; }
a.cc: In function 'int main()': a.cc:9:8: error: 'num' was not declared in this scope; did you mean 'enum'? 9 | if(num>0) | ^~~ | enum
s846017588
p04033
C++
#include<cstdio> using namespace std; long long a,b; int main() { cin>>a>>b; if(a>0)puts("Positive"); else if(b>=0)puts("Zero"); else if((a&1)^(b&1))puts("Positive"); else puts("Negative"); return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | cin>>a>>b; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include<cstdio> +++ |+#include <iostream> 2 | using namespace std;
s030548850
p04033
C++
#include <bits/stdc++.h> using namespace std ; template < class R > inline void Readin( R &K ) { K = 0 ; bool F = false ; char C = getchar() ; while( C < '0' or C > '9' ) { if( C == '-' ) F = true ; C = getchar() ; } while( C <= '9' and C >= '0' ) K = ( K << 1 ) + ( K << 3 ) + C - '0' , C = getchar() ; if( F ) K = -K ; } template < class R > inline void Checkmax( R &A , R B ) { if( A < B ) A = B ; } template < class R > inline void Checkmin( R &A , R B ) { if( A > B ) A = B ; } const int Mod = 1e9 + 7 ; const int MaxN = 100000 + 10 ; inline void Moding( int &A ) { if( A >= Mod ) A -= Mod ; if( A < 0 ) A += Mod ; } inline int Pow( int A , int B ) { register int Ans = 1 ; while( B ) { if( B & 1 ) Ans = 1ll * Ans * A % Mod ; A = 1ll * A * A % Mod ; B >>= 1 ; } return Ans ; } int Fac[MaxN] , Inv[MaxN] ; inline void C_Init() { N = MaxN - 10 ; Fac[0] = Inv[0] = 1 ; for(register int i = 0 ; ++i <= N ; ) Fac[i] = 1ll * Fac[i-1] * i % Mod ; Inv[N] = Pow( Fac[N] , Mod - 2 ) ; for(register int i = N ; --i ; ) Inv[i] = 1ll * Inv[i+1] * (i+1) % Mod ; } inline int C( int N , int M ) { return 1ll * Fac[M] * Inv[N] % Mod * Inv[M-N] % Mod ; } int A , B ; int main() { Readin( A ) ; Readin( B ) ; if( A <= 0 and B >= 0 ) return not printf( "Zero\n" ) ; if( A > 0 or ( ( B - A ) & 1 ) ) return not printf( "Positive\n" ) ; return not printf( "Negative\n" ) ; }
a.cc: In function 'int Pow(int, int)': a.cc:20:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 20 | register int Ans = 1 ; | ^~~ a.cc: In function 'void C_Init()': a.cc:30:9: error: 'N' was not declared in this scope 30 | N = MaxN - 10 ; | ^ a.cc:32:26: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 32 | for(register int i = 0 ; ++i <= N ; ) | ^ a.cc:35:26: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 35 | for(register int i = N ; --i ; ) | ^
s874691099
p04033
Java
import java.util.Scanner; public class Tutorial011 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); if(a<=0&&0<=b) { System.out.println("Zero"); System.exit(0); }else if(0<=a) { System.out.println("Positive"); }else if((b-a)%2==0) { System.out.println("Negative"); }else { System.out.println("Positive"); } sc.close(); } }
Main.java:3: error: class Tutorial011 is public, should be declared in a file named Tutorial011.java public class Tutorial011 { ^ 1 error
s120871160
p04033
Java
import java.util.Scanner; import javax.print.attribute.standard.PrinterIsAcceptingJobs; public class Tutorial011 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); //int[] a = new int[200]; //int count=0; if(a<=0&&0<=b) { System.out.println("Zero"); System.exit(0); }else if(0<=a) { System.out.println("Positive"); }else if((b-a)%2==0) { System.out.println("Negative"); }else { System.out.println("Positive"); } } }
Main.java:5: error: class Tutorial011 is public, should be declared in a file named Tutorial011.java public class Tutorial011 { ^ 1 error
s959397892
p04033
C++
#include "ccc.hpp" string solve() { int a, b; cin >> a >> b; if (a <= 0 && b >= 0) return "Zero"; if (a > 0) return "Positive"; a = -a; b = -b; if ((b - a) % 2 == 0) return "Negative"; else return "Positive"; } int main() { out(solve()); }
a.cc:1:10: fatal error: ccc.hpp: No such file or directory 1 | #include "ccc.hpp" | ^~~~~~~~~ compilation terminated.
s702952430
p04033
C++
#include <iostream> #include <math.h> #include <fstream> #include <algorithm> #include <string> #include <string.h> #include <queue> #include <vector> #include <set> #include <map> using namespace std; int main() { int a, b; cin >> a >> b; if (b>0&&b - a > b) { cout << "Zero"; return 0; } if (a > 0) { cout << "Positive"; return 0; } if ((b - a) % 2 == 0)cout << "Negative";
a.cc: In function 'int main()': a.cc:24:49: error: expected '}' at end of input 24 | if ((b - a) % 2 == 0)cout << "Negative"; | ^ a.cc:13:12: note: to match this '{' 13 | int main() { | ^
s303659226
p04033
C++
#include<iostream> using namespace std; int main() { int a,b if((a>0&&b<0)||(a<0&&b>0))cout<<"Zero"; else if(a>0&&b>0)cout<<"Nagative"; else cout<<"Positive"; }
a.cc: In function 'int main()': a.cc:6:5: error: expected initializer before 'if' 6 | if((a>0&&b<0)||(a<0&&b>0))cout<<"Zero"; | ^~ a.cc:7:5: error: 'else' without a previous 'if' 7 | else if(a>0&&b>0)cout<<"Nagative"; | ^~~~ a.cc:7:18: error: 'b' was not declared in this scope 7 | else if(a>0&&b>0)cout<<"Nagative"; | ^
s023715911
p04033
C++
using namespace std; int main() { int a,b,c=1; cin>>a>>b; for(int i=a;i<=b;i++) { if(i<0) c=c*-1; if(i==0) cout<<"Zero"<<endl; } if(c>0) cout<<"Positive"<<endl; if(c<0) cout<<"Negative"<<endl; if(c==0) cout<<"Zero"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope 5 | cin>>a>>b; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:11:17: error: 'cout' was not declared in this scope 11 | cout<<"Zero"<<endl; | ^~~~ a.cc:11:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:11:31: error: 'endl' was not declared in this scope 11 | cout<<"Zero"<<endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | using namespace std; a.cc:15:17: error: 'cout' was not declared in this scope 15 | cout<<"Positive"<<endl; | ^~~~ a.cc:15:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:15:35: error: 'endl' was not declared in this scope 15 | cout<<"Positive"<<endl; | ^~~~ a.cc:15:35: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' a.cc:17:17: error: 'cout' was not declared in this scope 17 | cout<<"Negative"<<endl; | ^~~~ a.cc:17:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:17:35: error: 'endl' was not declared in this scope 17 | cout<<"Negative"<<endl; | ^~~~ a.cc:17:35: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' a.cc:19:17: error: 'cout' was not declared in this scope 19 | cout<<"Zero"<<endl; | ^~~~ a.cc:19:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:19:31: error: 'endl' was not declared in this scope 19 | cout<<"Zero"<<endl; | ^~~~ a.cc:19:31: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s418132397
p04033
C++
#include <bits/stdc++.h> int main() { int a,b; cin>>a>>b; if(a>0&&b>0)cout<<"Positive"; else if(a<0&&b<0)cout<<"Negative"; else cout<<"Zero"; }
a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>a>>b; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, 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:6:21: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | if(a>0&&b>0)cout<<"Positive"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:26: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | else if(a<0&&b<0)cout<<"Negative"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:8:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 8 | else cout<<"Zero"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s739063066
p04033
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long int a,b; cin>>a>>b; if(a>0)puts("Positive"); else if(a==0||a<0&&b>0)puts("Zero"); else if((abs(b)-abs(a))%2!=0)put("Positive"); else puts("Negative"); }
a.cc: In function 'int main()': a.cc:8:34: error: 'put' was not declared in this scope; did you mean 'putw'? 8 | else if((abs(b)-abs(a))%2!=0)put("Positive"); | ^~~ | putw
s096149671
p04033
C++
#include<bits/stdc++> using namespace std; int main() { int a,b; cin>>a>>b; if(a>0) cout<<"Positive"; else if(a==0||(a<0&&b>0)) cout<<"Zero"; else if((abs(b)-abs(a))%2!=0) cout<<"Positive"; else cout<<"Negative"; return 0; }
a.cc:1:9: fatal error: bits/stdc++: No such file or directory 1 | #include<bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s610108869
p04033
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; int c=0; cin>>a>>b; for(int i=0;i>a;i--) c++; if(a<=0&&0<=b) cout<<"Zero" else if(b<0&&c%2==1) cout<<"Negative"; else cout<<"Positive"; }
a.cc: In function 'int main()': a.cc:11:29: error: expected ';' before 'else' 11 | cout<<"Zero" | ^ | ; 12 | else if(b<0&&c%2==1) | ~~~~
s485769959
p04033
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; int c=0; cin>>a>>b; for(int i=0;i>a;i--) c++; if(a<=0&&0<=b) cout<<"Zero" else if(b<0&&c%2==1) cout<<"Negative"; else cout<<"Positive"; }
a.cc: In function 'int main()': a.cc:11:29: error: expected ';' before 'else' 11 | cout<<"Zero" | ^ | ; 12 | else if(b<0&&c%2==1) | ~~~~
s352592364
p04033
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; int c=0; cin>>a>>b; for(int i=0;i>a;i--) c++; if(a<=0&&0<=b) cout<<"zero" else if(b<0&&c%2==1) cout<<"Negative"; else cout<<"Positive"; }
a.cc: In function 'int main()': a.cc:11:29: error: expected ';' before 'else' 11 | cout<<"zero" | ^ | ; 12 | else if(b<0&&c%2==1) | ~~~~
s916577593
p04033
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; int c=0; cin>>a>>b; for(int i=0;i>a;i--) c++; if(a=<0&&0=<b) cout<<"zero" else if(b<0&&c%2==1) cout<<"Negative" else cout<<"Positive" }
a.cc: In function 'int main()': a.cc:10:22: error: expected primary-expression before '<' token 10 | if(a=<0&&0=<b) | ^ a.cc:10:28: error: expected primary-expression before '<' token 10 | if(a=<0&&0=<b) | ^ a.cc:11:29: error: expected ';' before 'else' 11 | cout<<"zero" | ^ | ; 12 | else if(b<0&&c%2==1) | ~~~~
s398089993
p04033
C++
#include<iostream> #include<cmath> #include<cstdio> #include<cstring> using namespace std; int main() { int a,b; cin>>a>>b; int mls=abs(b)-abs(a)%2; if(a>0) cout<<"Positive"; else if(a==0||(a<0&&b>0)) cout<<"Zero"; else if(c!=0) cout<<"Positive"; else cout<<"Negative"; return 0; }
a.cc: In function 'int main()': a.cc:13:13: error: 'c' was not declared in this scope 13 | else if(c!=0) cout<<"Positive"; | ^
s624376530
p04033
C++
#include<iostream> uisng namespace std; int main() { long long a,b; cin>>a>>b; if((a>0&&b>0)||(a<0&&b<0)) cout<<"Positive"; if((a>0&&b<0)||(a<0&&b>0)) cout<<"Negative"; if((a==0&&b==0)||a==0||b==0)) cout<<"Zero"; return 0; }
a.cc:2:1: error: 'uisng' does not name a type 2 | uisng namespace std; | ^~~~~ a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>a>>b; | ^~~ | 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:7:32: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | if((a>0&&b>0)||(a<0&&b<0)) cout<<"Positive"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:8:32: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 8 | if((a>0&&b<0)||(a<0&&b>0)) cout<<"Negative"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:9:33: error: expected primary-expression before ')' token 9 | if((a==0&&b==0)||a==0||b==0)) cout<<"Zero"; | ^
s327768039
p04033
C++
#define _CRT_SECURE_NO_WARNINGS #include<bits/stdc++.h> using namespace std; #ifndef FAST_IO #define IOS ios_base::sync_with_stdio(false);cin.tie(nullptr); #endif #define FILE_IO freopen("input.txt","r",stdin) #define int long long #define f first #define s second #define endl '\n' #define all(c) c.begin(),c.end() #define bp __builtin_popcount #define debug(x) cerr << #x << " = " << x << endl; const int MOD = 1e9 + 7; const int INF = 1e18; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); template <typename T>void print(T t){for(auto &it : t)cout<<it<<" ";} inline int powerexp(int a, int b, int m){ int res = 1;while(b){if(b&1)res = res * a % m;a = a * a % m,b >>= 1;}return res % m;} inline int modinv(int a){ return powerexp(a,MOD-2,MOD);} inline int lcm(int a, int b){ int g = __gcd(a,b);return a/g*b;} inline int add(int x, int y){ x += y; if (x >= MOD) x -= MOD; return x;} inline int mul(int x, int y){ return (x * 1ll * y) % MOD;} inline int sub(int x, int y){ x -= y; if (x<0) x += MOD; return x ;} //-------------------< start here >-------------------------// void solve(){ int a, b; cin >> a >> b; string ret; if ( a < 0 && b < 0) ret = "Positive"; else if ( b > 0 && a > 0) ret = "Positive"; else if ( a == 0 || b == 0) ret = "Zero"; else if ( b >= 0 && a =< 0) ret = "Zero"; else if ( b > 0 && a < 0) ret = "Negative"; else if ( a == b) ret = "Positive"; cout << ret << endl; } //----------------------------- //comment from here for TOPCODER int32_t main(){ IOS; solve(); //find(); #ifdef LOCAL_DEFINE cerr << "time elapsed " << (double)clock()/CLOCKS_PER_SEC << endl; #endif }
a.cc: In function 'void solve()': a.cc:38:29: error: expected primary-expression before '<' token 38 | else if ( b >= 0 && a =< 0) ret = "Zero"; | ^
s978486425
p04033
C++
#include<bits/stdc++.h> using namespace std; int main(){ int A,B,ans,a,b,c; cin>>A>>B; ans=0; if(A<=0&&B>=0){ cout<<Zero<<endl; return 0; } else{ if(A>0){ cout<<"Positive"<<endl; return 0; } else{ if((B-A)%2==1){ cout<<"Positive"<<endl; return 0; } else{ cout<<"Negative"<<endl; return 0; } } } }
a.cc: In function 'int main()': a.cc:9:11: error: 'Zero' was not declared in this scope 9 | cout<<Zero<<endl; | ^~~~
s241341852
p04033
C++
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <map> #include <utility> #include <tuple> #include <string> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define SORT(x) sort(x.begin(),x.end()) #define REVE(x) reverse(x.begin(),x.end()) #define all(x) (x).begin(),(x).end() #define fst first #define mp make_pair #define pb push_back #define eb emplace_back #define pob pop_back #define sw swap using LL = long long; using ULL = unsigned long long; #define FOR(i, m, n) for(int i = m;i < n;i++) template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;} template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;} int main(){ cin.tie(0); ios::sync_with_stdio(false); int A,B; cin >> A>>B; FOR(i,A,B){ A*=i; } cout << A=0? "Zero" :A > 0?"Positive":"Negative"; }
a.cc: In function 'int main()': a.cc:33:44: error: no match for 'operator=' (operand types are 'std::basic_ostream<char>' and 'const char*') 33 | cout << A=0? "Zero" :A > 0?"Positive":"Negative"; | ^~~~~~~~~~ In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ostream:458:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator=(std::basic_ostream<_CharT, _Traits>&&) [with _CharT = char; _Traits = std::char_traits<char>]' 458 | operator=(basic_ostream&& __rhs) | ^~~~~~~~ /usr/include/c++/14/ostream:458:33: note: no known conversion for argument 1 from 'const char*' to 'std::basic_ostream<char>&&' 458 | operator=(basic_ostream&& __rhs) | ~~~~~~~~~~~~~~~~^~~~~
s148842434
p04033
C++
#include <iostream> #include <vector> #include <string> #include <cmath> #include <set> #include <algorithm> #include <array> #include <complex> #include <string> #include <utility> #include <map> #include <queue> #include <list> #include <functional> #include <numeric> #include <stack> #include <tuple> using namespace std; int dx[4] = { -1,0,1,0 }; int dy[4] = { 0,1,0,-1 }; const int INF = 100000000; const long long LINF = 1000000000000000000; const int MOD = (int)1e9 + 7; const double EPS = 1e-6; using pii = std::pair<int, int>; using ll=long long; using pLL = std::pair<ll, ll>; #define SORT(v) std::sort(v.begin(), v.end()) int main(){ cin.tie(0); ios::sync_with_stdio(false); int a,b; cin >> a >> b; if(a<=0&&b>=0){ cout << "Zero" <<endl; }else if(a>0){ cout << " Positive" <<endl; }else if(b<0){ int temp=a-b-1; if(temp/2%=0){ cout << " Positive" <<endl; }else{ cout << " Negative" <<endl; } } return 0; }
a.cc: In function 'int main()': a.cc:41:18: warning: division by zero [-Wdiv-by-zero] 41 | if(temp/2%=0){ | ~~~~~~^~~ a.cc:41:16: error: lvalue required as left operand of assignment 41 | if(temp/2%=0){ | ~~~~^~
s802831054
p04033
C++
#include <iostream> #include <cmath> #include <algoruthm> using namespace std; int main(void){ int a,b; cin >> a >> b; if(a <= 0 && b >= 0) cout << "Zero" << endl; else if(a < 0 && b < 0){ if(abs(b - a) % 2 == 0) cout << "Negative" << endl; else cout << "Positive" << endl; } else cout << "Positive" << endl; return 0; }
a.cc:3:10: fatal error: algoruthm: No such file or directory 3 | #include <algoruthm> | ^~~~~~~~~~~ compilation terminated.
s384030768
p04033
C++
#include<bits/stdc++.h> using namespace std; #define IL inline #define rep(i,j,k) for(int i=j;i<=k;++i) #define repd(i,j,k) for(int i=j;i>=k;--i) #define pb push_back #define db double #define mp make_pair #define mp3(a,b,c) mp(mp(a,b),c) #define pii pair<int,int> #define piii pair<pii,int> #define fr first #define se second #define ll long long #define ull unsigned long long #define pbc(x) __builtin_popcount(x) #define clr(x) memset(x,0,sizeof x) #define SIZE(x) (int)(x.size()) const int mod=1e9+7; IL int pls(int x,int y){x+=y;return x>=mod?x-mod:x;} IL int dec(int x,int y){x-=y;return x<0?x+mod:x;} IL int mul(int x,int y){return 1ll*x*y%mod;} IL int mul(int x,int y,int z){return mul(mul(x,y),z);} IL int mul(int x,int y,int z,int p){return mul(mul(x,y),mul(z,p));} IL void add(int &x,int y){x+=y;x=(x>=mod)?x-mod:x;} IL int fpw(int x,int y,int r=1){for(;y;y>>=1,x=mul(x,x))if(y&1)r=mul(r,x);return r;} IL int inv(int x){return fpw(x,mod-2);} IL int gi(){int x;int _w=scanf("%d",&x);return x;} IL void gi(int &x){int _w=scanf("%d",&x);} IL void write(int x){printf("%d\n",x);} void chkmax(int &x,int y){x=(x>y)?x:y;} void chkmin(int &x,int y){x=(x<y)?x:y;} const int INF=0x3f3f3f3f; template<typename T>IL void debug(T x){cerr<<x;return;} /* --------------------------------------------------------------------------------------------------------- */ int a,b; int main(){ a=gi(),b=gi(); int l=mib(b,0); if(l<a){ puts("Positive"); } else if(a<l && b >= 0) { puts("Zero"); }else { puts("Negative"); } return 0; }
a.cc: In function 'int main()': a.cc:39:15: error: 'mib' was not declared in this scope 39 | int l=mib(b,0); | ^~~
s273308808
p04033
C++
#include<bits/stdc++.h> using namespace std; int a,b; int main() { cin>>a>>b; if(a>0)cout<<"Positive"; else if(b>=0)cout<<"Zero"; else if((abs(b)-abs(a))%2==1)cout<<"Positive"; else cout<<"Negative"; cout<<endl; return 0;) }
a.cc: In function 'int main()': a.cc:12:10: error: expected primary-expression before ')' token 12 | return 0;) | ^
s266077321
p04033
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b; cni>>a>>b; if(a*b>0) cout<<"Positive"<<endl; else if(a*b<0) cout<<"Negative"<<endl; else cout<<"Zero"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'cni' was not declared in this scope 6 | cni>>a>>b; | ^~~
s221819822
p04033
C++
#include<iostream> using namespace std; int main(){ int a,b,c; cin >> a >> b; if(a <= 0 && 0 <= b){ cout << "Zero"; return 0; } else if(0 < a){ cout << "Positive"; return 0; } c = b - a + 1 else if(c % 2 == 0){ cout << "Negative"; return 0; } }
a.cc: In function 'int main()': a.cc:14:14: error: expected ';' before 'else' 14 | c = b - a + 1 | ^ | ; 15 | else if(c % 2 == 0){ | ~~~~
s420278145
p04033
C++
#include<iostream> using namespace std; int main(){ int a,b,c; cin >> a >> b; if(a <= 0 && 0 <= b){ cout << Zero; return 0; } else if(0 < a){ cout << Positive; return 0; } c = b - a + 1 else if(c % 2 == 0){ cout << Negative; return 0; } }
a.cc: In function 'int main()': a.cc:7:13: error: 'Zero' was not declared in this scope 7 | cout << Zero; | ^~~~ a.cc:11:13: error: 'Positive' was not declared in this scope 11 | cout << Positive; | ^~~~~~~~ a.cc:14:14: error: expected ';' before 'else' 14 | c = b - a + 1 | ^ | ; 15 | else if(c % 2 == 0){ | ~~~~
s611735925
p04033
C++
#include<bits/stdc++.h> using namespace std; int main(void) { int a,b; cin>>a>>b; if(0<a&&a<=b) cout<<"Positive"<<endl; else if(a<=b&&b<0){ if((b-a+1)%2==0) cout<<"Positive"<<endl; else cout<<"Negative"<<endl; } else if(a<=0&&0<=b) cuot<<"Zero"<<endl; }
a.cc: In function 'int main()': a.cc:17:5: error: 'cuot' was not declared in this scope 17 | cuot<<"Zero"<<endl; | ^~~~
s365033664
p04033
C++
#include<bits/stdc++.h> using namespace std; int main(void) { int a,b; cin>>a>>b; if(a>=0&&0<=b) cout<<"Zero"<<endl; else if(a>0) cout<<"Positive"<<endl; else cuot<<"Negative"<<endl; }
a.cc: In function 'int main()': a.cc:13:5: error: 'cuot' was not declared in this scope 13 | cuot<<"Negative"<<endl; | ^~~~
s114591067
p04033
C++
#include<bits/stdc++.h> using namespace std; int main(void) { int a,b; cin>>a>>b; if(a>=0%%0<=b) cout<<"Zero"<<endl; else if(a>0) cout<<"Positive"<<endl; else cuot<<"Negative"<<endl; }
a.cc: In function 'int main()': a.cc:8:11: error: expected primary-expression before '%' token 8 | if(a>=0%%0<=b) | ^ a.cc:13:5: error: 'cuot' was not declared in this scope 13 | cuot<<"Negative"<<endl; | ^~~~
s635843430
p04033
C
#include<stdio.h> int main(){ int a,b,mul,i; scanf("%d %d",&a,&b); mul = 1; if(a>0){ printf("Positive"); } else if(a==0){ printf("Zero"); } else if(b>=0){ printf("Zero";) } else{ if(b-a+1%2==0){ printf("Positive"); } else{ printf("Negative"); } } return 0; }
main.c: In function 'main': main.c:19:18: error: expected ')' before ';' token 19 | printf("Zero";) | ~ ^ | ) main.c:19:20: error: expected ';' before '}' token 19 | printf("Zero";) | ^ | ; 20 | } | ~
s203053320
p04033
C++
#include <bits/stdc++.h> using namespace std; int main(){ int A,B; cin>>A>>B; if(A<0){ if(B>=0){ cout<<"Zero"<<endl; } if(A==B){ cout<<"Negative"<<endl; } if(A!=B&&B<0){ if(B+A%2==0){ cout<<"Negative"<<endl; } else cout<<"Positive"<<endl; } } } if(A==0){ cout<<"Zero"<<endl; } if(A>0){ cout<<"Positive"<<endl; } }
a.cc:23:1: error: expected unqualified-id before 'if' 23 | if(A==0){ | ^~ a.cc:26:7: error: expected unqualified-id before 'if' 26 | if(A>0){ | ^~ a.cc:29:5: error: expected declaration before '}' token 29 | } | ^
s029156021
p04033
C++
#include<iostream> using namespace std; int main() { long long a,b; cin>>a>>b; if(a > 0) cout<<"Positive"; if(a < 0 && b < 0) cout<<"Negative"; if(a == 0 || a < 0 && b > 0) cout<<"Zero" return 0; }
a.cc: In function 'int main()': a.cc:9:46: error: expected ';' before 'return' 9 | if(a == 0 || a < 0 && b > 0) cout<<"Zero" | ^ | ; 10 | return 0; | ~~~~~~
s775484283
p04033
C++
//hi
/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
s058057156
p04033
C++
a,b=int(input().split()) if b < 0: if (b-a+1) % 2 == 0: ans = 'Positive' elif (b-a+1) % 2 == 1: ans = 'Negative' elif a > 0: ans='Positive' else ans='Zeros' print(ans)
a.cc:4:15: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 4 | ans = 'Positive' | ^~~~~~~~~~ a.cc:6:15: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 6 | ans = 'Negative' | ^~~~~~~~~~ a.cc:8:6: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 8 | ans='Positive' | ^~~~~~~~~~ a.cc:10:6: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 10 | ans='Zeros' | ^~~~~~~ a.cc:1:1: error: 'a' does not name a type 1 | a,b=int(input().split()) | ^
s392986974
p04033
C++
#include <bits/stdc++.h> #define F first #define S second #define all(a) a.begin(),a.end() #define setDP(arr) memset(arr,-1,sizeof arr) #define Clear(arr) memset(arr,0,sizeof arr) #define oo 2000000000 #define inf 1000000000000000000 #define P1 31 #define P2 37 #define M 1000000007 #define M2 1000000009 #define pii pair<ll,ll> typedef long long ll; using namespace std; const int N = 255001; const int SQRTN = 320; const int LOGN = 20; const long double PI = acos(-1); const long double TAU = 2*PI; int a,b; string solve(int a , int b){ if(a==0||b==0)return "Zero"; if(a<0&&b>0)return "Zero"; if(a>0)return "Positive"; if((b-a)&1)return "Positive"; return "Negative"; } string calc(int a , int b){ int x = 1; for(int i = a ; i<=b ; i++)x*=i; if(x>0)return "Positive"; if(x<0)return "Negative"; return "Zero"; } signed main(){ cin >> a>> b; cout <<solve(i,j) << endl; }
a.cc: In function 'int main()': a.cc:41:18: error: 'i' was not declared in this scope 41 | cout <<solve(i,j) << endl; | ^ a.cc:41:20: error: 'j' was not declared in this scope; did you mean 'jn'? 41 | cout <<solve(i,j) << endl; | ^ | jn
s877482402
p04033
C++
#include <bits/stdc++.h> #define F first #define S second #define all(a) a.begin(),a.end() #define setDP(arr) memset(arr,-1,sizeof arr) #define Clear(arr) memset(arr,0,sizeof arr) #define oo 2000000000 #define inf 1000000000000000000 #define P1 31 #define P2 37 #define M 1000000007 #define M2 1000000009 #define pii pair<ll,ll> typedef long long ll; using namespace std; const int N = 255001; const int SQRTN = 320; const int LOGN = 20; const long double PI = acos(-1); const long double TAU = 2*PI; int a,b; string solve(int a , int b){ if(a==0||b==0)return "Zero"; if(a<0&&b>0)return "Zero"; if(a>0)return "Positive"; if((b-a)&1)return "Positive"; return "Negative"; } string calc(int a , int b){ int x = 1; for(int i = a ; i<=b ; i++)x*=i; if(x>0)return "Positive"; if(x<0)return "Negative"; return "Zero"; } int main(){ cin >> a>> b; cout <<solve(i,j) << endl; }
a.cc: In function 'int main()': a.cc:41:18: error: 'i' was not declared in this scope 41 | cout <<solve(i,j) << endl; | ^ a.cc:41:20: error: 'j' was not declared in this scope; did you mean 'jn'? 41 | cout <<solve(i,j) << endl; | ^ | jn
s804533403
p04033
C++
#include<iostream> using namespace std; int main(){ int a,b; cin >> a >> b; if(a>0)cout << "Positive" << endl; else if(a<=0 && b>=0) << "Zero" << endl; else{ if((a-b)%2==0)cout<<"Negative" << endl; else cout << "Positive" << endl; } }
a.cc: In function 'int main()': a.cc:8:31: error: expected primary-expression before '<<' token 8 | else if(a<=0 && b>=0) << "Zero" << endl; | ^~
s617423120
p04033
C++
#include<iostream> using namespace std; int main(){ int a,b; cin >> a >> b; if(a>0)cout << "Positive" << endl; else if(a<=0 && b>=0)cout << "Zero" << endl; else{ if((a-b)%2==0)cout<<"Negative" << endl; else cout << "Positive" << endl } }
a.cc: In function 'int main()': a.cc:11:40: error: expected ';' before '}' token 11 | else cout << "Positive" << endl | ^ | ; 12 | } | ~
s154629449
p04033
C++
#include<iostream> using namespace std; int main(){ int a,b; cin >> a >> b; if(a>0)cout << "Positive" << endl; else if(a<=0 && b>=0) << "Zero" << endl; else{ if((a-b)%2==0)cout<<"Negative" << endl; else cout << "Positive" << endl } }
a.cc: In function 'int main()': a.cc:8:31: error: expected primary-expression before '<<' token 8 | else if(a<=0 && b>=0) << "Zero" << endl; | ^~ a.cc:11:40: error: expected ';' before '}' token 11 | else cout << "Positive" << endl | ^ | ; 12 | } | ~
s928227895
p04033
C++
include<bits/stdc++.h> using namespace std; int main() { int a,b,ju; cin>>a>>b; ju=b-a+1;//数字个数 if(a>0) { cout<<"Positive"<<endl; return 0; } if(a<0&&b<0&&ju%2==1)//刚开始没想到负负得正,WA了多次 { cout<<"Negative"<<endl; return 0; } if(a<=0&&b>=0) { cout<<"Zero"<<endl; return 0; } cout<<"Positive"<<endl; return 0; }
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:5: error: 'cin' was not declared in this scope 7 | cin>>a>>b; | ^~~ a.cc:11:9: error: 'cout' was not declared in this scope 11 | cout<<"Positive"<<endl; | ^~~~ a.cc:11:27: error: 'endl' was not declared in this scope 11 | cout<<"Positive"<<endl; | ^~~~ a.cc:16:9: error: 'cout' was not declared in this scope 16 | cout<<"Negative"<<endl; | ^~~~ a.cc:16:27: error: 'endl' was not declared in this scope 16 | cout<<"Negative"<<endl; | ^~~~ a.cc:21:9: error: 'cout' was not declared in this scope 21 | cout<<"Zero"<<endl; | ^~~~ a.cc:21:23: error: 'endl' was not declared in this scope 21 | cout<<"Zero"<<endl; | ^~~~ a.cc:24:5: error: 'cout' was not declared in this scope 24 | cout<<"Positive"<<endl; | ^~~~ a.cc:24:23: error: 'endl' was not declared in this scope 24 | cout<<"Positive"<<endl; | ^~~~
s148699830
p04033
C++
#include<cstdio> #include <bits/stdc++.h> using namespace std; int a,b; int main(){ scanf("%d%d",&a,&b); if(a>0)puts("Positive"); else if(b>=0)puts("Zero") else if((a&1)^(b&1))puts("Positive"); else puts("Negative"); return 0; }
a.cc: In function 'int main()': a.cc:8:30: error: expected ';' before 'else' 8 | else if(b>=0)puts("Zero") | ^ | ; 9 | else if((a&1)^(b&1))puts("Positive"); | ~~~~
s172092250
p04033
C++
#include<cstdio> using namespace std; int a,b; int main(){ scanf("%d%d",&a,&b); if(a>0)puts("Positive"); else if(b>=0)puts("Zero") else if((a&1)^(b&1))puts("Positive"); else puts("Negative"); return 0; }
a.cc: In function 'int main()': a.cc:7:30: error: expected ';' before 'else' 7 | else if(b>=0)puts("Zero") | ^ | ; 8 | else if((a&1)^(b&1))puts("Positive"); | ~~~~
s371699907
p04033
C++
#include <iostream> using namespace std; int main(){ long long int i,j; cin>>i>>j; if(i>0&&j>0){ cout<<"Positive" ;return 0; } if(i==0||j==0){ cout<<"Zero";return 0; } if(i>0&&j<0){ cout<<"Zero";return 0; } if(i<0&&j>0){ cout<<"Zero";return 0; } if(j==i) cout<<"Negative" int k=j-i; if(k%2==0) cout<<"Positive"; else cout<<"Negative"; }
a.cc: In function 'int main()': a.cc:18:30: error: expected ';' before 'int' 18 | if(j==i) cout<<"Negative" | ^ | ; 19 | int k=j-i; | ~~~ a.cc:20:8: error: 'k' was not declared in this scope 20 | if(k%2==0) cout<<"Positive"; | ^
s897415189
p04033
C++
#include<iostream> #include<cmath> #include<numeric> #include<string> #include<algorithm> #include<vector> #include<map> #define rep(i,n) for(int i=0;i<n;i++) #define rep1(i,n) for(int i=1;i<n;i++) #define int64 long long #define modbig (10*10*10*10*10*10*10*10*10+7) using namespace std; int main(){ int a,b; cin>>a>>b; if(a<=0 && 0<=b){ cout<"Zero"; }else if(b<0 && (b-a)%2==0){ cout<<"Negative"; }else{ cout<<"Positive"; } }
a.cc: In function 'int main()': a.cc:18:9: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [5]') 18 | cout<"Zero"; | ~~~~^~~~~~~ | | | | | const char [5] | std::ostream {aka std::basic_ostream<char>} In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:18:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 18 | cout<"Zero"; | ^~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:18:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 18 | cout<"Zero"; | ^~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:18:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 18 | cout<"Zero"; | ^~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:18:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 18 | cout<"Zero"; | ^~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:18:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>' 18 | cout<"Zero"; | ^~~~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:18:10: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 18 | cout<"Zero"; | ^~~~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:18:10: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 18 | cout<"Zero"; | ^~~~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:18:10: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'const char*' 18 | cout<"Zero"; | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:18:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 18 | cout<"Zero"; | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed: a.cc:18:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 18 | cout<"Zero"; | ^~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3901 | operator<(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed: a.cc:18:10: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 18 | cout<"Zero"; | ^~~~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:18:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::tuple<_UTypes ...>' 18 | cout<"Zero"; | ^~~~~~ In file included from /usr/include/c++/14/vector:66, from a.cc:6: /usr/include/c++/14/bits/stl_vector.h:2089:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)' 2089 | operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:2089:5: note: template argument deduction/substitution failed: a.cc:18:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::vector<_Tp, _Alloc>' 18 | cout<"Zero"; | ^~~~~~ In file included from /usr/include/c++/14/map:63, from a.cc:7: /usr/include/c++/14/bits/stl_map.h:1550:5: note: candidate: 'template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator<(const map<_Key, _Tp, _Compare, _Allocator>&, const map<_Key, _Tp, _Compare, _Allocator>&)' 1550 | operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_map.h:1550:5: note: template argument deduction/substitution failed: a.cc:18:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::map<_Key, _Tp, _Compare, _Allocator>' 18 | cout<"Zero"; | ^~~~~~ In file included from /usr/include/c++/14/map:64: /usr/include/c++/14/bits/stl_multimap.h:1172:5: note: candidate: 'template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator<(const multimap<_Key, _Tp, _Compare, _Allocator>&, const multimap<_Key, _Tp, _Compare, _Allocator>&)' 1172 | operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_multimap.h:1172:5: note: template argument deduction/substitution failed: a.cc:18:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::multimap<_Key, _Tp, _Compare, _Allocator>' 18 | cout<"Zero"; | ^~~~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<c
s609822212
p04033
C++
#include <iostream> int main(void) { int a, b; std::cin >> a >> b; if(a <= 0 && b >= 0) std::cout << 'Zero' <<std::endl; if(a > 0 && b > 0) std::cout << 'Positive' <<std::endl; if(a < 0 && b < 0 && (b - a + 1) % 2 + 1) { std::cout << 'Positive' <<std::endl; } else { std::cout << 'Negative' <<std::endl; } return; }
a.cc:7:37: warning: multi-character character constant [-Wmultichar] 7 | if(a <= 0 && b >= 0) std::cout << 'Zero' <<std::endl; | ^~~~~~ a.cc:8:35: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 8 | if(a > 0 && b > 0) std::cout << 'Positive' <<std::endl; | ^~~~~~~~~~ a.cc:10:18: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 10 | std::cout << 'Positive' <<std::endl; | ^~~~~~~~~~ a.cc:12:18: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 12 | std::cout << 'Negative' <<std::endl; | ^~~~~~~~~~ a.cc: In function 'int main()': a.cc:15:3: error: return-statement with no value, in function returning 'int' [-fpermissive] 15 | return; | ^~~~~~