submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s719015983
p04033
C++
#include"bits/stdc++.h" using namespace std; unsigned long long int a,b; int main(){ cin>>a>>b; if(a>0)cout<<"Postive"; 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:9:21: error: call of overloaded 'abs(long long unsigned int&)' is ambiguous 9 | else if((abs(b)-abs(a))%2==0)cout<<"Positive"; | ~~~^~~ In file included from /usr/include/c++/14/cstdlib:79, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42, from a.cc:1: /usr/include/stdlib.h:980:12: note: candidate: 'int abs(int)' 980 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; | ^~~ In file included from /usr/include/c++/14/cstdlib:81: /usr/include/c++/14/bits/std_abs.h:137:3: note: candidate: 'constexpr __float128 std::abs(__float128)' 137 | abs(__float128 __x) | ^~~ /usr/include/c++/14/bits/std_abs.h:85:3: note: candidate: 'constexpr __int128 std::abs(__int128)' 85 | abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; } | ^~~ /usr/include/c++/14/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)' 79 | abs(long double __x) | ^~~ /usr/include/c++/14/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)' 75 | abs(float __x) | ^~~ /usr/include/c++/14/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)' 71 | abs(double __x) | ^~~ /usr/include/c++/14/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)' 61 | abs(long long __x) { return __builtin_llabs (__x); } | ^~~ /usr/include/c++/14/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)' 56 | abs(long __i) { return __builtin_labs(__i); } | ^~~ a.cc:9:28: error: call of overloaded 'abs(long long unsigned int&)' is ambiguous 9 | else if((abs(b)-abs(a))%2==0)cout<<"Positive"; | ~~~^~~ /usr/include/stdlib.h:980:12: note: candidate: 'int abs(int)' 980 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; | ^~~ /usr/include/c++/14/bits/std_abs.h:137:3: note: candidate: 'constexpr __float128 std::abs(__float128)' 137 | abs(__float128 __x) | ^~~ /usr/include/c++/14/bits/std_abs.h:85:3: note: candidate: 'constexpr __int128 std::abs(__int128)' 85 | abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; } | ^~~ /usr/include/c++/14/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)' 79 | abs(long double __x) | ^~~ /usr/include/c++/14/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)' 75 | abs(float __x) | ^~~ /usr/include/c++/14/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)' 71 | abs(double __x) | ^~~ /usr/include/c++/14/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)' 61 | abs(long long __x) { return __builtin_llabs (__x); } | ^~~ /usr/include/c++/14/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)' 56 | abs(long __i) { return __builtin_labs(__i); } | ^~~
s159129102
p04033
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <numeric> #include <cmath> #include <unordered_map> using namespace std; using ll = long long; void _cin(){} template <class Head, class... Tail> void _cin(Head&& head, Tail&&... tail){ cin >> head; _cin(forward<Tail>(tail)...); } void _cout(){ cout << "\n"; } template <class Head, class... Tail> void _cout(Head&& head, Tail&&... tail){ cout << head; _cout(forward<Tail>(tail)...); } int gcd(int a, int b){ return (b == 0) ? a : gcd(b, a % b); } #define For(i, n) for(int i = 0; i < (n); i ++) #define Rep(n) For(_, n) #define Range(c) c.begin(), c.end() #define RevRange(c) c.rbegin(), c.rend() #define Contains(c, x) (find(Range(c), x) != c.end()) #define Search(rb, re, x) distance(rb, find(rb, re, x)) #define Sort(a) sort(Range(a)) #define DeSort(a) sort(RevRange(a)) #define Reverse(c) reverse(Range(c)) #define Vec2(T, n, m, xs, x0) vector<vector<T>> xs(n, vector<T>(m, x0)) #define Sum(a) accumulate(Range(a), 0) #define Cusum(T, xs, sxs) vector<T> sxs(xs.size()+1); For(i, (int)xs.size()) sxs[i+1] = sxs[i] + xs[i] #define Cin(T, ...) T __VA_ARGS__; _cin(__VA_ARGS__) #define Cins(T, n, xs) vector<T> xs(n); For(i, n) cin >> xs[i] #define Cins2(T, n, xs, ys) vector<T> xs(n), ys(n); For(i, n) cin >> xs[i] >> ys[i] #define Cins3(T, n, xs, ys, zs) vector<T> xs(n), ys(n), zs(n); For(i, n) cin >> xs[i] >> ys[i] >> zs[i] #define Cinss(T, n, m, xs) Vec2(T, n, m, xs); For(i, n) For(j, m) cin >> xs[i][j] #define Cinm(T, n, map) unordered_map<T, int> map; Rep(n){ Cin(T, x); map[x] ++; } #define Cout(...) _cout(__VA_ARGS__) #define Couts(xs) for(const auto &e : xs) cout << e << " "; cout << "\n" #define Coutyn(cond) Cout((cond) ? "yes" : "no") #define CoutYn(cond) Cout((cond) ? "Yes" : "No") #define CoutYN(cond) Cout((cond) ? "YES" : "NO") // constexpr int MOD = 1e9+7; int main(void){ Cin(int, a, b); Cout((a > 0) ? "Positive" : (b < 0) : "Negative" : "Zero"); }
a.cc: In function 'int main()': a.cc:44:18: error: operands to '?:' have different types 'const char*' and 'bool' 44 | Cout((a > 0) ? "Positive" : (b < 0) : "Negative" : "Zero"); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ a.cc:34:25: note: in definition of macro 'Cout' 34 | #define Cout(...) _cout(__VA_ARGS__) | ^~~~~~~~~~~
s341072117
p04033
C++
#include<bits/stdc++.h> using namespace std; int main() { long long a,b,c=1; cin>>a>>b; for(int i=a;i<=b;i++) { c*=i; } if(c>0) cout<<"Positive"<<endl; if(c<0) cout<<"Negative"<<endl; if(c==0) cout<<"Zero"<<endl; return 0; }<endl; return 0; }
a.cc:18:2: error: expected unqualified-id before '<' token 18 | }<endl; | ^ a.cc:19:9: error: expected unqualified-id before 'return' 19 | return 0; | ^~~~~~ a.cc:20:1: error: expected declaration before '}' token 20 | } | ^
s755949880
p04033
C++
#include <stdio.h> #include <iostream> #include <string> #include <algorithm> #include <typeinfo> typedef long long ll; int main(){ ll a, b; ll tmp=1; std::cin >> a >> b; if (a <= 0 && b>=0) std::cout << "Zero" << "\n"; if (a > 0) std::cout << "Positive" << "\n"; else if (a < 0){ if ((b-a+1)%2 != 0) cout << "Negative" << "\n"; else cout << "Positive" << "\n"; } return 0; }
a.cc: In function 'int main()': a.cc:16:29: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 16 | if ((b-a+1)%2 != 0) cout << "Negative" << "\n"; | ^~~~ | std::cout In file included from a.cc:2: /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:17:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 17 | else cout << "Positive" << "\n"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s030793727
p04033
C++
#include<bits/stdc++.h> #define all(x) (x).begin(),(x).end() typedef long long ll; #define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i) using namespace std; #define sz(x) ((int)(x).size()) #define ZERO(a) memset(a,0,sizeof(a)) #define MINUS(a) memset(a,0xff,sizeof(a)) #define MEMSET(v, h) memset((v), h, sizeof(v)) template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; } #define pb push_back #define mp make_pair #define y0 y3487465 #define y1 y8687969 #define j0 j1347829 #define j1 j234892 ll gcd(ll a,ll b){return b?gcd(b,a%b):a;} const ll INF = 1LL<<60; int main() { ll a, b; cin >> a >> b; ll cal = 0; if(a < 0 && b > 0 || a > 0 && b < 0){ cout << 0 << endl; return 0; } else if(a > 0 && b > 0){ cout << "Positive" << endl; return 0; } else{ if(-1 * x > -1 * y) cal = -1 * x - (-1 * y) + 1; else cal = -1 * y - (-1 * x) + 1; if(cal % 2 == 0) cout << "Positive" << endl; else cout << "Negative" << endl; } }
a.cc: In function 'int main()': a.cc:34:15: error: 'x' was not declared in this scope 34 | if(-1 * x > -1 * y) cal = -1 * x - (-1 * y) + 1; | ^ a.cc:34:24: error: 'y' was not declared in this scope 34 | if(-1 * x > -1 * y) cal = -1 * x - (-1 * y) + 1; | ^
s802915468
p04033
C++
#include<bits/stdc++.h> #define all(x) (x).begin(),(x).end() typedef long long ll; #define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i) using namespace std; #define sz(x) ((int)(x).size()) #define ZERO(a) memset(a,0,sizeof(a)) #define MINUS(a) memset(a,0xff,sizeof(a)) #define MEMSET(v, h) memset((v), h, sizeof(v)) template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; } #define pb push_back #define mp make_pair #define y0 y3487465 #define y1 y8687969 #define j0 j1347829 #define j1 j234892 ll gcd(ll a,ll b){return b?gcd(b,a%b):a;} const ll INF = 1LL<<60; int main() { ll a, b; cin >> a >> b; ll cal = 0; if(a < 0 && b > 0 || a > 0 && b < 0){ cout << 0 << endl; return 0; } else if(a > 0 && b > 0){ cout << "Positive" << endl; return 0; } else{ if(-x > -y) cal = -x - (-y) + 1; else cal = -y - (-x) + 1; if(cal % 2 == 0) cout << "Positive" << endl; else cout << "Negative" << endl; } }
a.cc: In function 'int main()': a.cc:34:11: error: 'x' was not declared in this scope 34 | if(-x > -y) cal = -x - (-y) + 1; | ^ a.cc:34:16: error: 'y' was not declared in this scope 34 | if(-x > -y) cal = -x - (-y) + 1; | ^
s447798272
p04033
C++
#include<iostream> using namespace std; int main(){ ll a,b; cin>>a>>b; if(a<=0 && b>=0) cout << "Zero" << endl; else if(a < 0 && b < 0 && (b-a)%2 == 1) cout << "Negative" << endl; else cout << "Positive" << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:3: error: 'll' was not declared in this scope 6 | ll a,b; | ^~ a.cc:7:8: error: 'a' was not declared in this scope 7 | cin>>a>>b; | ^ a.cc:7:11: error: 'b' was not declared in this scope 7 | cin>>a>>b; | ^
s708372675
p04033
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b; if(a > 0){ cout << "Positive" }else if(a == 0){ cout << "Zero"; }else{ if(b < 0){ if(abs(a-b)%2 == 0){ cout << "Negetive"; }else{ cout << "Positive"; } }else{ cout << "Zero"; } } return 0; }
a.cc: In function 'int main()': a.cc:7:27: error: expected ';' before '}' token 7 | cout << "Positive" | ^ | ; 8 | }else if(a == 0){ | ~
s755009621
p04033
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, b, count = 0; cin >> a >> b; if(a <=0 && b >= 0){ cout << "Zero" << endl; } else{ for(int i = 0; i < b - a + 1; i++){ if(a + i < 0){ count++; } } if(count % 2 == 0){ cout << "Positive" << endl; } else{ cout << "Negative" << endl; } } }
a.cc: In function 'int main()': a.cc:6:10: error: 'a' was not declared in this scope 6 | cin >> a >> b; | ^
s650410438
p04033
C++
#include<iostream> #include<vector> #include<sstream> #include<string> #include<numeric> #include <algorithm> #include<math.h> #include<cstdio> #include<string.h> #include<unistd.h> #include <array> #include <map> #define ALL(a) (a).begin(),(a).end() using namespace std; typedef long long ll; struct point{ int x; int y; }; int gcd(int a, int b) { return a == 0 ? b : gcd(b % a, a); } int lcm( int m, int n ) { // 引数に0がある場合は0を返す if ( ( 0 == m ) || ( 0 == n ) ) return 0; return ((m / gcd(m, n)) * n); // lcm = m * n / gcd(m,n) }//lcm int input(){ int x; cin>>x; return x; } int moji(char in) { int ans = (int)in-(int)'a'; if((ans < 0) || (ans > 25)){ ans = 26; } return ans; } const int VV=10;//場合に応じてVVの値のみ変更する必要あり //dijkstra(s)sがスタート地点でそこからの最短距離を配列dで表す。正の重みのみ使用可能 int cost[VV][VV]; int d[VV]; bool used[VV]; void dijkstra(int s){ fill(d,d+VV,100000); fill(used,used+VV,false); d[s]=0; while(true){ int v=-1; for(int u=0;u<VV;u++){ if(!used[u]&&(v==-1||d[u]<d[v]))v=u; } if(v==-1)break; used[v]=true; for(int u=0;u<VV;u++){ d[u]=min(d[u],d[v]+cost[v][u]); } } } int compare_int(const void *a, const void *b)//qsort(quick sort利用時に使用) { return *(int*)a - *(int*)b; } int binary_searchh(long long x,long long k[],int n){ int l=0; int r=n; while(r-l>=1){ int i=(l+r)/2; if(k[i]==x)return i; else if(k[i]<x)l=i+1; else r=i; } return -1; } struct File { int aa; int bb; File(const int& aa, const int& bb) : aa(aa), bb(bb) {} }; bool operator<(const File& a, const File& b) { // ファイル種別、ファイル名の順番で優先順位を付けて比較 return std::tie(a.aa, a.bb) < std::tie(b.aa, b.bb); } long long kaijo(long long x){ long long l=10*10*10*10*10*10*10*10*10+7; long long sum=1; for(int i=x;i>0;i--){ sum*=i; if(sum>l){ sum%=l; } } return sum; } int main(){ long long a,b; cin>>a>>b; if(a==0||b==0){ cout<<"Zero"<<endl; }else if(a<0&&b>0){ cout<<"Zero"<<endl; }else{ if(a>0){ cout<<"Positive"<<endl; }else{ if(B-A+1%2==0){ cout<<"Positive"<<endl; }else{ cout<<"Negative"<<endl; } } } }
a.cc: In function 'int main()': a.cc:132:10: error: 'B' was not declared in this scope 132 | if(B-A+1%2==0){ | ^ a.cc:132:12: error: 'A' was not declared in this scope 132 | if(B-A+1%2==0){ | ^
s800775002
p04033
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int a,b,c=1; cin>>a>>b; int x=a; for(int i=0;i<b-a+1;i++){ c=c*x; x++; if(x==0){ cout<<"Zero"<<endl; break } } if(c>0){ cout<<"Positive"<<endl; } else if(c<0) cout<<"Negative"<<endl; }
a.cc: In function 'int main()': a.cc:13:10: error: expected ';' before '}' token 13 | break | ^ | ; 14 | } | ~
s793541714
p04033
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int a,b,c=1; cin>>a>>b; int x=a; for(int i=0;i<b-a+1;i++){ c=c*x; x++; if(x==0) cout<<"Zero"<<endl; break } else if(c>0){ cout<<"Positive"<<endl; } else if(c<0) cout<<"Negative"<<endl; }
a.cc: In function 'int main()': a.cc:13:10: error: expected ';' before '}' token 13 | break | ^ | ; 14 | } | ~ a.cc:15:3: error: 'else' without a previous 'if' 15 | else if(c>0){ | ^~~~
s953849524
p04033
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int a,b,c=1; cin>>a>>b; for(int i=0;i<a-b+1;i++){ int c*=a; a++; } if(c==0){ cout<<"Zero"<<endl; } else if(c>0){ cout<<"Positibe"<<endl; } else cout<<"Negative"<<endl; }
a.cc: In function 'int main()': a.cc:8:10: error: expected initializer before '*=' token 8 | int c*=a; | ^~
s519922679
p04033
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int a,b; cin>>a>>b; for(int i=0;i<a-b+1;i++){ int c*=a; a++; } if(c==0){ cout<<"Zero"<<endl; } else if(c>0){ cout<<"Positibe"<<endl; } else cout<<"Negative"<<endl; }
a.cc: In function 'int main()': a.cc:8:10: error: expected initializer before '*=' token 8 | int c*=a; | ^~ a.cc:11:6: error: 'c' was not declared in this scope 11 | if(c==0){ | ^
s823472670
p04033
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int a,b; cin>>a>>b; for(i=0;i<a-b+1;i++){ int c*=a; a++; } if(c==0){ cout<<"Zero"<<endl; } else if(c>0){ cout<<"Positibe"<<endl; } else cout<<"Negative"<<endl; }
a.cc: In function 'int main()': a.cc:7:7: error: 'i' was not declared in this scope 7 | for(i=0;i<a-b+1;i++){ | ^ a.cc:8:10: error: expected initializer before '*=' token 8 | int c*=a; | ^~ a.cc:11:6: error: 'c' was not declared in this scope 11 | if(c==0){ | ^
s419264279
p04033
C++
#include<bts/stdc++.h> using namespace std; typedef long long LL; LL a,b; int main(){ cin>>a>>b; LL c=a*b; if(c==0){ cout<<"Zero"<<endl; }else if(c>0){ cout<<"Positive"<<endl; }else if(c>0){ cout<<"Negative"<<endl; } return 0; }
a.cc:1:9: fatal error: bts/stdc++.h: No such file or directory 1 | #include<bts/stdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s215347072
p04033
C++
#include<iostream> using namespace std; int main() { int a,b; 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; }
a.cc: In function 'int main()': a.cc:9:14: error: lvalue required as left operand of assignment 9 | if (a*b=0) cout<<"Zero"<<endl; | ~^~
s519377254
p04033
C
#include<stdio.h> int main() { int a, b, i = 0; scanf_s("%d", &a); scanf_s("%d", &b); if (a > 0) { if (b < 0) { printf("Zero"); } else {//aもbもどちらも正の数 printf("Positive"); } } else if (a < 0) { if (b > 0) { printf("Zero"); } else if ((a - b) % 2 == 0) { printf("Negative"); } else { printf("Positive"); } } return 0; }
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 7 | scanf_s("%d", &a); | ^~~~~~~ | scanf
s394476183
p04033
C++
#include <iostream> #include<stdio.h> #include<bits/stdc++.h> using namespace std; int main() { int x,y; cin >>x>>y; if (x> 0 && y > 0) { cout << "Positive" << endl; } else if (max(x,y) >= 0 && min(x,y) <= 0 || x == 0 || y == 0) { cout << "Zero" << endl; } else { if ((abs(min(x, y)) - abs(max(x, y))) % 2 == 0) { cout << "Negative" << endl; } else { cout << "Positive" << endl; } } return 0;
a.cc: In function 'int main()': a.cc:26:14: error: expected '}' at end of input 26 | return 0; | ^ a.cc:6:1: note: to match this '{' 6 | { | ^
s923589274
p04033
C++
-10 -10 Positive
a.cc:1:1: error: expected unqualified-id before '-' token 1 | -10 -10 | ^
s328118034
p04033
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <functional> #include <array> #include <math.h> #include <sstream> typedef long long ll; using namespace std; int main(int argc, char const *argv[]) { int a, b; std::cin >> a >> b; if (a > 0 && b > 0) { std::cout << "Positive" << std::endl; } else if ((a >= 0 && b =< 0) || (b >= 0 && a <= 0)) { std::cout << "Zero" << std::endl; } else { if (b-a+1 % 2 == 0) { std::cout << "Positive" << std::endl; } else { std::cout << "Negative" << std::endl; } } return 0; }
a.cc: In function 'int main(int, const char**)': a.cc:18:30: error: expected primary-expression before '<' token 18 | } else if ((a >= 0 && b =< 0) || (b >= 0 && a <= 0)) { | ^
s200729872
p04033
C++
#include<iostream> #include<iomanip> #include<cstdio> #include<cstdlib> #include<cmath> #include<cstring> #include<algorithm> #include<queue> #include<stack> #include<bitset> #include<vector> #define ll long long #define ull unsigned long long #define db double #define si short int using namespace std; ll read(){ ll ans=0,fh=1; char c=getchar(); while(c<'0'||c>'9'){ if(c=='-')fh=-1; c=getchar(); } while(c>='0'&&c<='9'){ ans=ans*10+c-'0'; c=getchar(); } return ans*fh; } ll a,b,ans=1; int main(){ a=read(); b=read(); for(int i=a;i<=b;i++){ ans*=i; } if(ans>0)cout<<"Positive"; if(ans<0)cout<<"Negative"; if(ans==0)cout<<"Zero"; return 0; } #include<iostream> #include<iomanip> #include<cstdio> #include<cstdlib> #include<cmath> #include<cstring> #include<algorithm> #include<queue> #include<stack> #include<bitset> #include<vector> #define ll long long #define ull unsigned long long #define db double #define si short int using namespace std; ll read(){ ll ans=0,fh=1; char c=getchar(); while(c<'0'||c>'9'){ if(c=='-')fh=-1; c=getchar(); } while(c>='0'&&c<='9'){ ans=ans*10+c-'0'; c=getchar(); } return ans*fh; } ll a,b,ans=1; int main(){ a=read(); b=read(); if(a>b)swap(a,b); for(int i=a;i<=b;i++){ if(i<0)ans*=-1; if(i==0){ ans=0;break; } } if(ans>0)cout<<"Positive"; if(ans<0)cout<<"Negative"; if(ans==0)cout<<"Zero"; return 0; }
a.cc:58:4: error: redefinition of 'long long int read()' 58 | ll read(){ | ^~~~ a.cc:17:4: note: 'long long int read()' previously defined here 17 | ll read(){ | ^~~~ a.cc:71:4: error: redefinition of 'long long int a' 71 | ll a,b,ans=1; | ^ a.cc:30:4: note: 'long long int a' previously declared here 30 | ll a,b,ans=1; | ^ a.cc:71:6: error: redefinition of 'long long int b' 71 | ll a,b,ans=1; | ^ a.cc:30:6: note: 'long long int b' previously declared here 30 | ll a,b,ans=1; | ^ a.cc:71:8: error: redefinition of 'long long int ans' 71 | ll a,b,ans=1; | ^~~ a.cc:30:8: note: 'long long int ans' previously defined here 30 | ll a,b,ans=1; | ^~~ a.cc:72:5: error: redefinition of 'int main()' 72 | int main(){ | ^~~~ a.cc:31:5: note: 'int main()' previously defined here 31 | int main(){ | ^~~~
s065395319
p04033
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c=1; cin>>a>>b; if(a>0) cout<<"Positive"; else { for(int i=a;i<=b;i++) c*=i; if(c>0) cout<<"Positive"; if(c==0) cout<<"Zero"; if(c<0) cout<<"Negative"; }
a.cc: In function 'int main()': a.cc:19:2: error: expected '}' at end of input 19 | } | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s467226421
p04033
C++
#include<iostream> #include<stdio.h> #include<string.h> using namespace std; int jiecheng(int x) { int ans=1; for(int i=1;i<=x;i++)ans*=i; return ans; } int main() { unsigned long long sum=0; int a; cin>>a>>sum; sum=jiecheng(m); if(a>0)cout<<"Positive"; else if(sum>=0)cout<<"Zero"; else if((a&1)^(sum&1))cout<<"Positive"; else cout<<"Negative"; return 0; }
a.cc: In function 'int main()': a.cc:16:22: error: 'm' was not declared in this scope 16 | sum=jiecheng(m); | ^
s078771191
p04033
C++
#include<iostream> #include<stdio.h> #include<string.h> using namespace std; int jiecheng(int x) { int ans=1; for(int i=1;i<=x;i++)ans*=i; return ans; } int main() { unsigned long long sum=0; int m; cin>>m; sum=jiecheng(m); if(a>0)cout<<"Positive"; else if(b>=0)cout<<"Zero"; else if((a&1)^(b&1))cout<<"Positive"; else cout<<"Negative"; return 0; }
a.cc: In function 'int main()': a.cc:17:12: error: 'a' was not declared in this scope 17 | if(a>0)cout<<"Positive"; | ^ a.cc:18:13: error: 'b' was not declared in this scope 18 | else if(b>=0)cout<<"Zero"; | ^
s705697998
p04033
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; if(a>0){ cout<<"Positive"<<endl; } else if(0>b&&(a-b)%2){ cout<<"Positive"<<endl; } else if(0>b&&(a-b)%==1){ cout<<"Negative"<<endl; } else{ cout<<"Zero"<<endl; } }
a.cc: In function 'int main()': a.cc:12:30: error: expected primary-expression before '=' token 12 | else if(0>b&&(a-b)%==1){ | ^
s599898073
p04033
C++
#include <bits/stdc++.h> #define pb push_back #define ppb pop_back #define fi first #define se second #define mid ((x + y) / 2) #define left (ind * 2) #define right (ind * 2 + 1) #define mp make_pair #define timer ((double)clock() / CLOCKS_PER_SEC) #define endl "\n" #define spc " " #define d1(x) cerr<<#x<<":"<<x<<endl #define d2(x, y) cerr<<#x<<":"<<x<<" "<<#y<<":"<<y<<endl #define d3(x, y, z) cerr<<#x<<":"<<x<<" "<<#y<<":"<<y<<" "<<#z<<":"<<z<<endl #define fast_io() ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0) using namespace std; typedef long long int lli; typedef pair<int, int> ii; typedef pair<ii, int> iii; typedef pair<double, double> dd; const int N = (int)(1e6 + 5); const int LOG = (int)(20); int a, b; int main() { fast_io(); // freopen("inp.in", "r", stdin); cin >> a >> b; if(a <= 0 && b >= 0) { cout << "Zero"; return 0; } if(a > 0 && b > 0) { cout << "Positive"; return 0; } if(a < 0 && b < 0) { if((a - b) % 2 == 0) { cout << "Positive"; return 0; } else { cout << "Negative"; return 0 } } if(a % 2 == 0) { cout << "Positive"; return 0; } cout << "Negative"; }
a.cc: In function 'int main()': a.cc:51:33: error: expected ';' before '}' token 51 | return 0 | ^ | ; 52 | } | ~
s367583492
p04033
C++
/// Containers Start #include <iostream> #include <string> #include <sstream> #include <set> #include <map> #include <unordered_map> #include <stack> #include <queue> #include <vector> #include <utility> #include <iomanip> #include <sstream> #include <bitset> #include <cstdlib> #include <iterator> #include <algorithm> #include <functional> #include <random> /// C Header Files #include <stdio.h> #include <cstdio> #include <cctype> #include <cmath> #include <math.h> #include <ctime> #include <cstring> /// Containers End using namespace std; /// Math Start #define PI acos(-1.0) #define Pi 3.141592653589793 #define EPS (1e-7) #define INF (0x3f3f3f3f) /// Math End /// Extra Start #define nn '\n' #define pb push_back #define SS stringstream #define ull unsigned long long #define mod 1000000007 #define SIZE 2000001 #define _cin \ ios_base::sync_with_stdio(0); \ cin.tie(0); #define sz(a) int((a).size()) #define space " " #define All(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define Ignore cin.ignore() #define StringToInt \ if (!(istringstream(s) >> n)) \ n = 0; #define SORT(c) sort(All((c))) #define RSORT(c) sort(rall((c))) /// Extra End /// Functions Start template <class T> T gcd(T a, T b) { if (b == 0) return a; return gcd(b, a % b); } template <class T> T lcm(T a, T b) { return a / gcd(a, b) * b; } template <class T> string converter(T n) { SS x; x << n; return x.str(); } string itos(int a) { string s = to_string(a); return s; } template <class T> T mod_pow(T x, T n) { T res = 1; while (n > 0) { if (n & 1) res = res * x % mod; x = x * x % mod; n >>= 1; } return res; } std::vector<std::string> split(const std::string &str, char sep) { std::vector<std::string> v; std::stringstream ss(str); std::string buffer; while (std::getline(ss, buffer, sep)) { v.push_back(buffer); } return v; } #define rep(i, n) for (int i = 0; i < n; i++) #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define for_arr(array) for (auto &i : array) #define FORD(i, a, b) for (int i = (a); i >= (b); i--) #define FORA(arr) for (auto &i : arr) #define Cin(a) cin >> a; #define Cin2(a, b) cin >> a >> b; #define Cin3(a, b, c) cin >> a >> b >> c; #define Cin4(a, b, c, d) cin >> a >> b >> c >> d; #define Cini(a) \ int a; \ cin >> a; #define Cinii(a, b) \ int a, b; \ cin >> a >> b; #define Ciniii(a, b, c) \ int a, b, c; \ cin >> a >> b >> c; #define Cins(s) \ string s; \ cin >> s; #define Cinc(c) \ char c; \ cin >> c; /// Functions End /// Array Start #define SET(a) memset(a, -1, sizeof a) #define CLR(a) memset(a, 0, sizeof a) #define MEM(a, val) memset(a, val, sizeof a) /// Array End /// Debug Start #define deb(x) cout << #x << ": " << x << endl #define deb2(x, y) cout << #x << ": " << x << '\t' << #y << ": " << y << endl #define deb3(x, y, z) cout << #x << ": " << x << '\t' << #y << ": " << y << '\t' << #z << ": " << z << end /// Debug End /// TypeDef Start typedef long long int ll; typedef map<string, int> msi; typedef map<int, int> mii; typedef map<ll, ll> mll; typedef map<char, int> mci; typedef map<int, string> mis; typedef pair<int, int> pii; typedef pair<string, int> psi; typedef pair<string, string> pss; typedef vector<int> vi; typedef vector<string> vs; typedef vector<char> vc; typedef vector<bool> vb; typedef vector<pii> vii; /// TypeDef End // int dx[] = {-1, 0, 1, 0}; // int dy[] = {0, -1, 0, 1}; int dx[] = {-1, 0, 1}; int dy[] = {-1, 0, 1}; /**>>>>>>>>>>>>>>>>>>> END <<<<<<<<<<<<<<<<<<**/ ///topcoder template bool mysort(pair<int, int> a, pair<int, int> b) { return a.second > b.second; } int main(void) { Cinii(a, b); int negative = 0,positive=0,zero=0; for(int i=a,i<=b;i++){ if(i<0) negative++; else if(i>0) positive++; else zero++; } if(zero==0) cout << "Zero" << nn; else if(negative%2==0){ cout << "Positive" << nn; }else{ cout << "Negative" << nn; } return 0; }
a.cc: In function 'int main()': a.cc:186:18: error: expected ';' before '<=' token 186 | for(int i=a,i<=b;i++){ | ^~ | ; a.cc:186:18: error: expected primary-expression before '<=' token 186 | for(int i=a,i<=b;i++){ | ^~
s320708082
p04033
C++
#include <iostream> #include <string> using namespace std; int main() { __int64 a, b; cin >> a >> b; string k; if (a * b <= 0)cout << "Zero" << endl; else if (a > 0 && b > 0) cout << "Positive" << endl; else if (a < 0 && b < 0) { int k = b - a + 1; if (k % 2 == 1) { cout << "Negative" << endl; } else { cout << "Positive" << endl; } } return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'? 6 | __int64 a, b; | ^~~~~~~ | __int64_t a.cc:7:16: error: 'a' was not declared in this scope 7 | cin >> a >> b; | ^ a.cc:7:21: error: 'b' was not declared in this scope 7 | cin >> a >> b; | ^
s594115451
p04033
C++
#include <iostream> #include <string> using namespace std; int main() { __int64 a, b; cin >> a >> b; string k; if (a * b <= 0)cout << "Zero" << endl; else if (a > 0 && b > 0) cout << "Positive" << endl; else if (a < 0 && b < 0) { int k = b - a + 1; if (k % 2 == 1) { cout << "Negative" << endl; } else { cout << "Positive" << endl; } } return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'? 6 | __int64 a, b; | ^~~~~~~ | __int64_t a.cc:7:16: error: 'a' was not declared in this scope 7 | cin >> a >> b; | ^ a.cc:7:21: error: 'b' was not declared in this scope 7 | cin >> a >> b; | ^
s637768745
p04033
C++
#include<iostream> using namespace std; int main() { int a,b; bool c=0; cin>>a>>b; if(a<=0&&b>=0) cout<<"Zero"<<endl; else { for(int i=a;i<b;i++) { if(i<0) c=1-c; } if(c==0) cout<<"Positive"<<endl; else cout<<"Negative"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:18:2: error: expected '}' at end of input 18 | } | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s686644838
p04033
C++
#include <iostream> #include <iomanip> #include <algorithm> #include <vector> #include <map> #include <stack> #include <string> #include <list> #include <math.h> using namespace std; typedef pair<int, int> P; #define ll long long #define mod 1000000007 int main(){ ll a, b; cin >> a >> b; string r; if (a*b <= 0) r = "Zero"; else if (a > 0 && b > 0) r = "Positive"; else if (b - a + 1) % 2 == 0) r = "Positive"; else r = "Negative"; cout << r << endl; return 0; }
a.cc: In function 'int main()': a.cc:24:29: error: expected primary-expression before '%' token 24 | else if (b - a + 1) % 2 == 0) r = "Positive"; | ^
s270859023
p04033
C++
#include <cstdio> #define tin int #define itn int #define tni int #define nit int #define nti int #define pritnf printf #define scnaf scanf #define retrun return #define sizoef sizeof #define ll long long #define inl inline #define br break #define con continue #define mst(a, b) memset(a, b, sizeof(a)) #define fa(x, a, b) for(x= a; x <= b; ++x) #define fb(x, a, b) for(x= a; x >= b; --a) #define infa 0x3f3f3f3f #define infb 0x7fffffff #define infc 1061109567 #define infd 0x7f using namespace std; #define maxa 10 #define maxb 10004 #include <cstring> #include <iostream> itn a, b, x, y; itn main() { scanf("%d%d", &a, &b); if((max(a, b) > 0) && (min(a, b) < 0)) { pritnf("Zero\n"); return 0; } else if((a > 0) && (b > 0)) { pritnf("Positive\n"); return 0; } else if(a == b) { if(a > 0) { pritnf("Positive\n"); return 0; } else if(a < 0) { pritnf("Negative\n"); return 0; } else { pritnf("Zero\n"); return 0; } } elsE { if((max(a, b) - min(a, b)) % 2 == 0) { pritnf("Negative\n"); return 0; } else { pritnf("Positive\n"); return 0; } } } //ciyang原创FV
a.cc: In function 'int main()': a.cc:54:9: error: 'elsE' was not declared in this scope 54 | elsE { | ^~~~
s019602684
p04033
C++
#include<cstdio> using namespace std; int a,b; int main() { scanf("%d%d",&a,&b); if(a>0) printf("Positive\n"); else if(b>=0) printf("Zero\n"); else if((b-a+1)%2==0) printf("Positive\n"); else printf("Negative\n") return 0; }
a.cc: In function 'int main()': a.cc:14:37: error: expected ';' before 'return' 14 | printf("Negative\n") | ^ | ; 15 | return 0; | ~~~~~~
s623811922
p04033
C++
#include<cstdio> using namespace std; int a,b; int main(){ cin>>a>>b; if(a>0)cout<<"Positive"<<endl; else if(b>=0)cout<<"Zero"<<endl; else if((a&1)^(b&1))cout<<"Positive"<<endl; else cout<<"Negative"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope 5 | 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; a.cc:6:12: error: 'cout' was not declared in this scope 6 | if(a>0)cout<<"Positive"<<endl; | ^~~~ a.cc:6:12: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:6:30: error: 'endl' was not declared in this scope 6 | if(a>0)cout<<"Positive"<<endl; | ^~~~ a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' 1 | #include<cstdio> +++ |+#include <ostream> 2 | using namespace std; a.cc:7:18: error: 'cout' was not declared in this scope 7 | else if(b>=0)cout<<"Zero"<<endl; | ^~~~ a.cc:7:18: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:7:32: error: 'endl' was not declared in this scope 7 | else if(b>=0)cout<<"Zero"<<endl; | ^~~~ a.cc:7:32: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' a.cc:8:25: error: 'cout' was not declared in this scope 8 | else if((a&1)^(b&1))cout<<"Positive"<<endl; | ^~~~ a.cc:8:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:8:43: error: 'endl' was not declared in this scope 8 | else if((a&1)^(b&1))cout<<"Positive"<<endl; | ^~~~ a.cc:8:43: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' a.cc:9:10: error: 'cout' was not declared in this scope 9 | else cout<<"Negative"<<endl; | ^~~~ a.cc:9:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:9:28: error: 'endl' was not declared in this scope 9 | else cout<<"Negative"<<endl; | ^~~~ a.cc:9:28: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s386555028
p04033
C++
#include <iostream> #include<algorithm> using namespace std; int main{ int a; int b; cin >> a; cin >> b; if (a == 0 || b == 0 || (a < 0 && b>0)) { cout << "Zero" << endl; } else if (a > 0) { cout << "Positive" << endl; } else { cout << "Negative" << endl; } } }
a.cc:4:5: error: cannot declare '::main' to be a global variable 4 | int main{ | ^~~~ a.cc:5:1: error: expected primary-expression before 'int' 5 | int a; | ^~~ a.cc:5:1: error: expected '}' before 'int' a.cc:4:9: note: to match this '{' 4 | int main{ | ^ a.cc:7:1: error: 'cin' does not name a type 7 | cin >> a; | ^~~ a.cc:8:1: error: 'cin' does not name a type 8 | cin >> b; | ^~~ a.cc:9:1: error: expected unqualified-id before 'if' 9 | if (a == 0 || b == 0 || (a < 0 && b>0)) { | ^~ a.cc:12:1: error: expected unqualified-id before 'else' 12 | else if (a > 0) { | ^~~~ a.cc:15:1: error: expected unqualified-id before 'else' 15 | else { | ^~~~ a.cc:18:1: error: expected declaration before '}' token 18 | } | ^ a.cc:19:1: error: expected declaration before '}' token 19 | } | ^
s659772577
p04033
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,m,ans=0; bool s=0 cin>>n>>m; for(int i=n;i<=m;i++){ if(i<0) ans++; if(i==0) s=1; } if(s) cout<<"Zero"<<endl; else{ if(ans%2==0) cout<<"Positive"<<endl; else cout<<"Negative"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: expected ',' or ';' before 'cin' 6 | cin>>n>>m; | ^~~
s844069248
p04033
C++
Box and Ball #include<bits/stdc++.h> using namespace std; long long a,b; int main() { scanf("%lld%lld",&a,&b); if(a>b) swap(a,b); if((a>0&&b>0)||(a<0&&b<0&&(b-a+1)%2==0)) { printf("Positive"); return 0; } if(a<=0&&b>=0) { printf("Zero"); return 0; } printf("Negative"); return 0; }
a.cc:1:14: error: stray '#' in program 1 | Box and Ball #include<bits/stdc++.h> | ^ a.cc:1:1: error: 'Box' does not name a type 1 | Box and Ball #include<bits/stdc++.h> | ^~~ a.cc: In function 'int main()': a.cc:6:9: error: 'scanf' was not declared in this scope 6 | scanf("%lld%lld",&a,&b); | ^~~~~ a.cc:8:9: error: 'swap' was not declared in this scope 8 | swap(a,b); | ^~~~ a.cc:11:17: error: 'printf' was not declared in this scope 11 | printf("Positive"); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 | Box and Ball #include<bits/stdc++.h> a.cc:16:17: error: 'printf' was not declared in this scope 16 | printf("Zero"); | ^~~~~~ a.cc:16:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' a.cc:19:9: error: 'printf' was not declared in this scope 19 | printf("Negative"); | ^~~~~~ a.cc:19:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
s702501537
p04033
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b scanf("%d %d",&a,&b); if(a*b <= 0) { printf("Zero"); return 0; } else if(a > 0) { printf("Positive"); return 0; } else { if((b-a)%2 == 0) { printf("Negative"); return 0; } else { printf("Positive"); return 0; } } }
a.cc: In function 'int main()': a.cc:7:9: error: expected initializer before 'scanf' 7 | scanf("%d %d",&a,&b); | ^~~~~ a.cc:8:14: error: 'b' was not declared in this scope 8 | if(a*b <= 0) | ^
s692903657
p04033
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; scanf ("%d%d",&a,&b); if ((a>0&&b<0)||(a<0&&b>0)||a==0||b==0) printf ("%s/n","Zero"); if (a>0&&b>0) printf ("%s/n","Positive"); if (a<0&&b<0) { int ans=0,c; if (a>b) c=b; else c=a; for (int i=0;i>=c;i--) if (i<0) ans++; if (ans%i==0) printf ("%s/n","Negative"); else printf ("%s/n","Positive"); } return 0; }
a.cc: In function 'int main()': a.cc:16:17: error: 'i' was not declared in this scope 16 | if (ans%i==0) printf ("%s/n","Negative"); | ^
s512893810
p04033
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; if ((a>0&&b<0)||(a<0&&b>0)||a==0||b==0) cout<<"Zero"<<endl; if (a>0&&b>0) cout<<"Positive"<<endl;; if (a<0&&b<0) { int ans=0,c; if (a>b) c=b; else c=a; for (int i=0;i>=c;i--) if (i<0) ans++; if (ans%i==0) cout<<"Positive"<<endl; else cout<<"Negative"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:16:17: error: 'i' was not declared in this scope 16 | if (ans%i==0) cout<<"Positive"<<endl; | ^
s048539300
p04033
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; if ((a>0&&b<0)||(a<0&&b>0)||a==0||b==0) cout<<"Zero"<<endl; if (a>0&&b>0) cout<<"Positive"<<endl;; if (a<0;b<0) { int ans=0,c; if (a>b) c=b; else c=a; for (int i=0;i>=c;i--) if (i<0) ans++; if (ans%i==0) cout<<"Positive"<<endl; else cout<<"Negative"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:16:17: error: 'i' was not declared in this scope 16 | if (ans%i==0) cout<<"Positive"<<endl; | ^
s680113343
p04033
C++
#incldue<iostream> using namespace std; int main(){ int a,b; cin>>a>>b; if(a*b>0) cout<<"Positive"; if(a*b==0) cout<<"Zero"; if(a*b<0) cout<<"Negative"; return 0; }
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include? 1 | #incldue<iostream> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:5:5: 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 | #incldue<iostream> a.cc:6:15: error: 'cout' was not declared in this scope 6 | if(a*b>0) cout<<"Positive"; | ^~~~ a.cc:6:15: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:7:16: error: 'cout' was not declared in this scope 7 | if(a*b==0) cout<<"Zero"; | ^~~~ a.cc:7:16: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:8:15: error: 'cout' was not declared in this scope 8 | if(a*b<0) cout<<"Negative"; | ^~~~ a.cc:8:15: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
s610639251
p04033
C++
#include <iostream> #include <vector> #include <math.h> #include <cmath> #include <algorithm> #include <numeric> #include <string> #include <cstring> #include <regex> #include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<int,int>; using pl4 = pair<ll,ll>; using vi = vector<int>; using vvi = vector<vi>; using vs = vector<string>; using vvs = vector<vs>; using vll = vector<ll>; using vvll = vector<vll>; using vpii = vector<pii>; using vvpii = vector<vpii>; using vpl4 = vector<pl4>; using vvpl4 = vector<vpl4>; #define fi first #define se second #define mp make_pair #define pb push_back #define pob pop_back() #define sz size() #define be begin() #define en end() #define asn assign #define emp empty() #define ft front() #define bk back() #define clr clear() #define ins insert #define ers erase #define res resize #define FOR(i,a,b) for(int i=(a);i<=(b);i++) #define rFOR(i,a,b) for(int i=(b);i>=(a);i--) #define REP(i,a) for(int i=0;i<(a);i++) #define REP1(i,a) for(int i=1;i<=(a);i++) #define rREP(i,a) for(int i=(a-1);i>=0;i--) #define rREP1(i,a) for(int i=(a);i>0;i--) #define SORT(a) sort((a).be,(a).en) #define rSORT(a) sort((a).rbegin(),(a).rend()) #define UNIQUE(a) (a).erase(unique((a).be,(a).en),(a).en) #define PREVP(a) prev_permutation((a).be,(a).en) #define NEXTP(a) next_permutation((a).be,(a).en) #define BINS(a,b) binary_search((a).be,(a).en,(b)) #define LOWB(a,b) (lower_bound((a).be,(a).en,(b))-(a).be) #define UPB(a,b) (upper_bound((a).be,(a).en,(b))-(a).be) #define CNT(a,b) count((a).be,(a).en,b) #define SUM(a) accumulate((a).be,(a).en,0) #define REV(a) reverse((a).be,(a).en) #define REGS(a,b) regex_search((a),regex(b)) #define REGM(a,b) regex_match((a),regex(b)) #define yn(a) cout <<((a)?"yes":"no")<<endl; #define Yn(a) cout <<((a)?"Yes":"No")<<endl; #define YN(a) cout <<((a)?"YES":"NO")<<endl; #define say(a) cout <<(a); #define sal(a) cout <<(a)<<endl; #define sak cout <<endl; #define dbg(a) cout <<(#a)<<": "<<(a)<<endl; #define a2l(a) ((ll)(a-97)) #define A2l(a) ((ll)(a-65)) #define l2a(a) ((char)(a+97)) #define l2A(a) ((char)(a+65)) #define DigN2(a) ((llabs(a)==0)?(1):((ll)(log2(double(llabs(a))))+1)) #define DigN10(a) ((llabs(a)==0)?(1):((ll)(log10(double(llabs(a))))+1)) #define Dig2(a,b) (((a)>>(b))&1) #define Dig10(a,b) (ll)(((a)/((ll)(pow(10.0,(double)(b)))))%10) #define Pow2(a) (1<<(a)) #define llin(a) ll (a);cin >>(a); #define stin(a) string (a);cin >>(a); #define rdn(a,b) ((a)/(b)) #define rou(a,b) ((((double(a)/double(b))-((a)/(b)))<0.5)?((a)/(b)):(((a)/(b))+1)) #define rup(a,b) ((((a)%(b))==0)?((a)/(b)):(((a)/(b))+1)) #define min(a,b) ((a<b)?(a):(b)) #define max(a,b) ((a>b)?(a):(b)) #define int ll const ll MOD = 1e9+7; const string alp = "abcdefghijklmnopqrstuvwxyz"; const string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; ll gcd(ll a, ll b){if(b==0)return a;return gcd(b,a%b);} ll lcm(ll a, ll b){return a/gcd(a,b)*b;} ll sgn(ll n){ if(n==0) return 0; else return n/abs(n); } ll salv(vll v){ say("{"); FOR(i,0,v.sz-1){ say(v[i]); if(i!=v.sz-1) say(","); } sal("}") } ll DigS10(ll n){ ll m=0; FOR(i,0,DigN10(n)-1){ m+=(ll)((llabs(n)%(ll)(pow(10.0,(double)(i+1))))/(ll)(pow(10.0,(double)i))); } return m; } ll isP(ll n){ if(n<=1) return 0; FOR(i,2,(ll)sqrt(n)){ if(n%i==0) return 0; } return 1; } vll FactM(1,1); vll FactMI(1,1); ll PowM(ll a,ll b){ ll ans=1,x=(a%MOD); FOR(i,0,DigN2(b)-1){ if(Dig2(b,i)==1) ans=(ans*x)%MOD; if(i!=(DigN2(b)-1)) x=(x*x)%MOD; } return ans; } void CFactM(ll n){ FOR(i,FactM.sz,n){ FactM.pb((FactM[i-1]*(i%MOD))%MOD); } return; } void CFactMI(ll n){ CFactM(n); if(FactMI.sz<(n+1)) FactMI.res(n+1,-1); if(FactMI[n]==-1) FactMI[n]=PowM(FactM[n],MOD-2); rFOR(i,1,n-1){ if(FactMI[i]!=-1) break; FactMI[i]=((FactMI[i+1]*((i+1)%MOD))%MOD); } return; } ll CombM(ll n,ll k){ if((n<0)||(k<0)) return 0; if(n<k) return 0; if(n+1>FactMI.sz) CFactMI(n); return ((((FactMI[k]*FactMI[n-k])%MOD)*FactM[n])%MOD); } signed main() { ll a,b; cin >> a >> b; if (a<=0&&0<=b) { cout << "Zero"; } else if (0<a){ cout << "Positive"; } else if ((b-a)%2==0){ cout << "Negative "; }else{ cout << "Positive"; } return 0; }
a.cc:172:13: warning: missing terminating " character 172 | cout << "Negative | ^ a.cc:172:13: error: missing terminating " character 172 | cout << "Negative | ^~~~~~~~~ a.cc:173:1: warning: missing terminating " character 173 | "; | ^ a.cc:173:1: error: missing terminating " character 173 | "; | ^~ a.cc: In function 'll salv(vll)': a.cc:109:1: warning: no return statement in function returning non-void [-Wreturn-type] 109 | } | ^ a.cc: In function 'int main()': a.cc:174:7: error: expected primary-expression before '}' token 174 | }else{ | ^
s323309279
p04033
C++
#include "bits/stdc++.h" #define rep(i,a,n) for(int (i) = (a);(i) < (n);(i)++) using namespace std; int main(){ int a,b; if(a > 0 %% b > 0){ cout << "Positive" << endl; } else if(a <= 0 && b >= 0){ cout << "Zero" << endl; } else{ if(abs(b - a) % 2 == 0){ cout << "Negative" << endl; } else{ cout << "Positive" << endl; } } return 0; }
a.cc: In function 'int main()': a.cc:7:19: error: expected primary-expression before '%' token 7 | if(a > 0 %% b > 0){ | ^
s453950896
p04033
C++
#include<cstdio> int main() { int a,b; scanf("%d%d",&a,&b); if(a==b) {if(a==0||b==0) printf("Zero"); else printf("Positive");} else if(a!=b) { if(a>0) printf("Positive"); else if(a<=0||b>=0) printf("Zero"); else if(b<0) {if((a&1)^(b&1)) printf("Positive"); else printf("nagetive"); } } r
a.cc: In function 'int main()': a.cc:18:5: error: 'r' was not declared in this scope 18 | r | ^ a.cc:18:6: error: expected '}' at end of input 18 | r | ^ a.cc:3:1: note: to match this '{' 3 | { | ^
s021761850
p04033
C++
#include<bits/std++.h> using namespace std; int main() { int i,n,ans=1; int a,b; cin>>a>>b; for (i=a;i<=b;i++) { ans*=i; } if (ans==0) cout<<"Zero"<<endl; else { if (ans>1) cout<<"Positive"<<endl; } else { cout<<"Negative"<<endl; } return 0; }
a.cc:1:9: fatal error: bits/std++.h: No such file or directory 1 | #include<bits/std++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s487901813
p04033
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long a,b; cin>>a>>>b; if((a<0&&b<0)||a>0&&b>0) cout<<"Positive"; else if((a>0&&b<0)||(a>0&&b<0)) cout<<"Negative"; else cout<<"Zero"; return 0; }
a.cc: In function 'int main()': a.cc:5:13: error: expected primary-expression before '>' token 5 | cin>>a>>>b; | ^
s356793593
p04033
C++
#include <iostream> using namespace std; int main() { long long a,b; cin>>a>>b; if(a>0){cout<<"Positive";return 0;} if((a<0&&b>0)||a==0||b==0)){cout<<"Zero";return 0;} if((b-a+1)%2==0){cout<<"Positive";return 0;} cout<<"Negative";return 0; }
a.cc: In function 'int main()': a.cc:8:31: error: expected primary-expression before ')' token 8 | if((a<0&&b>0)||a==0||b==0)){cout<<"Zero";return 0;} | ^
s888967132
p04033
C++
#include <iostream> using namespace std; int main() { long long a,b; cin>>a>>b; long long s=a*b; if(s>0)cout<<"Positive",return 0; if(s==0)cout<<"Zero",return 0; cout<<"Negative";return 0; }
a.cc: In function 'int main()': a.cc:8:29: error: expected primary-expression before 'return' 8 | if(s>0)cout<<"Positive",return 0; | ^~~~~~ a.cc:9:26: error: expected primary-expression before 'return' 9 | if(s==0)cout<<"Zero",return 0; | ^~~~~~
s073560549
p04033
C++
#include<string> #include<array> #include<cmath> #include<algorithm> int main() { long long int a,b; std::cin >> a >> b; if(a < b){ std::swap(a,b); } if((a > 0 && b < 0) || a == 0 || b == 0){ std::cout << "Zero" << std::endl; } else if(a < 0){ if((a - b) % 2 == 1){ std::cout << "Positive" << std::endl; } else { std::cout << "Negative" << std::endl; } } else { std::cout << "Positive" << std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:6: error: 'cin' is not a member of 'std' 9 | std::cin >> a >> b; | ^~~ a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 4 | #include<algorithm> +++ |+#include <iostream> 5 | a.cc:14:10: error: 'cout' is not a member of 'std' 14 | std::cout << "Zero" << std::endl; | ^~~~ a.cc:14:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:14:33: error: 'endl' is not a member of 'std' 14 | std::cout << "Zero" << std::endl; | ^~~~ a.cc:5:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' 4 | #include<algorithm> +++ |+#include <ostream> 5 | a.cc:17:14: error: 'cout' is not a member of 'std' 17 | std::cout << "Positive" << std::endl; | ^~~~ a.cc:17:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:17:41: error: 'endl' is not a member of 'std' 17 | std::cout << "Positive" << std::endl; | ^~~~ a.cc:17:41: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' a.cc:19:14: error: 'cout' is not a member of 'std' 19 | std::cout << "Negative" << std::endl; | ^~~~ a.cc:19:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:19:41: error: 'endl' is not a member of 'std' 19 | std::cout << "Negative" << std::endl; | ^~~~ a.cc:19:41: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' a.cc:22:10: error: 'cout' is not a member of 'std' 22 | std::cout << "Positive" << std::endl; | ^~~~ a.cc:22:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:22:37: error: 'endl' is not a member of 'std' 22 | std::cout << "Positive" << std::endl; | ^~~~ a.cc:22:37: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s792392092
p04033
C++
ST zzuli暑假集训第二周积分赛 End: 2018-08-12 11:40 CST 03:00:00 Ended Overview Problem Status Rank (03:00:00) 0 Comments SettingFavoriteClone Previous12345…NextFilterReset Username 541707090128 Prob Result Time (ms) Mem (MB) Lang Submit Time 541707090128 G Wrong Answer C++ 43 min ago 541707090128 G Wrong Answer C++ 54 min ago 541707090128 E Accepted 0 1.7 C++ 59 min ago 541707090128 A Accepted 31 0 C++ 1 hr ago 541707090128 I Accepted 15 1.8 C++ 2 hr ago 541707090128 K Accepted 15 1.7 C++ 2 hr ago 541707090128 D Accepted 31 1.7 C++ 3 hr ago All Copyright Reserved ©2018 Xu Han Server Time: 2018-08-12 12:20:19 CST #15389000 | 541707090128's solution for [AtCoder-1995] [Problem G] Status Wrong Answer Length 1711 Lang C++14 (GCC 5.3.0) Submitted 2018-08-12 11:36:23 Shared RemoteRunId 2996617 8.0 / 11.0 Select Code #include <iostream> #include <string.h> #include<string> #include <math.h> #include <algorithm> #include<stdio.h> #include<queue> #define maxn 1010 using namespace std; int pre[maxn]; int height[maxn]; char str[105][105]; struct stu { int sum; int id; }ans; bool operator < (stu a,stu b) { if(a.sum==b.sum) return a.id > b.id; return a.sum < b.sum; } void dfs(int x,int y) { int dx,dy,nx,ny; str[x][y]='*'; for(dy=-1;dy<=1;dy++) { for(dx=-1;dx<=1;dx++) { nx=x+dx;ny=y+dy; if(str[nx][ny]=='@') { dfs(nx,ny); } } } } int findit(int x) { if(pre[x]==x) return x; else return pre[x]=findit(pre[x]); } void mix(int a,int b) { a=findit(a); b=findit(b); if(a==b) return; if(height[a]<height[b]) pre[a]=b; else { pre[b]=a; if(height[a]==height[b]) height[a]++; } } void init(int n) { for(int i=1;i<=n;i++) { pre[i]=i; height[i]=0; } } int main() { long long a,b; scanf("%lld%lld",&a,&b); if(a<=0&&b>=0) printf("Zero\n"); else { if(a>0) { printf("Positive\n"); } else { if(b>0) { if(a%2==0) printf("Positive\n"); else printf("negative\n"); } else { if(a%2==0&&b%2==0||a%2!=0&&b%2!=0) printf("Negative\n"); else printf("Positive\n"); } } } return 0; }
a.cc:3:11: error: invalid digit "8" in octal constant 3 | End: 2018-08-12 11:40 CST | ^~ a.cc:12:1: error: extended character … is not valid in an identifier 12 | Previous12345…NextFilterReset | ^ a.cc:63:24: error: extended character © is not valid in an identifier 63 | All Copyright Reserved ©2018 Xu Han | ^ a.cc:64:19: error: invalid digit "8" in octal constant 64 | Server Time: 2018-08-12 12:20:19 CST | ^~ a.cc:66:11: error: "|" is not a valid filename 66 | #15389000 | 541707090128's solution for [AtCoder-1995] [Problem G] | ^ a.cc:72:12: error: too many decimal points in number 72 | C++14 (GCC 5.3.0) | ^~~~~ a.cc:74:6: error: invalid digit "8" in octal constant 74 | 2018-08-12 11:36:23 | ^~ a.cc:1:1: error: 'ST' does not name a type 1 | ST | ^~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:81: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 68 | typedef ptrdiff_t streamsize; // Signed integral type | ^~~~~~~~~ /usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 40 | #include <cwchar> // For mbstate_t +++ |+#include <cstddef> 41 | In file included from /usr/include/c++/14/bits/exception_ptr.h:38, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41: /usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ In file included from /usr/include/wchar.h:35, from /usr/include/c++/14/cwchar:44, from /usr/include/c++/14/bits/postypes.h:40: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive] 132 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive] 134 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared 140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared 142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:145:52: error: expected primary-expression before 'const' 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:147:54: error: expected primary-expression before 'const' 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive] 155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:156:70: error: expected primary-expression before 'const' 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive] 163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:164:72: error: expected primary-expression before 'const' 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_va
s248016789
p04033
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b 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:5:5: error: expected initializer before 'scanf' 5 | scanf("%d%d",&a,&b); | ^~~~~ a.cc:7:13: error: 'b' was not declared in this scope 7 | else if(b>=0)puts("Zero"); | ^
s626615134
p04033
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b;>>a>>b; if(a>0) cout<<"Positive"<<endl;; else if(b>=0) cout<<"Zero"<<endl; else cout<<"Nagative"<<endl;; return 0; }
a.cc: In function 'int main()': a.cc:5:17: error: expected primary-expression before '>>' token 5 | int a,b;>>a>>b; | ^~ a.cc:7:5: error: 'else' without a previous 'if' 7 | else if(b>=0) cout<<"Zero"<<endl; | ^~~~
s048916862
p04033
C++
#include<iostream> using namespace std; int main() { int a,b,t; long long sum=1; cin>>a>>b; t=a; while(t<=b) { sum=sum*t; t=t+1; } if (sum>0) cout<<"Postive" if (sum==0) cout<<"Zero"; if (sum<0) cout<<"Negative"; cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:14:31: error: expected ';' before 'if' 14 | if (sum>0) cout<<"Postive" | ^ | ; 15 | if (sum==0) cout<<"Zero"; | ~~
s092663835
p04033
C++
#include<cstdio> using namespace std; int a,b; int main(){ scanf("%d%d",&a,&b); if(a>0) cout<<"Positive"; else if(b>=0) cout<<"Zero"; else if((a&1)^(b&1)) cout<<"Positive"; else cout<<"Negative"; return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: 'cout' was not declared in this scope 7 | cout<<"Positive"; | ^~~~ a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include<cstdio> +++ |+#include <iostream> 2 | using namespace std; a.cc:9:7: error: 'cout' was not declared in this scope 9 | cout<<"Zero"; | ^~~~ a.cc:9:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:12:9: error: 'cout' was not declared in this scope 12 | cout<<"Positive"; | ^~~~ a.cc:12:9: 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>'
s764192774
p04033
C++
#include<stdio.h> int main() { long long a,b; scanf("%lld %lld",&a,&b); int c=a+1; if(a*b*c==0)printf("Zero\n"); if(a*b*c<0)printf("Negative\n"); if(a*b*c>0)printf("Positive\n") return 0; }
a.cc: In function 'int main()': a.cc:9:36: error: expected ';' before 'return' 9 | if(a*b*c>0)printf("Positive\n") | ^ | ; 10 | return 0; | ~~~~~~
s798611296
p04033
C++
#include <iostream> using namespace std; int main() { long long a,b,i=1;cin>>a>>b; for(int i=a;i<=b;i++) { c*=i; } if(c>0) cout<<"Positive"; if(c==0) cout<<"Zero"; if(c<0) cout<<"Negative"; return 0; }
a.cc: In function 'int main()': a.cc:8:17: error: 'c' was not declared in this scope 8 | c*=i; | ^ a.cc:10:12: error: 'c' was not declared in this scope 10 | if(c>0) cout<<"Positive"; | ^ a.cc:11:12: error: 'c' was not declared in this scope 11 | if(c==0) cout<<"Zero"; | ^ a.cc:12:12: error: 'c' was not declared in this scope 12 | if(c<0) cout<<"Negative"; | ^
s367232012
p04033
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c=1; cin>>a>>b; for(int i=a;i<=b;i++) c*=i;- 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:9:5: error: expected primary-expression before 'if' 9 | if(c>0)cout<<"Positive"<<endl; | ^~
s038764078
p04033
C++
using namespace std; int main() { long long a, b; cin >> a >> b; if (0 < a && a <= b) cout << "Positive" << endl; else if (b < 0 && a <= b) { if (b - a % 2 == 1) cout << "Positive" << endl; else if (b - a % 2 == 0) cout << "Negative" << endl; } else if (a <= 0 && 0 <= b) cout << "Zero" << endl; }
a.cc: In function 'int main()': a.cc:4:3: error: 'cin' was not declared in this scope 4 | 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:5:24: error: 'cout' was not declared in this scope 5 | if (0 < a && a <= b) cout << "Positive" << endl; | ^~~~ a.cc:5:24: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:5:46: error: 'endl' was not declared in this scope 5 | if (0 < a && a <= b) cout << "Positive" << 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:7:25: error: 'cout' was not declared in this scope 7 | if (b - a % 2 == 1) cout << "Positive" << endl; | ^~~~ a.cc:7:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:7:47: error: 'endl' was not declared in this scope 7 | if (b - a % 2 == 1) cout << "Positive" << endl; | ^~~~ a.cc:7:47: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' a.cc:8:30: error: 'cout' was not declared in this scope 8 | else if (b - a % 2 == 0) cout << "Negative" << endl; | ^~~~ a.cc:8:30: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:8:52: error: 'endl' was not declared in this scope 8 | else if (b - a % 2 == 0) cout << "Negative" << endl; | ^~~~ a.cc:8:52: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' a.cc:10:30: error: 'cout' was not declared in this scope 10 | else if (a <= 0 && 0 <= b) cout << "Zero" << endl; | ^~~~ a.cc:10:30: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:10:48: error: 'endl' was not declared in this scope 10 | else if (a <= 0 && 0 <= b) cout << "Zero" << endl; | ^~~~ a.cc:10:48: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s771890701
p04033
C++
#include <iostream> #include <cstdio> #include <cmath> #include <cstring> #include <algorithm> using namespace std; int main() { int a,b,c; cin>>a>>b; c=b-a+1; if(a>0&&b>0) { cout<<"Positive"<<endl; } else if(a<0&&b>0) { if(c%2==0) { cout<<"Positive"<<endl; } else cout<<"Negative"<<endl; } if(a==0&&b>=0) { cout<<"Zero"<<endl; } else if(a<=0%%b==0) { cout<<"Zero"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:29:22: error: expected primary-expression before '%' token 29 | else if(a<=0%%b==0) | ^
s658929351
p04033
C++
#include <iostream> #include <cmath> #include <string> #include <algorithm> #include <cstdio> using namespace std; int main() { int a,b,c,q=0; int x[20]; int s=1; cin>>a>>b; if(a<=0&&b>=0) cout<<"Zero"<<endl; if(a>0&&b>0) cout<<"Positive"<<endl; if(a<0&&b<0) { for(int i=a;i<=b;i++) { if(i<=b) q++; } if(i%2==0) cout<<"Positive"<<endl; else cout<<"Negative"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:23:20: error: 'i' was not declared in this scope 23 | if(i%2==0) | ^
s508893709
p04033
C++
#include<iostream> using namespace std; int main() { long long a,b,m; cin>>a>>b; sum=b-a+1; if(a<b) { if(a>0&&b>0) { cout<<"Positive"<<endl; } else { if(a<=0&&b>0) { cout<<"Zero"<<endl; } else { if(a<0&&b<=0) { if(b==0) { cout<<"Zero"<<endl; } else { if(m%2==0) { cout<<"Positive"<<endl; } else { cout<<"Negative"<<endl; } } } } } } else { return 0; } return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'sum' was not declared in this scope 7 | sum=b-a+1; | ^~~
s484285815
p04033
Java
public class RangeProduct{ public static void main(String[] args){ int a; int b; int cul = (a*b); if(cul==0){ System.out.println("Zero"); } else if(cul>=0){ System.out.println("Positive"); } else { System.out.println("Negative"); } } }
Main.java:1: error: class RangeProduct is public, should be declared in a file named RangeProduct.java public class RangeProduct{ ^ 1 error
s983430992
p04033
C++
#include<bits/stdc++.h> using namespace std; int main() { const int a,b,i,ans=1; cin>>a>>b; for(i=a;i<=b;i++) ans=ans*i; if(ans>0) cout<<"Positive"<<endl; else if(ans==0) cout<<"Zero"<<endl; else cout<<"Negative"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:5:15: error: uninitialized 'const a' [-fpermissive] 5 | const int a,b,i,ans=1; | ^ a.cc:5:17: error: uninitialized 'const b' [-fpermissive] 5 | const int a,b,i,ans=1; | ^ a.cc:5:19: error: uninitialized 'const i' [-fpermissive] 5 | const int a,b,i,ans=1; | ^ a.cc:6:8: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'const int') 6 | cin>>a>>b; | ~~~^~~ | | | | | const int | std::istream {aka std::basic_istream<char>} In file included 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, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int' 6 | cin>>a>>b; | ^ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: cannot bind non-const lvalue reference of type 'short int&' to a value of type 'int' 6 | cin>>a>>b; | ^ /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: cannot bind non-const lvalue reference of type 'short unsigned int&' to a value of type 'int' 6 | cin>>a>>b; | ^ /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: cannot bind non-const lvalue reference of type 'unsigned int&' to a value of type 'int' 6 | cin>>a>>b; | ^ /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: cannot bind non-const lvalue reference of type 'long int&' to a value of type 'int' 6 | cin>>a>>b; | ^ /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: cannot bind non-const lvalue reference of type 'long unsigned int&' to a value of type 'int' 6 | cin>>a>>b; | ^ /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int' 6 | cin>>a>>b; | ^ /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: cannot bind non-const lvalue reference of type 'long long unsigned int&' to a value of type 'int' 6 | cin>>a>>b; | ^ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: cannot bind non-const lvalue reference of type 'float&' to a value of type 'int' 6 | cin>>a>>b; | ^ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: cannot bind non-const lvalue reference of type 'double&' to a value of type 'int' 6 | cin>>a>>b; | ^ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: cannot bind non-const lvalue reference of type 'long double&' to a value of type 'int' 6 | cin>>a>>b; | ^ /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: invalid conversion from 'int' to 'void*' [-fpermissive] 6 | cin>>a>>b; | ^ | | | int a.cc:6:10: error: cannot bind rvalue '(void*)((long int)((int)a))' to 'void*&' /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: invalid conversion from 'int' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} [-fpermissive] 6 | cin>>a>>b; | ^ | | | int /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' (near match) 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: invalid conversion from 'int' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} [-fpermissive] 6 | cin>>a>>b; | ^ | | | int /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /usr/include/c++/14/istream:133:7: note: conversion of argument 1 would be ill-formed: a.cc:6:10: error: invalid conversion from 'int' to 'std::ios_base& (*)(std::ios_base&)' [-fpermissive] 6 | cin>>a>>b; | ^ | | | int /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& st
s704119711
p04033
C++
#include<bits/stdc++.h> using namespace std; int main() { long long a,b; cin>>a>>b; if(a>0) cout<<"Positive"<<endl; if(a<0&&b<0) cout<<"Negative"<<endl; if(a<=0&&b>=0) cout<<"Zero"<<endl; }a
a.cc:13:2: error: 'a' does not name a type 13 | }a | ^
s281470473
p04033
C++
#include<cstdio> using namespace std; int 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:5:9: error: 'cin' was not declared in this scope 5 | 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;
s603419715
p04033
C++
#include<bits/stdc++.h> using namespace std; long long a,b; int main(){ cin>>a>>b; if(a*b<=0){puts("Zero");return 0;} if(a>0){puts("Positive");return 0;} if(b<0)(b-a&1)?puts("Positive"):puts(Nagative); return 0; }
a.cc: In function 'int main()': a.cc:8:46: error: 'Nagative' was not declared in this scope 8 | if(b<0)(b-a&1)?puts("Positive"):puts(Nagative); | ^~~~~~~~
s539516110
p04033
C++
#include<bits/stdc++.h> using namespace std; long long a,b; int main(){ cin>>a>>b; if(a*b<=0)puts("Zero"),return 0; if(a>0)puts("Positive"),return 0; if(b<0)(b-a&1)?puts("Positive"):puts(Nagative); return 0; }
a.cc: In function 'int main()': a.cc:6:28: error: expected primary-expression before 'return' 6 | if(a*b<=0)puts("Zero"),return 0; | ^~~~~~ a.cc:7:33: error: expected primary-expression before 'return' 7 | if(a>0)puts("Positive"),return 0; | ^~~~~~ a.cc:8:46: error: 'Nagative' was not declared in this scope 8 | if(b<0)(b-a&1)?puts("Positive"):puts(Nagative); | ^~~~~~~~
s334325255
p04033
C++
#include<iostream> #include<algorithm> //#include<Hatsune_Miku> using namespace std; long long n,m,ans,bns; int main(){ cin>>n>>m; ans=max(n,m); bns=min(n,m) if(bns>0)cout<<"Positive"<<endl; if(bns<0)cout<<"Zero"<<endl; if(ans<0)cout<<"Negative"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:16: error: expected ';' before 'if' 9 | bns=min(n,m) | ^ | ; 10 | if(bns>0)cout<<"Positive"<<endl; | ~~
s121475816
p04033
C++
#include<bits/stdc++.h> using namespace std; void read(int &x){ int f=1;x=0;char s=getchar(); while(s<'0'||s>'9'){if(s=='-')f=-1;s=getchar();} while(s>='0'&&s<='9'){x=x*10+s-'0';s=getchar();} x*=f; } void print(int x){ if(x<9){putchar('-');x=-x;} if(x>9)print(x/10);putchar(x%10+'0'); } namespace NB{ int main(){ int a,b; read(a);read(b); if(a>0&&b>0){ cout<<"Positive"; cout<<endl; } else if(max(a,b)>=0&&min(a,b)<=0||a==0||b==0){ cout<<"Zero"<<endl; } else if(abs(min(a,b))-abs(max(a,b))%2) { cout<<"Negative"<<endl; } else{ cout<<"Positive"<<endl; } } return 0; } int main(){ return NB::main(); }
a.cc: In function 'int NB::main()': a.cc:31:9: warning: no return statement in function returning non-void [-Wreturn-type] 31 | } | ^ a.cc: At global scope: a.cc:32:9: error: expected unqualified-id before 'return' 32 | return 0; | ^~~~~~
s581540027
p04033
C++
#include<bits/stdc++.h> using namespace std; double a,b,sum=1; int main() { cin>>a>>b; if(a>0 && b>0) cout<<"Positive"<<endl; if(a=0 && b=0) cout<<"Zero"<<endl; if(a<0 && b<0 || a<0 && b>0 || a>0 && b<0) cout<<"Negative"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: lvalue required as left operand of assignment 8 | if(a=0 && b=0) cout<<"Zero"<<endl; | ~~^~~~
s831122849
p04033
C++
#include<bits/stdc++.h> using namespace std; double a,b; int main() { cin>>a>>b; if(a*b>0) cout<<"Positive"<<endl; if(a*b=0) cout<<"Zero"<<endl; if(a*b<0) cout<<"Negative"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:6: error: lvalue required as left operand of assignment 8 | if(a*b=0) cout<<"Zero"<<endl; | ~^~
s250692498
p04033
C++
#include <bits/stdc++.h> using namespace std; typedef pair<int,int> pii; typedef long long int ll; #define INF 1 << 30 #define REP(i,n) for(ll i=0; i<(int)(n); i++) #define FOR(i,k,n) for(ll i=(k);i<(int)(n);i++) vector<bool> gen_sosuu(vector<bool> sosuu){ int size = sosuu.size(); REP(i,size){ sosuu[i] = true; } sosuu[0] = false; sosuu[1] = false; sosuu[2] = true; FOR(i,2,sqrt(size)+1){ if(sosuu[i] == false) continue; for(int j = 2; i*j<size;j++){ sosuu[i*j] =false; } } return sosuu; } ll a,b; int main(){ cin >> a>>b; if(a*b>0){ cout <<"Positive" <<endl; }else if(a*b==0){ cout <<"Zero" <<end; }else{ cout << "Negative" <<endl; } }
a.cc: In function 'int main()': a.cc:37:19: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 37 | cout <<"Zero" <<end; | ~~~~~~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/istream:41, 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, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]' 306 |
s776919432
p04033
C++
#include <bits/stdc++.h> using namespace sdt; int main() { long long a, b; cin >> a >> b; a *= b; if (a > 0) puts("Positive"); else if (a < 0) puts("Negative"); else puts("Zero"); return 0; }
a.cc:2:17: error: 'sdt' is not a namespace-name 2 | using namespace sdt; | ^~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | 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 | ^~~
s841450866
p04033
C++
include<bits/stdc++.h> #define REP(i,n) for(int (i)=0;i<(n);i++) #define vi vector<int> using namespace std; int main() { int n, m; cin >> n >> m; n++; vi v(n); REP(i, n) v[i] = 1; int aka = 200000; v[1] = aka; int x, y; REP (i, m) { cin >> x >> y; if (aka <= v[x]) { v[x] == aka ? v[x] = 0 : v[x]--; v[y] < aka ? v[y] += aka : v[y]++; } else { v[x]--; v[y]++; } } int ans = 0; REP(i, n){ ans += (aka <= v[i]); } cout << ans << 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:11:3: error: 'cin' was not declared in this scope 11 | cin >> n >> m; | ^~~ a.cc:4:12: error: 'vector' was not declared in this scope 4 | #define vi vector<int> | ^~~~~~ a.cc:13:3: note: in expansion of macro 'vi' 13 | vi v(n); | ^~ a.cc:4:19: error: expected primary-expression before 'int' 4 | #define vi vector<int> | ^~~ a.cc:13:3: note: in expansion of macro 'vi' 13 | vi v(n); | ^~ a.cc:14:13: error: 'v' was not declared in this scope 14 | REP(i, n) v[i] = 1; | ^ a.cc:17:3: error: 'v' was not declared in this scope 17 | v[1] = aka; | ^ a.cc:37:3: error: 'cout' was not declared in this scope 37 | cout << ans << endl; | ^~~~ a.cc:37:18: error: 'endl' was not declared in this scope 37 | cout << ans << endl; | ^~~~
s534633660
p04033
C++
#include <iostream> #include <vector> #include <algorithm> #include <complex> #include <string> #include <cmath> using namespace std; int min(int n, int m){ return ((n>m) ? m : n); } int main(void){ int a, b; cin >> a >> b; long long prod = 1; for(int i=a;i<=n;i++){ prod *= i; } if(prod>0){ cout << 'Positive' << endl; }else if(prod == 0){ cout << 'Zero' << endl; }else{ cout << "Negative" << endl; } return 0; }
a.cc:21:25: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 21 | cout << 'Positive' << endl; | ^~~~~~~~~~ a.cc:23:25: warning: multi-character character constant [-Wmultichar] 23 | cout << 'Zero' << endl; | ^~~~~~ a.cc: In function 'int main()': a.cc:17:24: error: 'n' was not declared in this scope 17 | for(int i=a;i<=n;i++){ | ^
s152225194
p04033
C++
int main() { int a, b; cin >> a >> b; int ans = 0; if (0 < a) ans = 1; else if (b < 0) ans = b - a % 2 ? -1: 1; cout << a << " " << ans << endl; }
a.cc: In function 'int main()': a.cc:4:3: error: 'cin' was not declared in this scope 4 | cin >> a >> b; | ^~~ a.cc:12:3: error: 'cout' was not declared in this scope 12 | cout << a << " " << ans << endl; | ^~~~ a.cc:12:31: error: 'endl' was not declared in this scope 12 | cout << a << " " << ans << endl; | ^~~~
s945595800
p04033
C++
#include<bits/stdc++.h> using namespace std; int main() { int x,y; cin>>x>>y; if (x>0&&y>0) cout<<"Positive"; else if (max(x,y)>=0&&min(x,y)<=0||x==0||y==0) cout<<"Zero"; else { if ((abs(min(x,y))-abs(max(x,y)))%2==0) cout<<"Negative"; else cout<<"Positive"; } } cout<<endl; return 0; }
a.cc:16:5: error: 'cout' does not name a type 16 | cout<<endl; | ^~~~ a.cc:17:5: error: expected unqualified-id before 'return' 17 | return 0; | ^~~~~~ a.cc:18:1: error: expected declaration before '}' token 18 | } | ^
s292236458
p04033
C++
#include<bits/stdc++.h> using namespace std; int main() { int x,y; cin>>x>>y; if (x>0&&y>0) cout<<"Positive"; else if (max(x,y)>=0&&min(x,y)<=0||x==0||y==0) cout<<"Zero"; else { if ((abs(min(x,y))-abs(max(x,y)))%2==0) cout<<"Negative"; else cout<<"Positive"; } } cout<<endl; return 0;
a.cc:16:5: error: 'cout' does not name a type 16 | cout<<endl; | ^~~~ a.cc:17:5: error: expected unqualified-id before 'return' 17 | return 0; | ^~~~~~
s122595431
p04033
C++
#include<iostream> #include<algorithm> #include<cstring> #include<cmath> #include<cstdio> #include<climits> using namespace std; void File(){ freopen("AGC02E.in","r",stdin); freopen("AGC02E.out","w",stdout); } template<typename T>bool chkmax(T &_,T __){return _<__ ? (_=__,1) : 0;} template<typename T>bool chkmin(T &_,T __){return _>__ ? (_=__,1) : 0;} #define REP(i,a,b) for(register int i=a;i<=b;++i) #define DREP(i,a,b) for(register int i=a;i>=b;--i) #define MREP(i,x) for(register int i=beg[x];i;i=E[i].last) #define mem(a) memset(a,0,sizeof(a)) #define inf INT_MAX const int maxn=1e5+10; int n,a[maxn],SG[1010][1010]; bool in[maxn]; bool cmp(int _,int __){return _>__;} bool judge(int x,int y){return x>n || y>a[x];} int get_SG(int x,int y){ //cerr<<x<<" "<<y<<endl; if(judge(x,y))return 1; if(judge(x+1,y+1)){ if(get_SG(x+1,y) && get_SG(x,y+1)) return 0; else return 1; } return get_SG(x+1,y+1); } int main(){ int size = 256 << 20; // 256MB char *p = (char*)malloc(size) + size; __asm__("movl %0, %%esp\n" :: "r"(p)); //File(); scanf("%d",&n); REP(i,1,n)scanf("%d",&a[i]); sort(a+1,a+n+1,cmp); /*REP(i,1,n+1)REP(j,1,a[1]+1) SG[i][j]=1; REP(i,1,n)REP(j,1,a[i]) SG[i][j]=0; DREP(i,n,1)DREP(j,a[i],1){ mem(in); in[SG[i+1][j]]=1; in[SG[i][j+1]]=1; REP(k,0,5)if(!in[k]){ SG[i][j]=k!=0; break; } } REP(i,1,n){ REP(j,1,a[i])cout<<(SG[i][j])<<" "; cout<<endl; } cout<<endl<<endl; REP(i,1,n){ REP(j,1,a[i])cout<<get_SG(i,j)<<" "; cout<<endl; }*/ if(get_SG(1,1))puts("First"); else puts("Second"); return 0; }
a.cc: In function 'int main()': a.cc:40:13: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 40 | REP(i,1,n)scanf("%d",&a[i]); | ^ a.cc:14:37: note: in definition of macro 'REP' 14 | #define REP(i,a,b) for(register int i=a;i<=b;++i) | ^ a.cc: Assembler messages: a.cc:37: Error: operand type mismatch for `mov'
s155437380
p04033
C++
int main(void){ int a, b; cin >> a >> b; if(a<0 && b>0) cout<< 0 << endl; else if(a>0) cout << "Positive" << endl; else{ int c = abs(a),d = abs(b); if((c%2 == 0 && d%2 == 0 )||(c%2 != 0 && d%2 != 0)) cout << "Negative" << endl; else cout << "Positive" << endl; } }
a.cc: In function 'int main()': a.cc:3:5: error: 'cin' was not declared in this scope 3 | cin >> a >> b; | ^~~ a.cc:5:9: error: 'cout' was not declared in this scope 5 | cout<< 0 << endl; | ^~~~ a.cc:5:21: error: 'endl' was not declared in this scope 5 | cout<< 0 << endl; | ^~~~ a.cc:7:9: error: 'cout' was not declared in this scope 7 | cout << "Positive" << endl; | ^~~~ a.cc:7:31: error: 'endl' was not declared in this scope 7 | cout << "Positive" << endl; | ^~~~ a.cc:9:17: error: 'abs' was not declared in this scope 9 | int c = abs(a),d = abs(b); | ^~~ a.cc:10:25: error: 'd' was not declared in this scope 10 | if((c%2 == 0 && d%2 == 0 )||(c%2 != 0 && d%2 != 0)) | ^ a.cc:11:13: error: 'cout' was not declared in this scope 11 | cout << "Negative" << endl; | ^~~~ a.cc:11:35: error: 'endl' was not declared in this scope 11 | cout << "Negative" << endl; | ^~~~ a.cc:13:13: error: 'cout' was not declared in this scope 13 | cout << "Positive" << endl; | ^~~~ a.cc:13:35: error: 'endl' was not declared in this scope 13 | cout << "Positive" << endl; | ^~~~
s770401590
p04033
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >> a >> b, ans = 1; for(int i = 0; i < abs(a + b) + 1; i++){ ans *= a + i; } if(ans > 0){ cout << "Positive" << endl; } else if(ans < 0){ cout << "Negative" << endl; } else { cout << "Zero" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:5:19: error: 'ans' was not declared in this scope; did you mean 'abs'? 5 | cin >> a >> b, ans = 1; | ^~~ | abs
s659672695
p04033
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b; if(a > 0){ cout << "Positive" << endl; } else if(a == 0){ cout << "Zero" << endl; } else if(a < 0 && b >= 0){ cout << "Zero" << endl; } else if((abs(a) - abs(b)) % 2 = 0){ cout << "Negative" << endl; } else{ cout << "Positive" << endl; } }
a.cc: In function 'int main()': a.cc:15:35: error: lvalue required as left operand of assignment 15 | else if((abs(a) - abs(b)) % 2 = 0){ | ~~~~~~~~~~~~~~~~~~^~~
s902333022
p04033
C++
#include <cstdio> #include <cstdlib> #include <iostream> #include <algorithm> #include <cmath> #include <cstring> using namespace std; int main() { long long a,b; cin>>a>>b; if(a<0&&b>0&&|a|>|b| || b<0&&a>0&&|b|>|a| || a<0&&b<0) cout<<"Negative"; if(a<0&&b>0&&|a|<|b| || b<0&&a>0&&|b|<|a| || a>0&&b>0) cout<<"Positive"; if(a<0&&b>0&&|a|==|b| || b<0&&a>0&&|b|==|a|) cout<<"Zero"; cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:12:18: error: expected primary-expression before '|' token 12 | if(a<0&&b>0&&|a|>|b| || b<0&&a>0&&|b|>|a| || a<0&&b<0) | ^ a.cc:12:21: error: expected primary-expression before '>' token 12 | if(a<0&&b>0&&|a|>|b| || b<0&&a>0&&|b|>|a| || a<0&&b<0) | ^ a.cc:12:22: error: expected primary-expression before '|' token 12 | if(a<0&&b>0&&|a|>|b| || b<0&&a>0&&|b|>|a| || a<0&&b<0) | ^ a.cc:12:26: error: expected primary-expression before '||' token 12 | if(a<0&&b>0&&|a|>|b| || b<0&&a>0&&|b|>|a| || a<0&&b<0) | ^~ a.cc:12:39: error: expected primary-expression before '|' token 12 | if(a<0&&b>0&&|a|>|b| || b<0&&a>0&&|b|>|a| || a<0&&b<0) | ^ a.cc:12:42: error: expected primary-expression before '>' token 12 | if(a<0&&b>0&&|a|>|b| || b<0&&a>0&&|b|>|a| || a<0&&b<0) | ^ a.cc:12:43: error: expected primary-expression before '|' token 12 | if(a<0&&b>0&&|a|>|b| || b<0&&a>0&&|b|>|a| || a<0&&b<0) | ^ a.cc:12:47: error: expected primary-expression before '||' token 12 | if(a<0&&b>0&&|a|>|b| || b<0&&a>0&&|b|>|a| || a<0&&b<0) | ^~ a.cc:14:18: error: expected primary-expression before '|' token 14 | if(a<0&&b>0&&|a|<|b| || b<0&&a>0&&|b|<|a| || a>0&&b>0) | ^ a.cc:14:21: error: expected primary-expression before '<' token 14 | if(a<0&&b>0&&|a|<|b| || b<0&&a>0&&|b|<|a| || a>0&&b>0) | ^ a.cc:14:22: error: expected primary-expression before '|' token 14 | if(a<0&&b>0&&|a|<|b| || b<0&&a>0&&|b|<|a| || a>0&&b>0) | ^ a.cc:14:26: error: expected primary-expression before '||' token 14 | if(a<0&&b>0&&|a|<|b| || b<0&&a>0&&|b|<|a| || a>0&&b>0) | ^~ a.cc:14:39: error: expected primary-expression before '|' token 14 | if(a<0&&b>0&&|a|<|b| || b<0&&a>0&&|b|<|a| || a>0&&b>0) | ^ a.cc:14:42: error: expected primary-expression before '<' token 14 | if(a<0&&b>0&&|a|<|b| || b<0&&a>0&&|b|<|a| || a>0&&b>0) | ^ a.cc:14:43: error: expected primary-expression before '|' token 14 | if(a<0&&b>0&&|a|<|b| || b<0&&a>0&&|b|<|a| || a>0&&b>0) | ^ a.cc:14:47: error: expected primary-expression before '||' token 14 | if(a<0&&b>0&&|a|<|b| || b<0&&a>0&&|b|<|a| || a>0&&b>0) | ^~ a.cc:16:18: error: expected primary-expression before '|' token 16 | if(a<0&&b>0&&|a|==|b| || b<0&&a>0&&|b|==|a|) | ^ a.cc:16:22: error: expected primary-expression before '=' token 16 | if(a<0&&b>0&&|a|==|b| || b<0&&a>0&&|b|==|a|) | ^ a.cc:16:23: error: expected primary-expression before '|' token 16 | if(a<0&&b>0&&|a|==|b| || b<0&&a>0&&|b|==|a|) | ^ a.cc:16:27: error: expected primary-expression before '||' token 16 | if(a<0&&b>0&&|a|==|b| || b<0&&a>0&&|b|==|a|) | ^~ a.cc:16:40: error: expected primary-expression before '|' token 16 | if(a<0&&b>0&&|a|==|b| || b<0&&a>0&&|b|==|a|) | ^ a.cc:16:44: error: expected primary-expression before '=' token 16 | if(a<0&&b>0&&|a|==|b| || b<0&&a>0&&|b|==|a|) | ^ a.cc:16:45: error: expected primary-expression before '|' token 16 | if(a<0&&b>0&&|a|==|b| || b<0&&a>0&&|b|==|a|) | ^ a.cc:16:48: error: expected primary-expression before ')' token 16 | if(a<0&&b>0&&|a|==|b| || b<0&&a>0&&|b|==|a|) | ^
s682105622
p04033
C++
#include <cstdio> #include <cstdlib> #include <iostream> #include <algorithm> #include <cmath> #include <cstring> using namespace std; int main() { int a,b; cin>>a>>b; if(a+b<0) cout<<"Negative"; if(a+b>0) cout<<"Positive" if(a+b==0) cout<<"Zero"; cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:15:21: error: expected ';' before 'if' 15 | cout<<"Positive" | ^ | ; 16 | if(a+b==0) | ~~
s657528497
p04033
C++
//#include <bits/stdc++.h> #include<iostream> #include<cstdio> #include<string> #include<algorithm> #include<vector> #include<stack> #include<queue> #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,n) FOR(i,0,n) #define pb push_back #define INF 93193111451418101 #define MIN -93193111451418101 using namespace std; typedef long long ll;//int64 typedef unsigned long long ull; ll gcd(ll a,ll b){return b?gcd(b,a%b):a;} int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; //----------program from here---------- ll flag=100; ll a,b; ll c,d; ll ans; string as; int main(){ if(a==0){ ans=0 }else if(b==0){ ans==0; }else if(a<0 && 0<b){ ans=0; }else if(0<a){ ans=1; }else{ c=b-a+1; ans=1; if(c%2==1){ans=-1;} } if(ans==1)as="Positive"; if(ans==-1)as="Positive"; if(ans==0)as="Zero"; cout<<as<<endl; return 0; }
a.cc: In function 'int main()': a.cc:34:14: error: expected ';' before '}' token 34 | ans=0 | ^ | ; 35 | }else if(b==0){ | ~
s890552980
p04033
Java
class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); long head = sc.nextInt(); long tail = sc.nextInt(); long num = head; for (long i = head + 1L ; i <= tail; i++){ num *= i; } int num2 = Long.signum(num); if(num2 == -1){ System.out.println("Negative"); } else if(num2 == 1){ System.out.println("Positive"); } else if(num2 == 0) { System.out.println("Zero"); } } }
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s248499077
p04033
Java
class at1_2016_0731_A{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); long head = sc.nextInt(); long tail = sc.nextInt(); long num = head; for (long i = head + 1L ; i <= tail; i++){ num *= i; } int num2 = Long.signum(num); if(num2 == -1){ System.out.println("Negative"); } else if(num2 == 1){ System.out.println("Positive"); } else if(num2 == 0) { System.out.println("Zero"); } } }
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class at1_2016_0731_A Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class at1_2016_0731_A 2 errors
s485522212
p04033
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); long head = sc.nextInt(); long tail = sc.nextInt(); long num = head; for (long i = head + 1 ; i <= tail; i++){ num *= i; } if(num < 0){ System.out.prlongln("Negative"); } else if(num > 0){ System.out.prlongln("Positive"); } else { System.out.prlongln("Zero"); } } }
Main.java:15: error: cannot find symbol System.out.prlongln("Negative"); ^ symbol: method prlongln(String) location: variable out of type PrintStream Main.java:17: error: cannot find symbol System.out.prlongln("Positive"); ^ symbol: method prlongln(String) location: variable out of type PrintStream Main.java:19: error: cannot find symbol System.out.prlongln("Zero"); ^ symbol: method prlongln(String) location: variable out of type PrintStream 3 errors
s192800733
p04033
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); long head = sc.nextlong(); long tail = sc.nextlong(); long num = head; for (long i = head + 1 ; i <= tail; i++){ num *= i; } if(num < 0){ System.out.prlongln("Negative"); } else if(num > 0){ System.out.prlongln("Positive"); } else { System.out.prlongln("Zero"); } } }
Main.java:6: error: cannot find symbol long head = sc.nextlong(); ^ symbol: method nextlong() location: variable sc of type Scanner Main.java:7: error: cannot find symbol long tail = sc.nextlong(); ^ symbol: method nextlong() location: variable sc of type Scanner Main.java:15: error: cannot find symbol System.out.prlongln("Negative"); ^ symbol: method prlongln(String) location: variable out of type PrintStream Main.java:17: error: cannot find symbol System.out.prlongln("Positive"); ^ symbol: method prlongln(String) location: variable out of type PrintStream Main.java:19: error: cannot find symbol System.out.prlongln("Zero"); ^ symbol: method prlongln(String) location: variable out of type PrintStream 5 errors
s816711483
p04033
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int head = sc.nextInt(); int tail = sc.nextInt(); int num = head; for (int i = head +1 ; i <= tail; i++){ num *= i; } if(num < 0){ System.out.println("Negative"); } else (num > 0){ System.out.println("Positive"); } else { System.out.println("Zero"); } } }
Main.java:16: error: not a statement } else (num > 0){ ^ Main.java:16: error: ';' expected } else (num > 0){ ^ Main.java:18: error: 'else' without 'if' } else { ^ 3 errors
s651749187
p04033
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long int a,b,i=1,c; cin>>a>>b; c = a; while(a+i<=b){ c=c*(a+i); i++; if(c>0) cout<<"Positive"<<endl; if(c==0) cout<<"Zero"<<endl; if(c<0) cout<<"Negative"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:14:2: error: expected '}' at end of input 14 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s951181349
p04033
C++
int n,l,sz; int a,b; bool canUntie2[100001]; int order[100001]; int main() { cin>>n>>l>>a; for(int i = 2;i<=n;i++) { cin>>b; canUntie2[i-1]=((a+b)>=l); a=b; } for(int i = 1;i<=n-1;i++) { if(canUntie2[i]==1) { int stop = n; for(int j = i+1;j<=n-1;j++) { if(canUntie2[j]==1) { stop=j; break; } } if(stop!=n) { for(int j = i+1; j<= stop-1; j++) { order[++sz]=j; } } else { for(int j = n-1; j>=i+1; j--) order[++sz]=j; } i=stop-1; } else { bool ok=false; for(int j = i; j<=n-1;j++, i++) { if(canUntie2[j]==1) { ok=true; break; } order[++sz]=j; } i--; if(!ok) { cout<<"Impossible"; return 0; } } } for(int i = 1;i<=n-1;i++) { if(canUntie2[i]==1) order[++sz]=i; } if(sz==n-1) { cout<<"Possible\n"; for(int i = 1;i<=n-1;i++) { cout<<order[i]<<'\n'; } } return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'cin' was not declared in this scope 7 | cin>>n>>l>>a; | ^~~ a.cc:57:17: error: 'cout' was not declared in this scope 57 | cout<<"Impossible"; | ^~~~ a.cc:69:9: error: 'cout' was not declared in this scope 69 | cout<<"Possible\n"; | ^~~~
s769113793
p04033
C++
#include <bits/stdc++.h> #define pout(n) printf ("%d\n", n) #define rep(i,a,n) for (int i = a;i < n;i++) #define per(i,n,a) for (int i = n-1;i >= a;i--) #define SORT(v, n) sort(v, v+n); #define VSORT(v) sort(v.begin(), v.end()); const int d4x[4] = {1, 0, -1, 0}; const int d4y[4] = {0, 1, 0, -1}; const int d8x[8] = { 1,1,0,-1,-1,-1,0,1 }; const int d8y[8] = { 0,1,1,1,0,-1,-1,-1 }; #define MAX_N (int)2e5+20 #define INF 1e12+20 typedef long long ll; using namespace std; ll a,b; int main() { cin >> a >> b; if(a > 0){ cout<<"Positive"<<endl; return 0; } if(b >= 0){ cout<<"Zero"<<endl; return 0; } if((b-a) % 2==0){ cout<<"Negative"<<endl; }else{ cout<<"Positive"<<endl; } return 0; } return 0; }
a.cc:39:9: error: expected unqualified-id before 'return' 39 | return 0; | ^~~~~~ a.cc:40:1: error: expected declaration before '}' token 40 | } | ^
s066587363
p04033
C++
#include <bits/stdc++.h> #define pout(n) printf ("%d\n", n) #define rep(i,a,n) for (int i = a;i < n;i++) #define per(i,n,a) for (int i = n-1;i >= a;i--) #define SORT(v, n) sort(v, v+n); #define VSORT(v) sort(v.begin(), v.end()); const int d4x[4] = {1, 0, -1, 0}; const int d4y[4] = {0, 1, 0, -1}; const int d8x[8] = { 1,1,0,-1,-1,-1,0,1 }; const int d8y[8] = { 0,1,1,1,0,-1,-1,-1 }; #define MAX_N (int)2e5+20 #define INF 1e12+20 typedef long long ll; using namespace std; ll a,b; int main() { cin >> a >> b; if(a > 0){ cout<<"Positive"<<endl; return 0; } if(b >= 0){ cout<<"Zero"<<endl; return 0; } if((b-a) % 2==0){ cout<<"Negative"<<endl; }else{ cout<<"Positive"<<endl; } return 0; } return 0; }
a.cc:39:9: error: expected unqualified-id before 'return' 39 | return 0; | ^~~~~~ a.cc:40:1: error: expected declaration before '}' token 40 | } | ^
s281497460
p04033
C++
#include <iostream> #include <string> #include <algorithm> #include <cmath> #include <map> using namespace std; int main(){ long long int a, b; cin >> a >> b; if(a * b <= 0) cout << "Zero" << endl; else if(a > 0) cout << "Positive" << endl; else{ if(((a - b) % 2) = 0) cout << "Negative" << endl; else cout << "Positive" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:14:29: error: lvalue required as left operand of assignment 14 | if(((a - b) % 2) = 0) cout << "Negative" << endl; | ~~~~~~~~~^~~~
s022639053
p04033
Java
import java.util.Scanner; public class AMain { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); sc.close(); if(a <= 0 && b >= 0){ System.out.println("Zero"); }else if(a > 0 || (a < 0 && (b-a)%2 == 1)){ System.out.println("Positive"); }else{ System.out.println("Negative"); } } }
Main.java:3: error: class AMain is public, should be declared in a file named AMain.java public class AMain { ^ 1 error
s567986204
p04033
Java
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); sc.close(); if(a <= 0 && b >= 0){ System.out.println("Zero"); }else if(a > 0 (a < 0 && (a-b)%2 == 1)){ System.out.println("Positive"); }else{ System.out.println("Negative"); } } }
Main.java:11: error: ')' expected }else if(a > 0 (a < 0 && (a-b)%2 == 1)){ ^ Main.java:11: error: not a statement }else if(a > 0 (a < 0 && (a-b)%2 == 1)){ ^ Main.java:11: error: ';' expected }else if(a > 0 (a < 0 && (a-b)%2 == 1)){ ^ Main.java:13: error: 'else' without 'if' }else{ ^ 4 errors
s706702226
p04033
C++
#include <iostream> using namespace std; int main() { int a,b; //Positive if((a > 0 && b > 0) || (a < 0 && b < 0) && ((b - a) % 2 == 0 )){ cout << "Positive"; } //Zero if((a > 0 && b < 0) || (a < 0 && b > 0) || (a == 0) || (b == 0)){ cout << "Zero"; } //Negative if((a < 0 && b < 0) && ((b - a) % 2 != 0 )){ cout << "Negative" } return 0; }
a.cc: In function 'int main()': a.cc:19:23: error: expected ';' before '}' token 19 | cout << "Negative" | ^ | ; 20 | } | ~