submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s302164374 | 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.cc: In function 'int main()':
a.cc:18:25: error: expected identifier before '(' token
18 | if(a < 0 && b < 0) && ((b - a) % 2 != 0 ){
| ^
|
s293931658 | p04033 | C++ | #include <iostream>
int main() {
//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 << ... | a.cc: In function 'int main()':
a.cc:6:9: error: 'a' was not declared in this scope
6 | if((a > 0 && b > 0) || (a < 0 && b < 0) && ((b - a) % 2 == 0 )){
| ^
a.cc:6:18: error: 'b' was not declared in this scope
6 | if((a > 0 && b > 0) || (a < 0 && b < 0) && ((b - a) % 2 == 0 )){
| ... |
s589567272 | p04033 | C++ | #include <iostream>
int main() {
//Positive
if(a > 0 && b > 0){
if(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 << "... | a.cc: In function 'int main()':
a.cc:6:6: error: 'a' was not declared in this scope
6 | if(a > 0 && b > 0){
| ^
a.cc:6:15: error: 'b' was not declared in this scope
6 | if(a > 0 && b > 0){
| ^
a.cc:7:27: error: expected identifier before '(' token
7 | if(a < 0 && b > 0... |
s202331967 | p04033 | C++ | #include <iostream>
int int main(int argc, char const *argv[]) {
int a,;
cin >> a >> b;
//Positive
if(a > 0 && b > 0){
if(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.cc:3:1: error: two or more data types in declaration of 'main'
3 | int int main(int argc, char const *argv[]) {
| ^~~
|
s241144242 | p04033 | C++ | include <iostream>
int main(int argc, char const *argv[]) {
if(a > 0 && b > 0){
if(a < 0 && b > 0) && ((b - a) % 2 = 0 )
cout << "Positive";
}
if((a > 0 && b < 0) || (a < 0 && b > 0) || (a = 0) || (b = 0)){
cout << "Zero";
}
if(a < 0 && b > 0) && ((b - a) % 2 != 0 ){
cout << "Negative"
... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
|
s554928497 | p04033 | C++ | #include <cstdio>
#include <iostream>
#include <algorithm>
#define fi first
#define se second
using namespace std;
typedef pair<int,int> par;
const int N=100010;
int n,m,q,fa[N],ans[N],size[N],rank[N];
par e[N];
struct Qry{
int x,y,z,g;
}Q[N],a[N],b[N];
inline char nc(){
static char buf[100000],*p1=buf,*p2=buf... | a.cc: In function 'void Union(int, int)':
a.cc:41:6: error: reference to 'rank' is ambiguous
41 | if(rank[x]>rank[y]) swap(x,y);
| ^~~~
In file included from /usr/include/c++/14/bits/move.h:37,
from /usr/include/c++/14/bits/exception_ptr.h:41,
from /usr/include/c++/14/e... |
s995825305 | p04033 | C++ | #include<bits/stdc++.h>
using namespace std;
void out(int po)
{
cout<<"Possible\n";
for(int i=1;i<n;++i)if(i!=po)cout<<i<<"\n";
cout<<po;
exit(0);
}
int n,l,a[100001];
int main()
{
cin>>n>>l;
for(int i=1;i<=n;++i)
{
cin>>a[i];
if(i==1)continue;
if(a[i]+a[i-1]>=l)out(i-1);
}
cout<<"Impossible";
} | a.cc: In function 'void out(int)':
a.cc:6:15: error: 'n' was not declared in this scope
6 | for(int i=1;i<n;++i)if(i!=po)cout<<i<<"\n";
| ^
|
s838372808 | p04033 | C++ | test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test | a.cc:1:1: error: 'test' does not name a type
1 | test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test
| ^~~~
|
s380528848 | p04033 | C++ | var
a,b,c : integer;
begin
read(a,b);
c:=a*(a+1)*b;
if (c<0) then begin
write('Negative');
end
else
if(c>0) then begin
write('Positive');
end
else if(c=0) then
begin
write('Zero');
end;
end. | a.cc:8:7: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
8 | write('Negative');
| ^~~~~~~~~~
a.cc:12:7: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
12 | write('Positive');
| ^~~~~~~~~~
a.cc:16:7: warning: multi-charact... |
s474028722 | p04033 | C++ | #include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i)
#define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i)
#define each(a,b) for(auto (a): (b))
#define all(v) (v).begin... | a.cc: In function 'int main()':
a.cc:38:12: error: 'a' was not declared in this scope
38 | cin >> a >> b;
| ^
a.cc:38:17: error: 'b' was not declared in this scope
38 | cin >> a >> b;
| ^
|
s678684995 | p04033 | C | //set many funcs
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define inf 1072114514
#define llinf 1145141919810364364
#define mod 1000000007
int max(int a,int b){if(a>b){return a;}return b;}
int min(int a,int b){if(a<b){return a;}return b;}
int zt(int a,int b){return max(a,b)-min(a,b);}
int round(int a,int... | main.c:12:5: warning: conflicting types for built-in function 'round'; expected 'double(double)' [-Wbuiltin-declaration-mismatch]
12 | int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
| ^~~~~
main.c:5:1: note: 'round' is declared in header '<math.h>'
4 | #include<stdlib.h>
+++ |+#... |
s190062836 | p04033 | C | //set many funcs
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define inf 1072114514
#define llinf 1145141919810364364
#define mod 1000000007
int max(int a,int b){if(a>b){return a;}return b;}
int min(int a,int b){if(a<b){return a;}return b;}
int zt(int a,int b){return max(a,b)-min(a,b);}
int round(int a,int... | main.c:12:5: warning: conflicting types for built-in function 'round'; expected 'double(double)' [-Wbuiltin-declaration-mismatch]
12 | int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
| ^~~~~
main.c:5:1: note: 'round' is declared in header '<math.h>'
4 | #include<stdlib.h>
+++ |+#... |
s069678671 | p04033 | C++ | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
def main():
A, B = map(int, input().split())
if 0 < A:
sign = 1
elif A <= 0 <= B:
sign = 0
else: # B < 0
even = (B-A+1) % 2 == 0
sign = 1 if even else -1
if sign > 0:
print("Positive")
elif sign == 0:
... | a.cc:1:2: error: invalid preprocessing directive #!
1 | #!/usr/bin/env python3
| ^
a.cc:2:3: error: invalid preprocessing directive #-
2 | # -*- coding: utf-8 -*-
| ^
a.cc:13:11: error: stray '#' in program
13 | else: # B < 0
| ^
a.cc:6:1: error: 'def' does not name a type
... |
s928131910 | p04033 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
long long int a, b;
cin >> a >> b;
if (a <= 0 && b >= 0) {
cout << "Zero" << endl;
}
if (b < 0) {
if ((b - a + 1) % 2 == 0) {
cout << "Positive" << endl;
}
else {
cout << "Negative" << endl;
}
}
if (a > 0) {
cout << "Positi... | a.cc: In function 'int main()':
a.cc:20:10: error: expected '}' at end of input
20 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s181724627 | p04033 | C | #include <stdio.h>
int main(void) {
int a,b;
scanf("%d %d",&a,&b);
if (a > 0) {
printf("Positive\n");
} else if (b >= 0) {
printf("Zero\n");
} else if((a - b) % 2 = 0) {
printf("Negative\n");
} else {
printf("Positive\n");
}
return 0;
}
| main.c: In function 'main':
main.c:10:27: error: lvalue required as left operand of assignment
10 | } else if((a - b) % 2 = 0) {
| ^
|
s033915491 | p04033 | Java | import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
public class Main {
static void solve(FastScanner sc, PrintWriter out) {
long a = sc.nl()
long b = sc.nl();
out.println(a * b <= 0 ? "Zero" ... | Main.java:10: error: ';' expected
long a = sc.nl()
^
1 error
|
s219769582 | p04033 | C++ | // 簡易競プロテンプレ
#include <bits/stdc++.h>
using namespace std;
int main(void){
ll a, b;
if (a>0) {cout << "Positive" << endl; return 0;}
if (b>=0) {cout << "Zero" << endl; return 0;}
if ((b-a)%2) cout << "Positive" << endl; else cout << "Negative" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:2: error: 'll' was not declared in this scope
6 | ll a, b;
| ^~
a.cc:7:6: error: 'a' was not declared in this scope
7 | if (a>0) {cout << "Positive" << endl; return 0;}
| ^
a.cc:8:6: error: 'b' was not declared in this scope
8 | if (b>=0) {cout << ... |
s030060564 | p04033 | C++ | #incluide <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a <= 0 && 0 <= b) {
cout << "Zero" << endl;
}
else if (0 < a) {
cout << "Positive" << endl;
}
else if (b < 0) {
if ((b - a + 1) % 2 == 0) {
cout << "Positive" << endl;
}
else {
cout <<... | a.cc:1:2: error: invalid preprocessing directive #incluide; did you mean #include?
1 | #incluide <bits/stdc++.h>
| ^~~~~~~~
| include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin >> a >> b;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in he... |
s031397782 | p04033 | C++ | using System;
class Program
{
static void Main(string[] args)
{
string[] input = Console.ReadLine().Split(' ');
int a = int.Parse(input[0]);
int b = int.Parse(input[1]);
if (a > 0 && b > 0) Console.WriteLine("Positive");
else if (a < 0 && b < 0)
{
if... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:5:22: error: 'string' has not been declared
5 | static void Main(string[] args)
| ^~~~~~
a.cc:5:31: error: expected ',' or '...' before 'args'
5 | static void Main(s... |
s163621990 | p04033 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <vector>
using namespace std;
template<class T> T gc()
{
int s, k, m = 0;
T x = 0;
k = getchar_unlocked();
if (k == '-') s = 1;
k = getchar_unlocked();
while (true)
{
k = getchar_unlocked();
if (k < '0' || k > '... | a.cc: In function 'int main()':
a.cc:31:15: error: no matching function for call to 'gc()'
31 | int N = gc();
| ~~^~
a.cc:6:21: note: candidate: 'template<class T> T gc()'
6 | template<class T> T gc()
| ^~
a.cc:6:21: note: template argument deduction/substitution... |
s162919509 | p04033 | C++ | #define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <vector>
using namespace std;
template<class T> void gc()
{
int s, k, m = 0;
T x = 0;
k = getchar_unlocked();
if (k == '-') s = 1;
k = getchar_unlocked();
while (true)
{
k = getchar_unlocked();
if (k < '0' || k ... | a.cc: In function 'int main()':
a.cc:31:15: error: no matching function for call to 'gc()'
31 | int N = gc();
| ~~^~
a.cc:6:24: note: candidate: 'template<class T> void gc()'
6 | template<class T> void gc()
| ^~
a.cc:6:24: note: template argument deduction/sub... |
s811183798 | p04033 | C++ | S#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <sstream>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <list>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <climits>
#include <bitset>
#inc... | a.cc:1:2: error: stray '#' in program
1 | S#include <string>
| ^
a.cc:1:1: error: 'S' does not name a type
1 | S#include <string>
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/deque:62,
from /usr/include/c++/14/queue... |
s120100097 | p04033 | C++ | #include <set>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;
#define IN(n) int n;cin>>n
#define IN_(n,n_) int n,n_;cin>>n>>n_;
#define OUT(n) cout << n << endl
#define OUT_(n,n_) cout << n << " " << n_ << endl
#define v_(a,n,n_) vector<vector<a>>(n,vector<a>(n_)) //vec... | a.cc: In function 'int main()':
a.cc:9:28: error: 'cin' was not declared in this scope
9 | #define IN_(n,n_) int n,n_;cin>>n>>n_;
| ^~~
a.cc:30:5: note: in expansion of macro 'IN_'
30 | IN_(a,b);
| ^~~
a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; th... |
s382915092 | p04033 | C++ | #include <set>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;
#define IN(n) int n;cin>>n
#define IN_(n,n_) int n,n_;cin>>n>>n_;
#define OUT(n) cout << n << endl
#define OUT_(n,n_) cout << n << " " << n_ << endl
#define v_(a,n,n_) vector<vector<a>>(n,vector<a>(n_)) //vec... | a.cc: In function 'int main()':
a.cc:9:28: error: 'cin' was not declared in this scope
9 | #define IN_(n,n_) int n,n_;cin>>n>>n_;
| ^~~
a.cc:30:5: note: in expansion of macro 'IN_'
30 | IN_(a,b);
| ^~~
a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; th... |
s779419387 | p04033 | C++ | #define REP_(i,n) for(int i=(n)-1;i>=0;i--)
#define SORT(n) sort((n).begin(),(n).end())
#define ALL(n) (n).begin(),(n).end()
#define TRY(n) try{n}catch(...){}
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef vector<string> vs;
typedef vector<vector<string> > vss;
//vii v = v_(int,5,5);
int main(){
... | a.cc:6:9: error: 'vector' does not name a type
6 | typedef vector<int> vi;
| ^~~~~~
a.cc:7:9: error: 'vector' does not name a type
7 | typedef vector<vector<int> > vii;
| ^~~~~~
a.cc:8:9: error: 'vector' does not name a type
8 | typedef vector<string> vs;
| ^~~~~~
a... |
s232900633 | p04033 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
int a,b;
cin>>a>>b;
if(a<=0&&b>=0) cout<<"Zero"<<endl;
else if(a*b>0) cout<<"Positive"<<end;
else cout<<"Negative"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:34: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
9 | else if(a*b>0) cout<<"Positive"<<end;
| ~~~~~~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/istream:41,
... |
s109474428 | p04033 | C++ | #include<cstdio>
int main(){
int a,b;
cin>>a>>b;
if(a>b)swap(a,b);
int g=1;
for(int i=a;i<=b;i++){
g*=i;
}
if(!g)cout<<"Zero"<<endl;
else if(g>0)cout<<"Positive"<<endl;
else cout<<"Negative"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:4:1: error: 'cin' was not declared in this scope
4 | cin>>a>>b;
| ^~~
a.cc:5:8: error: 'swap' was not declared in this scope
5 | if(a>b)swap(a,b);
| ^~~~
a.cc:10:7: error: 'cout' was not declared in this scope
10 | if(!g)cout<<"Zero"<<endl;
| ... |
s455311228 | p04033 | C++ | #include <iostream>
using namespace std;
int main()
{
int a,b,mul=1;
cin>>a>>b;
int i;
while(i<=b){
mul=mul*i;
i++;
}
if(mul>=0){
cout<<"Positive"<<endl;
}
else if(mul<=0){
cout<<"Negative"<<endl;
}
else{
cout<<"Zero"<<endl;
}#include <iostream>
using namespace std;
int main()
{
int a,b,mul=1;
cin>>a>>b;
int i;
while(i... | a.cc:20:2: error: stray '#' in program
20 | }#include <iostream>
| ^
a.cc: In function 'int main()':
a.cc:20:3: error: 'include' was not declared in this scope
20 | }#include <iostream>
| ^~~~~~~
a.cc:20:20: error: expected primary-expression before '>' token
20 | }#include <iostream>
| ... |
s918078587 | p04033 | C++ | #include <iostream>
#include <string>
#include <map>
#include <vector>
using namespace std;
int main()
{
int a,b;
int seki = 1;
scanf(%d,&a);
scanf(%d,&b);
for(int i = a;i<=b;i++)
{
seki *= i;
}
if(seki>0){
printf("%s","Positive\n");
} else if(seki = 0){
printf("%s","Zero")
} else {
printf("%s","Ne... | a.cc: In function 'int main()':
a.cc:12:15: error: expected primary-expression before '%' token
12 | scanf(%d,&a);
| ^
a.cc:12:16: error: 'd' was not declared in this scope
12 | scanf(%d,&a);
| ^
a.cc:13:15: error: expected primary-expression before '%' tok... |
s082610190 | p04033 | Java | import java.util.Scanner;
public class Atc_1 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if (a > 0 && b > 0 )
System.out.println("Positive");
else if (a <= 0 && b >= 0)
System.out.println("Zero");
else if((Math.abs(a... | Main.java:2: error: class Atc_1 is public, should be declared in a file named Atc_1.java
public class Atc_1 {
^
1 error
|
s200679851 | p04033 | C | #include <stdio.h>
int main(void){
int a,b,n;
scanf("%d %d",&a,&b);
if(a>0)puts("Positive");
else if(a<=0&&b>=0)puts("Zero");
else{
n=b-a+1;
if(n%2)puts("Negative");
else puts("Positive")+
}
return 0;
} | main.c: In function 'main':
main.c:11:9: error: expected expression before '}' token
11 | }
| ^
|
s978351809 | p04033 | C++ | #include<iostream>
using namespace std;
int main(0
{
cout<<1<<endl;
return 0;
} | a.cc:3:5: error: cannot declare '::main' to be a global variable
3 | int main(0
| ^~~~
a.cc:3:11: error: expected ')' before '{' token
3 | int main(0
| ~ ^
| )
4 | {
| ~
|
s803018992 | p04033 | Java | /* Filename: AGC002A.java
* Author: Mushiyo
*/
import java.util.Scanner;
public class Math{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
while (input.hasNext()) {
int a = input.nextInt();
int b = input.nextInt();
if(a > 0){
System.out.println("Positive");
... | Main.java:7: error: class Math is public, should be declared in a file named Math.java
public class Math{
^
1 error
|
s835963246 | p04033 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
cin >> a >> b;
if(a<=0 && 0<=b)cout << "Zero";
else if(a>0)cout << "Positive";
else if(!(b-a)%2))cout << "Negative";
else cout << "Positive";
cout << '\n';
}
| a.cc: In function 'int main()':
a.cc:10:20: error: expected primary-expression before ')' token
10 | else if(!(b-a)%2))cout << "Negative";
| ^
|
s280396633 | p04033 | C++ | #include<iostream>
using namespace std;
int main()
{
int a,b;
int zero=1, minus=0, result;
cin >> a >> b;
for(int i=0, i<b-a+1, i++)
{
if(a+i < 0)
{
minus++;
}
if(a+i == 0)
{
zero=0;
}
}
result = minus%2;
if(zero == 0 )
{
cout << "Zero"<< endl;
}else{
if(result==0)
{
cou... | a.cc: In function 'int main()':
a.cc:11:23: error: expected ';' before '<' token
11 | for(int i=0, i<b-a+1, i++)
| ^
| ;
a.cc:11:23: error: expected primary-expression before '<' token
a.cc:11:34: error: expected ';' before ')' token
11 | for... |
s056510088 | p04033 | C++ | a | a.cc:1:5: error: 'a' does not name a type
1 | a
| ^
|
s088432938 | p04033 | C++ | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.OutputStream;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.IOException;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmod... |
s284267416 | p04033 | Java | public class Main {
public static void main(String[] args) throws java.io.IOException {
// TODO 自動生成されたメソッド・スタブ
Scanner in = new Scanner(System.in);
int a = in.nextInt();
int b = in.nextInt();
int result = 0;
for (;a <= b; a++) {
result = a * (a + 1);
if (result == 0) {
break;
}
}
if(resul... | Main.java:4: error: cannot find symbol
Scanner in = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner in = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s870915130 | p04033 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long A = sc.nextLong()L;
long B = sc.nextLong()L;
long C = A;
for(int i=0; i<B-A; i++){
A = A*(C+1);
... | Main.java:6: error: ';' expected
long A = sc.nextLong()L;
^
Main.java:7: error: ';' expected
long B = sc.nextLong()L;
^
2 errors
|
s316867991 | p04033 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long A = sc.nextInt()L;
long B = sc.nextInt()L;
long C = A;
for(int i=0; i<B-A; i++){
A = A*(C+1);
... | Main.java:6: error: ';' expected
long A = sc.nextInt()L;
^
Main.java:7: error: ';' expected
long B = sc.nextInt()L;
^
2 errors
|
s488692261 | p04033 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
Int C = A;
for(int i=0; i<B-A; i++){
A = A*(C+1);
C++;
... | Main.java:8: error: cannot find symbol
Int C = A;
^
symbol: class Int
location: class Main
1 error
|
s655349748 | p04033 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc =new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
for(int i=0; i<B-A; i++){
A = A*(A+1);
}
if(A =0){
... | Main.java:13: error: incompatible types: int cannot be converted to boolean
if(A =0){
^
1 error
|
s392130082 | p04033 | Java | import java.util.*;
public class Main{
public static void main(Strint[] args){
Scanner sc =new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
for(int i=0; i<B-A; i++){
A = A*(A+1);
}
if(A =0){
... | Main.java:3: error: cannot find symbol
public static void main(Strint[] args){
^
symbol: class Strint
location: class Main
Main.java:13: error: incompatible types: int cannot be converted to boolean
if(A =0){
^
2 errors
|
s273022290 | p04033 | C++ | #include <iostream>
using namespace std;
int main()
{
cin >> a ;
cin >> b ;
if( a * b <= 0 )
{
cout << "Zero" << endl ;
}
else
{
if( a + b <= 0 )
{
if( ( b - a ) % 2 == 0 )
{
cout << "Negative" << endl ;
}
else
{
cout << "Positive" << endl ;
}
}
else
{
cout << "Positi... | a.cc: In function 'int main()':
a.cc:7:16: error: 'a' was not declared in this scope
7 | cin >> a ;
| ^
a.cc:8:16: error: 'b' was not declared in this scope
8 | cin >> b ;
| ^
|
s447107573 | p04033 | C++ | #include <cstdio>
#include <cmath>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <queue>
#include <vector>
#include <map>
using namespace std;
typedef long long LL;
int n;
int len,a[100005]
LL s[100005];
int l,r;
bool flag;
int ans[100005];
int main()
{
scanf("%d%d",&n,&len);
f... | a.cc:28:1: error: expected initializer before 'LL'
28 | LL s[100005];
| ^~
a.cc: In function 'int main()':
a.cc:37:44: error: 'a' was not declared in this scope
37 | for (int i=1;i<=n;++i) scanf("%d",&a[i]);
| ^
a.cc:38:9: error: 's' was not declared ... |
s043994563 | p04033 | Java | import java.util.*;
import java.io.*;
public class Main {
void solve() {
String ans = "";
long a = sc.nextLong();
long b = sc.nextLong();
long ans = 1;
for (long i = a; i <= b; i++) {
ans *= i;
}
if (ans == 0) {
System.out.println("Zero");
} else if (ans < 0) {
System.out.println("Negati... | Main.java:11: error: variable ans is already defined in method solve()
long ans = 1;
^
1 error
|
s020766911 | p04033 | C++ | #include <iostream>
using namespace std;
int main(){
int a, b;
cin a >> b;
if(a * b <= 0 ){
cout << "Zero" << endl;
}else if( (a < 0 && 0 < b) && a%2 != 0 || (a < 0 && b < 0) && (b-a+1)%2 != 0 ){
cout << "Negative" << endl;
}else{
cout << "Positive" << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:8: error: expected ';' before 'a'
6 | cin a >> b;
| ^~
| ;
|
s980138757 | p04033 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
int ans = a;
for(int i = a + 1; i <= b; i++){
if(ans > 0)ans = 1;
else if(ans == 0){
ans = 0;
break;
}else if(ans < 0){
ans = -1:
}
ans *= i;
}... | a.cc: In function 'int main()':
a.cc:14:21: error: expected ';' before ':' token
14 | ans = -1:
| ^
| ;
|
s002145194 | p04033 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n=scan.nextInt();
int m=scan.nextInt();
int a = scan.nextInt();
int b = scan.nextInt();
String ans = "";
if (0 < a)
... | Main.java:15: error: illegal start of expression
if (a < =0 && 0 <= b)
^
1 error
|
s117712433 | p04033 | Java | int a = scan.nextInt();
int b = scan.nextInt();
String ans = "";
if (0 < a)
ans = "Positive";
if (a < =0 && 0 <= b)
ans = "Zero";
if (b < 0 && (b - a) % 2 == 0)
ans = "Negative";
System.out.println(ans); | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
int a = scan.nextInt();
^
(use --enable-preview to enable unnamed classes)
Main.java:4: error: class, interface, enum, or record expected
if (0 < a)
^
Main.java:6: error: class, interface, enum, or r... |
s366621134 | p04033 | C | #include<stdio.h>
int main(void)
{
int a,b,c;
c=0;
scanf("%d %d",&a,&b);
c=a*(a+1)*b;
if(1=<c){
printf("Positive\n");
}
if(-1>=c){
printf("Negative\n");
}
if(c==0){
printf("Zero\n");
}
return 0;
} | main.c: In function 'main':
main.c:8:14: error: expected expression before '<' token
8 | if(1=<c){
| ^
|
s050988630 | p04033 | C++ | #include<stdio.h>
int main(void)
{
int a,b,c;
c=0;
scanf("%d %d",&a,&b);
c=a*(a+1)*b;
if(1=<c){
printf("Positive\n");
}
if(-1>=c){
printf("Negative\n");
}
if(c==0){
printf("Zero\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:14: error: expected primary-expression before '<' token
8 | if(1=<c){
| ^
|
s851036216 | p04033 | C | #include <iostream>
using namespace std;
int main() {
int a,b;
cin >> a >> b;
if (a==0 || b ==0) {
cout << "Zero" << endl;
return 0;
}
if (a < 0 && b > 0) {
cout << "Zero" << endl;
}
int c = (b - a) % 2;
if (a < 0) {
if (c == 0) {
cout << "Negative" << endl;
} else {
cout << "Positive" <... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s562664292 | p04033 | C++ | a,b;main(){
scanf("%d%d",&a,&b);
if(!a||!b||a<0&&b>0)printf("Zero\n");
else if(a>0&&b>0)printf("Positive\n");
else printf((b-a+1)%2?"Negative\n":"Positive\n");
}
| a.cc:1:1: error: 'a' does not name a type
1 | a,b;main(){
| ^
a.cc:1:5: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | a,b;main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:2:23: error: 'a' was not declared in this scope
2 | scanf("%d%d",&a,&b);
... |
s141458692 | p04033 | C++ | using namespace std;
int compareMultiple(int a, int b) {
if (a == b) {
return a;
}
if (a > 0) {
return 1;
}
if (a <= 0 && b >= 0) {
return 0;
}
if (b < 0) {
return (-a + b) % 2 == 0 ? -1 : 1;
}
}
int main() {
long a, b;
cin >> a >> b;
int res... | a.cc: In function 'int main()':
a.cc:20:5: error: 'cin' was not declared in this scope
20 | 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:22:5: err... |
s943520890 | p04033 | C++ | use std::io;
use std::str::FromStr;
use std::str::Chars;
use std::i32;
use std::u8;
use std::f64;
use std::ascii::AsciiExt;
use std::collections::HashMap;
use std::collections::HashSet;
use std::collections::BTreeMap;
use std::collections::BTreeSet;
use std::collections::VecDeque;
use std::io::prelude::*;
use std::time... | a.cc:47:2: error: invalid preprocessing directive #[
47 | #[allow(dead_code)]
| ^
a.cc:54:2: error: invalid preprocessing directive #[
54 | #[allow(dead_code)]
| ^
a.cc:60:2: error: invalid preprocessing directive #[
60 | #[allow(dead_code)]
| ^
a.cc:66:2: error: invalid preprocessing dire... |
s377960702 | p04033 | Java | /**
* Created by abhishek on 7/31/2016.
*/
import java.util.*;
import java.io.*;
public class A {
public static void main(String[] args) throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
int ... | Main.java:6: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s730611735 | p04033 | C++ | #include <bits/stdc++.h>
long long a,b;
int main(){
std::cin>>a>>b;
if(a*b<=0){
std::cout<<"Zero";
return 0;
}
else if(a>0&&b>0){
std::cout<<"Positive";
return 0;
}
else {
if(b-a%2==0){
std::cout<<"Negative";
}
else std::cout<"P... | a.cc: In function 'int main()':
a.cc:17:23: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [9]')
17 | else std::cout<"Positive";
| ~~~~~~~~~^~~~~~~~~~~
| | |
| | const ... |
s789213531 | p04033 | C++ | #include <bits/stdc++.h>
long long a,b;
int main(){
std::cin>>a>>b;
if(a*b<=0){
std::cout<<"Zero";
return 0;
}
else if(a>0&&b>0){
std::cout<<"Positive";
return 0;
}
else {
if(b-a%2==0){
std::cout<<"Negative";
}
else std::cout<"P... | a.cc: In function 'int main()':
a.cc:17:23: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [9]')
17 | else std::cout<"Positive";
| ~~~~~~~~~^~~~~~~~~~~
| | |
| | const ... |
s732875721 | p04033 | C++ | #include <bits/stdc++.h>
long long a,b;
int main(){
std::cin>>a>>b;
if(a*b<=0){
std::cout<<"Zero";
return 0;
}
else if(a>0&&b>0){
std::cout<<"Positive";
return 0;
}
else {
if(b-a%2==0){
std::cout<<"Negative";
}
else std::cout<"P... | a.cc: In function 'int main()':
a.cc:17:23: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [9]')
17 | else std::cout<"Positive";
| ~~~~~~~~~^~~~~~~~~~~
| | |
| | const ... |
s070762108 | p04033 | C++ | {-# LANGUAGE ScopedTypeVariables #-}
import Control.Applicative
import Control.Monad
import Control.Monad.State
import Control.DeepSeq
import Data.Array
import Data.Bits
import Data.Char
import Data.Functor.Identity
import Data.List
import Data.Ord
import Data.Maybe
import Data.Tree
import Data.Tuple
import qualified S... | a.cc:1:3: error: stray '#' in program
1 | {-# LANGUAGE ScopedTypeVariables #-}
| ^
a.cc:1:34: error: stray '#' in program
1 | {-# LANGUAGE ScopedTypeVariables #-}
| ^
a.cc:40:15: error: stray '\' in program
40 | getIntPair = (\[a,b]->(a,b)) <$> getInts
| ... |
s462040796 | p04033 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
if( a<= 0 && 0<= b ){
cout<<"Zero"<<endl;
}else{
int cnt=0;
if(b<0)a+=b
if(a<0 && (-a)%2==0 ){
cout<<"Negative"<<endl;
}else{
cout<<"Positive"<<endl;
}
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:16: error: expected ';' before 'if'
12 | if(b<0)a+=b
| ^
| ;
13 |
14 | if(a<0 && (-a)%2==0 ){
| ~~
|
s994640647 | p04033 | C++ | #include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <queue>
#include <algorithm>
#include <utility>
#include <cmath>
#define INF_LL 9000000000000000000
#define INF 2000000000
#define REP(i, n) for(int i = 0;i < (n);i++)
#define FOR(i, a, b) for(int i = (a);i < (b);i++)
using namespace... | a.cc: In function 'int main()':
a.cc:74:24: error: expected primary-expression before '<' token
74 | cout <<< "Zero" << endl;
| ^
a.cc:74:33: error: invalid operands of types 'const char [5]' and '<unresolved overloaded function type>' to binary 'operator<<'
74 | ... |
s894591614 | p04033 | C++ | #include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <queue>
#include <algorithm>
#include <utility>
#include <cmath>
#define INF_LL 9000000000000000000
#define INF 2000000000
#define REP(i, n) for(int i = 0;i < (n);i++)
#define FOR(i, a, b) for(int i = (a);i < (b);i++)
using namespace... | a.cc: In function 'int main()':
a.cc:74:24: error: expected primary-expression before '<' token
74 | cout <<< "Zero" << ednl;
| ^
a.cc:74:36: error: 'ednl' was not declared in this scope
74 | cout <<< "Zero" << ednl;
| ... |
s725761947 | p04033 | Java | import java.io.*;
import java.util.*;
public class rangeprod {
private static InputReader in;
private static PrintWriter out;
public static void main(String[] args) throws IOException {
in = new InputReader(System.in);
out = new PrintWriter(System.out, true);
int a = in.nextInt(), b= in.nextInt();
... | Main.java:4: error: class rangeprod is public, should be declared in a file named rangeprod.java
public class rangeprod {
^
1 error
|
s531926679 | p04034 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
const int N=2e5+500;
int p[N],size[N],n,m;
int main()
{
scanf("%d%d",&n,&m);
for(int i=1;i<=n;i++)size[i]=1;p[1]=1;
for(int i=1,x,y;i<=m;i++)
{
scanf("%d%d",&x,&y);
if(p[x])p[y]=1;
if(size[x]==1)p[x]=0;
... | a.cc: In function 'int main()':
a.cc:10:26: error: reference to 'size' is ambiguous
10 | for(int i=1;i<=n;i++)size[i]=1;p[1]=1;
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr... |
s484181227 | p04034 | Java | import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
private int red;
private final Box[] boxes;
private final Step[] steps;
private final Set<Integer> positions;
public Main(Box[] boxes, Step[] steps){
this.boxes ... | Main.java:33: error: cannot find symbol
Main boxAndBall = new BoxAndBall(boxes, steps);
^
symbol: class BoxAndBall
location: class Main
1 error
|
s269113164 | p04034 | Java | import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class BoxAndBall {
private int red;
private final Box[] boxes;
private final Step[] steps;
private final Set<Integer> positions;
public BoxAndBall(Box[] boxes, Step[] steps){
... | Main.java:6: error: class BoxAndBall is public, should be declared in a file named BoxAndBall.java
public class BoxAndBall {
^
1 error
|
s041819873 | p04034 | Java | import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class BoxAndBall {
private int red;
private final Box[] boxes;
private final Step[] steps;
private final Set<Integer> positions;
public BoxAndBall(Box[] boxes, Step[] steps){
... | Main.java:6: error: class BoxAndBall is public, should be declared in a file named BoxAndBall.java
public class BoxAndBall {
^
1 error
|
s888376506 | p04034 | C++ | #pragma GCC optimize("Ofast")
#include <cstdio>
int arr1[10][10] = {
{0,0,0,0,0,0,0,0,0,0},
{0,100000,0,9029,0,0,0,7519,7572,1},
{0,0,0,0,9527,0,0,13336,0,0},
{0,14416,0,0,0,0,0,0,0,0},
{0,0,3,0,0,0,16971,0,18448,0},
{50000,342,0,0,0,0,0,0,0,50000},
{0,20398,0,0,7169,0,0,5300,0,0},
{0,0... | a.cc: In function 'int main()':
a.cc:27:15: error: 'fgetchar' was not declared in this scope; did you mean 'getchar'?
27 | int ch0 = fgetchar() - '0';
| ^~~~~~~~
| getchar
|
s868072355 | p04034 | C | #pragma GCC optimize("Ofast")
#include <stdio.h>
#include <unistd.h>
int main(void) {
sleep(3)
return 0;
} | main.c: In function 'main':
main.c:6:9: error: expected ';' before 'return'
6 | sleep(3)
| ^
| ;
7 | return 0;
| ~~~~~~
|
s216411740 | p04034 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n, m;
cin >> n >> m;
vector<P> xy(m);
rep(i, m) {
int x, y;
cin >> x >> y;
x--;
y--;
xy.at(i) = make_pair(x, y);
}
vector<int... | a.cc: In function 'int main()':
a.cc:38:25: error: expected primary-expression before '>' token
38 | if (possible.at(i)) > 0) {
| ^
|
s190659428 | p04034 | C++ | #include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstd... | a.cc: In function 'int main()':
a.cc:48:25: error: expected '}' at end of input
48 | cout << ans << endl;
| ^
a.cc:30:11: note: to match this '{'
30 | int main(){
| ^
|
s752368403 | p04034 | C++ | #include<bits/stdc++.h>
#include<cctype>
using namespace std;
#define rep(i,n) for (int i=0;i<(n);i++)
#define all(v) (v).begin(),(v).end()
typedef long long int ll;
#define pi 3.1415926535897932384
#define E9 1000000000
#define eps 1e-4
#define pii pair<int,int>
int main(){
int N, M; cin >> N >> M;
vector<bool> d... | a.cc: In function 'int main()':
a.cc:24:11: error: no match for 'operator|=' (operand types are 'std::vector<bool>::reference' and 'std::vector<bool>::reference')
24 | dp[y] |= dp[x];
| ~~~~~~^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.c... |
s344733754 | p04034 | C++ | #include <bits/stdc++.h>
using namespace std;
int visit[10010];
int num[10010];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int N, M;
cin >> N >> M;
int ans = 1;
visit[1] = 1;
fill(num, num + N + 1, 1);
while (M --) {
int x, y;
cin >> x >> y;
... | a.cc: In function 'int main()':
a.cc:12:5: error: reference to 'visit' is ambiguous
12 | visit[1] = 1;
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
from a.cc:1:
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, c... |
s045614698 | p04034 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin>>N>>M;
vector<int> p(N,1);
vector<int> r(N);
r.at(0)=1;
for(int i=0;i<M;i++){
int a,b;
cin>>a>>b;
a--,b--;
if(r.at(a)==1){
r.at(b)=1;
}
p.at(a)--;
p.at(b)++;
if(p.at(a)==0){
r.at(a)=0;
}
}
int Z=0;
for(int... | a.cc: In function 'int main()':
a.cc:27:15: error: expected '}' at end of input
27 | cout<<Z<<endl;
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s149713757 | p04034 | C++ | #include <algorithm>
#include <iostream>
using namespace std;
using ll = long long;
#define repl(i, l, r) for (int i = l; i < r; i++)
#define rep(i, n) repl(i, 0, n)
int main() {
int n, m;
cin >> n >> m;
vector<int> cnt(n, 1), red(n);
red[0] = 1;
rep(i, m) {
int a, b;
cin >> a >> b;
a--, b--;
cnt[a]--, cnt... | a.cc: In function 'int main()':
a.cc:10:9: error: 'vector' was not declared in this scope
10 | vector<int> cnt(n, 1), red(n);
| ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
2 | #include <iostream>
+++ |+#inclu... |
s602579819 | p04034 | C++ | #pragma once
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using VI = vector<int>;
using V... | a.cc:1:9: warning: #pragma once in main file
1 | #pragma once
| ^~~~
a.cc: In function 'int main()':
a.cc:88:14: error: no match for 'operator|=' (operand types are 'std::vector<bool>::reference' and 'std::vector<bool>::reference')
88 | red[y-1] |= red[x-1];
| ~~~~~~~~~^~~~~~~~~~~
In ... |
s134045341 | p04034 | C++ | for(int i=0;i<m;i++)
{
cin>>x[i]>>y[i];
} | a.cc:1:1: error: expected unqualified-id before 'for'
1 | for(int i=0;i<m;i++)
| ^~~
a.cc:1:13: error: 'i' does not name a type
1 | for(int i=0;i<m;i++)
| ^
a.cc:1:17: error: 'i' does not name a type
1 | for(int i=0;i<m;i++)
| ^
|
s914895889 | p04034 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
long N, M;
cin >> N >> M;
vector<pair<long, long> data(N);
for(int i = 0; i < N; i++)data.at(i).first = 1;
data.at(0).second = 1;
long x, y;
for(int i = 0; i < M; i++){
cin >> x >> y;
x--;
y--;
data.at(x).first--;
data.at(y).f... | a.cc: In function 'int main()':
a.cc:6:33: error: template argument 1 is invalid
6 | vector<pair<long, long> data(N);
| ^
a.cc:6:33: error: template argument 2 is invalid
a.cc:7:34: error: overloaded function with no contextual type information
7 | for(int i = 0; i < N;... |
s752536790 | p04034 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for(long long int i = 0; i < n; i++)
#define _rep(i, m, n) for(long long int i = m; i < n; i++)
#define print(n) std::cout << n << std::endl
#define _print(n) std::cout << n
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int N = 1000000;
const ll mo... | a.cc: In function 'int main()':
a.cc:37:2: error: expected '}' at end of input
37 | }
| ^
a.cc:15:11: note: to match this '{'
15 | int main(){
| ^
|
s715988517 | p04034 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina c... | a.cc: In function 'int main()':
a.cc:33:13: error: expected ';' before ':' token
33 | return 0:
| ^
| ;
a.cc:33:13: error: expected primary-expression before ':' token
|
s073565160 | p04034 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n, m; cin >> n >> m;
vector<int> x(m), y(m);
for(int i=0; i<n; ++i) cin >> x[i] >> y[i];
vector<int> red(n, 0);
red[0] = 1;
vector<int> ball(n, 1);
for(int i=0; i<m; ++i){
int prev = x[i]-1, aftr = y[i]-1;
if(red[prev]){
if(ba... | a.cc: In function 'int main()':
a.cc:19:15: error: expected '(' before 'red'
19 | else if red[aftr] = 1;
| ^~~
| (
|
s018423523 | p04034 | C++ | 4 4
1 2
2 3
4 1
3 4 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 4 4
| ^
|
s148284843 | p04034 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,n) for(int i=1;i<=(n);i++)
#define lol long long
#define SUM(n) ((n)+1)*(n)/2 //1〜nまでの総和を求める式
#define mp make_pair
#define fi first
#define se second
#define pu push_back
#define SYOU(x) setprecision(x+1) //小数点桁数を指定する
#define abs(x,y) (ma... | a.cc:6:28: error: extended character is not valid in an identifier
6 | #define SUM(n) ((n)+1)*(n)/2 //1〜nまでの総和を求める式
| ^
a.cc:29:20: error: extended character is not valid in an identifier
29 | bool Red[n + 5] = {false};
| ^
a.cc: In function 'int ... |
s462197037 | p04034 | C++ | #include "bits/stdc++.h"
// Begin Header {{{
using namespace std;
#ifndef DEBUG
#define dump(...)
#endif
#define all(x) x.begin(), x.end()
#define rep(i, n) for (intmax_t i = 0, i##_limit = (n); i < i##_limit; ++i)
#define reps(i, b, e) for (intmax_t i = (b), i##_limit = (e); i <= i##_limit; ++i)
#define repr(i, b, ... | a.cc: In function 'int main()':
a.cc:122:18: error: no match for 'operator|=' (operand types are 'std::vector<bool>::reference' and 'std::vector<bool>::reference')
122 | exist[y] |= exist[x];
| ~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
... |
s922104909 | p04034 | C++ | #include<stdio.h>
#define MAXN 100006
int memo[MAXN], flag[MAXN];
int main() {
int m, n, x, y, ans = 0;
scanf_s("%d%d", &n, &m);
for (int i = 1; i <= n; i++) memo[i] = 1, flag[i] = 0;
flag[1] = 1;
while (m--) {
scanf_s("%d%d", &x, &y);
if (flag[x] == 1) flag[y] = 1;
memo[x]--, memo[y]++;
if (memo[x] == 0)... | a.cc: In function 'int main()':
a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
7 | scanf_s("%d%d", &n, &m);
| ^~~~~~~
| scanf
|
s777787178 | p04034 | Java | import java.util.Scanner;
public class Temp {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int m = scanner.nextInt();
int[] box = new int[n+1];
boolean[] flag = new boolean[n+1];
for(int i = 1; i < n+1... | Main.java:3: error: class Temp is public, should be declared in a file named Temp.java
public class Temp {
^
1 error
|
s504140684 | p04034 | C++ | #include <iostream>
#include <fstream>
#include <vector>
#include <cstring>
#include <algorithm> // sort
#define REP(i, n) for (long long i = 0; i < (n); i++)
typedef long long ll;
static const ll INF = 1000000000000000000LL;
using namespace std;
int main() {
int N,M;
cin >> N >> M;
vector <int> a(N,0)... | a.cc: In function 'int main()':
a.cc:30:14: error: 'x' was not declared in this scope
30 | if(a[x])++res;
| ^
|
s508360175 | p04034 | C++ | #include <iostream>
#include <cstring>
#define MOD 1000000007
using namespace std;
int n, m, arr[100010], state[100010], y, x;
int main(void){
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin>>n>>m;
for(int i=0;i<n;i++)arr[i]=1;
for(int i=0;i<m;i++){
cin>>x>>y;
if(arr[x]==0)continue;
if(arr[... | a.cc: In function 'int main()':
a.cc:26:41: error: 'syc' was not declared in this scope; did you mean 'sayac'?
26 | for(int i=0;i<n;i++)if(state[i])syc++;
| ^~~
| sayac
a.cc:27:15: error: 'syc' was not declared in thi... |
s696718644 | p04034 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int a[100010],b[100010]
vector<int> nums(N, 1), can(N, 0);
can[0] = 1;
for (int i = 0; i < M; ++i) {
cin >> a[i] >> b[i];
--a[i], --b[i];
if (can[a[i]]) can[b[i]] = 1;... | a.cc: In function 'int main()':
a.cc:9:5: error: expected initializer before 'vector'
9 | vector<int> nums(N, 1), can(N, 0);
| ^~~~~~
a.cc:10:5: error: 'can' was not declared in this scope
10 | can[0] = 1;
| ^~~
a.cc:13:22: error: 'b' was not declared in this scope
13 | cin >... |
s838741568 | p04034 | C++ | #include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
int N, M;
cin >> N >> M;
vector<bool> hantei(N+1, false);
hantei.at(1) = true;
vector<int> ball(N+1, 1);
ball.at(0) = 0;
int X, Y;
for( int i = 0; i < M; i++ ){
cin >> X >> Y;
if( hantei.at(X) == true ){
... | a.cc: In function 'int main()':
a.cc:22:19: error: no 'operator--(int)' declared for postfix '--' [-fpermissive]
22 | hantei.at(X)--;
| ~~~~~~~~~~~~^~
a.cc:23:19: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
23 | hantei.at(Y)++;
| ~~~~~~~~~~~~^~
|
s495368563 | p04034 | Java | public class Main {
public static void main(String[] args) {
Scanner console = new Scanner(System.in);
int n = console.nextInt(); //number of boxes
int m = console.nextInt(); //number of operations
console.nextLine();
int[] numBalls = new int[n];
boolean[] couldHaveRed = new boolean[n];
//intialize boxe... | Main.java:4: error: cannot find symbol
Scanner console = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner console = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s260563302 | p04034 | Java | import java.util.Scanner;
public class BoxAndBall {
public static void main(String[] args) {
Scanner console = new Scanner(System.in);
int n = console.nextInt(); //number of boxes
int m = console.nextInt(); //number of operations
console.nextLine();
int[][] boxInfo = new int[n][2]; //of 2, first is tot... | Main.java:2: error: class BoxAndBall is public, should be declared in a file named BoxAndBall.java
public class BoxAndBall {
^
1 error
|
s264415739 | p04034 | Java | Scanner console = new Scanner(System.in);
int n = console.nextInt(); //number of boxes
int m = console.nextInt(); //number of operations
console.nextLine();
int[][] boxInfo = new int[n][2]; //of 2, first is total count, second is 0 if no red, 1 if possible
//boxInfo[n][0] gives total balls
//boxInfo[n]... | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
Scanner console = new Scanner(System.in);
^
(use --enable-preview to enable unnamed classes)
Main.java:4: error: class, interface, enum, or record expected
console.nextLine();
^
Main.java:11: error: class, interface, enum, or r... |
s967839707 | p04034 | Java | Scanner console = new Scanner(System.in);
int n = console.nextInt(); //number of boxes
int m = console.nextInt(); //number of operations
console.nextLine();
int[][] boxInfo = new int[n][2]; //of 2, first is total count, second is 0 if no red, 1 if possible
//boxInfo[n][0] gives total balls
//boxInfo[n]... | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
Scanner console = new Scanner(System.in);
^
(use --enable-preview to enable unnamed classes)
Main.java:4: error: class, interface, enum, or record expected
console.nextLine();
^
Main.java:11: error: class, interface, enum, or r... |
s993496784 | p04034 | Java | import java.util.Scanner;
public class BoxAndBall {
public static void main(String[] args) {
Scanner console = new Scanner(System.in);
int n = console.nextInt(); //number of boxes
int m = console.nextInt(); //number of operations
console.nextLine();
int[][] boxInfo = new int[n][2]; //of 2, first is tot... | Main.java:2: error: class BoxAndBall is public, should be declared in a file named BoxAndBall.java
public class BoxAndBall {
^
1 error
|
s468902811 | p04034 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i=0; i<(int)(n); ++i)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using Graph = vector<vi>; // vi <=> vl
using P = pair<int, int>; // int <=> ... | a.cc: In function 'int main()':
a.cc:16:10: error: 'n' was not declared in this scope
16 | vi box(n, 1);
| ^
|
s147331472 | p04034 | C++ | #include <algorithm>
#include <iostream>
#include <vector>
#include <map>
#include <cstdio>
#include <string>
#include <cmath>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define repr(i, n) for (int i = (n) - 1; i >= 0; i--)
#define FOR(i,i0,n) for(int (i)=(i0);(i)<(n);(i)++)
#define rn return
typedef std::pair<int,... | a.cc: In function 'int main()':
a.cc:26:5: error: 'memset' was not declared in this scope
26 | memset(ball,0,N); ball[0] = true;
| ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
7 | #include <cmath>
+++ |+#include <cstring... |
s651421693 | p04034 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#include<queue>
#define ll long long
#define itn int
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) ... | a.cc: In function 'int main()':
a.cc:38:14: error: expected ';' before 'if'
38 | cin>>x>>y
| ^
| ;
39 | if(red[x]){
| ~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.