submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s825248778 | p00595 | Java | import java.io.*;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String str1 = scan.next();
String str2 = scan.next();
if(Integer.parseInt(str1)>10000 || Integer.parseInt(str2)>10000)
... | Main.java:13: error: illegal escape character
System.out.println("?????????100000???????????\?????????????????????");
^
Main.java:39: error: reached end of file while parsing
}
^
2 errors
|
s474810024 | p00595 | Java | import java.io.*;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String str1 = scan.next();
String str2 = scan.next();
if(Integer.parseInt(str1)>10000 || Integer.parseInt(str2)>10000)
... | Main.java:13: error: illegal escape character
System.out.println("?????????100000???????????\?????????????????????");
^
Main.java:39: error: reached end of file while parsing
}
^
2 errors
|
s408499823 | p00595 | Java | class Main {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
StringTokenizer st = new StringTokenizer(line, " ");
while(line != "") {
int x = Int... | Main.java:29: error: reached end of file while parsing
}
^
1 error
|
s857927290 | p00595 | Java | public class Main{
public static void main(String[] args) throws IOException{
InputStreamReader inputStreamReader = new InputStreamReader(System.in);
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
StringBuilder stringBuilder = new StringBuilder();
while(true){
String dataSet = buf... | Main.java:3: error: cannot find symbol
public static void main(String[] args) throws IOException{
^
symbol: class IOException
location: class Main
Main.java:4: error: cannot find symbol
InputStreamReader inputStreamReader = new InputStreamReader(System.in);
^
... |
s640318000 | p00595 | Java |
class Main {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
System.out.println(getCubicOf(line));
} catch (Exception e) {
e.printStackTrace();
... | Main.java:5: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:5: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
... |
s833133055 | p00595 | Java | class Main {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
StringTokenizer st = new StringTokenizer(line, " ");
while(st.hasMoreTokens()) {
int... | Main.java:4: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:4: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
... |
s496414355 | p00595 | Java | class Main {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
StringTokenizer st = new StringTokenizer(line, " ");
while(st.hasMoreTokens()) {
int... | Main.java:4: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:4: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
... |
s576785499 | p00595 | Java | import java.io.*;
import java.util.StringTokenizer;
class Main {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(
System.in));// ??\????????????????????????
String line;
int a, b, temp;
int x = 0;
while ((line = br.readLine()) != null) ... | Main.java:28: error: variable a might not have been initialized
System.out.println(a);
^
1 error
|
s806781490 | p00595 | Java | import java.util.*;
import java.math.*;
public class GCD {
static Scanner sc = new Scanner(System.in);
static BigInteger a,b;
public static void main(String[] args) {
while(read()){
solve();
}
}
static boolean read(){
... | Main.java:3: error: class GCD is public, should be declared in a file named GCD.java
public class GCD {
^
1 error
|
s514603332 | p00595 | Java | import java.util.Scanner;
public class Main {
public static int gcd(int a, int b){
int r;
if(b > a){
int t = a;
a = b;
b = t;
}
while((r = a % b) != 0){
a = b;
b = r;
}
return b;
}
public static void main(String[] args) {a
Scanner sc = new Scanner(System.in);
while(sc.ha... | Main.java:23: error: ';' expected
Scanner sc = new Scanner(System.in);
^
1 error
|
s810315296 | p00595 | C | #include <cstdio>
#include <algorithm>
using namespace std;
int main()
{
int m,n;
scanf("%d %d", &m, &n);
if(m < n) swap(m,n);
while(n != 0){
int t=n;
n = m%n;
m = t;
}
printf("%d\n", m);
return (0);
} | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s364518306 | p00595 | C | #include <stdio.h>
int gcd(int a, int b)
{
if (b == 0) return 0;
return gcd(b, a % b);
}
int main(void)
{
int a, b;
while (scanf("%d %d", &a, &b) != EOF){
printf("%d\n", gcd(a, b);
}
return 0;
} | main.c: In function 'main':
main.c:14:41: error: expected ')' before ';' token
14 | printf("%d\n", gcd(a, b);
| ~ ^
| )
main.c:14:42: error: expected ';' before '}' token
14 | printf("%d\n", g... |
s781995885 | p00595 | C | include<stdio.h>
int gcd(int a,int b)
{
if(b==0) return a;
else return gcd(b,a%b);
}
int main()
{
int a,b;
while(scanf("%d%d",&a,&b)!=EOF){
printf("%d\n",gcd(a,b));
}
return 0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
main.c: In function 'main':
main.c:13:7: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
13 | while(scanf("%d%d",&a,&b)!=EOF){
| ^~~~~
main.c:1:... |
s025821488 | p00595 | C | include<stdio.h>
int gcd(int a,int b)
{
if(b==0) return a;
else return gcd(b,a%b);
}
int main(void)
{
int a,b;
while(scanf("%d%d",&a,&b)!=EOF){
printf("%d\n",gcd(a,b));
}
return 0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
main.c: In function 'main':
main.c:14:7: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
14 | while(scanf("%d%d",&a,&b)!=EOF){
| ^~~~~
main.c:1:... |
s319985241 | p00595 | C |
}#include<stdio.h>
int main()
{
int a,b,c;
while(scanf("%d %d",&a,&b)!=EOF)
{
while(c=a%b)
{
a=b;
b=c;
}
printf("%d\n",b);
}
return 0;
} | main.c:2:1: error: expected identifier or '(' before '}' token
2 | }#include<stdio.h>
| ^
main.c:2:2: error: stray '#' in program
2 | }#include<stdio.h>
| ^
main.c:2:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
2 | }#include<stdio.h>
| ^
|
s106875788 | p00595 | C |
}#include<stdio.h>
int main()
{
int a,b,c;
while(scanf("%d %d",&a,&b)!=EOF)
{
while(c=a%b)
{
b=c;
}
printf("%d\n",b);
}
return 0;
} | main.c:2:1: error: expected identifier or '(' before '}' token
2 | }#include<stdio.h>
| ^
main.c:2:2: error: stray '#' in program
2 | }#include<stdio.h>
| ^
main.c:2:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
2 | }#include<stdio.h>
| ^
|
s889349801 | p00595 | C | #include<iostream>
using namespace std;
int gcd(int x, int y) {
if (y == 0) return x;
else return gcd(y, x % y);
}
int main(){
int a, b;
while( scanf("%d %d", &a, &b) != EOF ){
cout<<gcd(a,b)<<endl;
}
return 0;
} | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s802895017 | p00595 | C | #include <stdio.h>
long gcd_euclid(long m, long n)
{
long tmp;
while (n) {
temp = m % n; m = n; n = tmp;
} return m;
} int main(){
long a, b;
long tmp;
long gcd;
while(scanf("%ld %ld", &a, &b)!=EOF){
gcd = gcd_euclid(a, b);
temp = a / gcd;
... | main.c: In function 'gcd_euclid':
main.c:6:9: error: 'temp' undeclared (first use in this function); did you mean 'tmp'?
6 | temp = m % n; m = n; n = tmp;
| ^~~~
| tmp
main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
main.c: In fu... |
s431466380 | p00595 | C | using namespace std;
int main(void){
int a,b,tmp;
while(cin>>a>>b){
if(a<b) swap(a,b);
while(1){
if(a%b==0) break;
tmp = a%b;
a = b;
b = tmp;
}
cout<<b<<endl;
}
return 0;
} | main.c:1:1: error: unknown type name 'using'
1 | using namespace std;
| ^~~~~
main.c:1:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
1 | using namespace std;
| ^~~
main.c: In function 'main':
main.c:6:9: error: 'cin' undeclared (first use in this function)
... |
s790055238 | p00595 | C | include<stdio.h>
int main(){
int x,y,c,h;
while(scanf("%d%d",&x,&y)!=EOF)
{
while(y!=0)
{
x=x%y;
h=x;
x=y;
y=h;
}
printf("%d\n",x);
}
return 0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s712352273 | p00595 | C | include<stdio.h>
int main(){
int x,y,c,h;
while(scanf("%d%d",&x,&y)!=EOF)
{
while(y!=0)
{
x=x%y;
h=x;
x=y;
y=h;
}
printf("%d\n",x);
}
return 0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s819613063 | p00595 | C | main(a,b){while(~scanf("%d%d",&a,&b))printf("%d\n",__gcd(a,b));} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(a,b){while(~scanf("%d%d",&a,&b))printf("%d\n",__gcd(a,b));}
| ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1... |
s342366415 | p00595 | C | //import java.io.*;
import java.util.*;
//import java.math.*;
public class Main {
public static void main(String[] args) throws java.io.IOException{
Scanner scan = new Scanner(System.in);
while(scan.hasNext()){
System.out.println(gcd(scan.nextInt(),scan.nextInt()));
}
}
pu... | main.c:2:1: error: unknown type name 'import'
2 | import java.util.*;
| ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
2 | import java.util.*;
| ^
main.c:4:1: error: unknown type name 'public'
4 | public class Main {
| ^~~~~~
main.c:... |
s528414142 | p00595 | C | #include<stdio.h>
main(){
int n,m,i,r;
while(scanf("%d %d",&n,&m)!=EOF){
if(m<n){
i=n;n=m;m=i;
}
while(1){
if(n==0){
printf("%d\n",m);
break;
}
r=n;
n=m%n;
m=r;
}
}
return 0;
}
}
return 0;
} | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(){
| ^~~~
main.c:21:1: error: expected identifier or '(' before '}' token
21 | }
| ^
main.c:22:3: error: expected identifier or '(' before 'return'
22 | return 0;
| ^~~~~~
main.c:23:1: error: expected identifier o... |
s789087635 | p00595 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main(void){
int a,b;
whilecin>>a>>b)
cout<<__gcd(a,b)<<endl;
} | a.cc: In function 'int main()':
a.cc:7:9: error: 'whilecin' was not declared in this scope
7 | whilecin>>a>>b)
| ^~~~~~~~
|
s213290628 | p00595 | C++ | #include <iostream>
int main(){
int x,y;
cin >> x >> y;
while(x != y){
if(x > y)x = x - y;
if(y > x)y = y - x;
}
cout << x;
} | a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin >> x >> y;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to stan... |
s853372903 | p00595 | C++ | #include <stdio.h>
int main(){
int x,y;
int byakko(int x, inty){
x > y ? return x % y : return y % x;
}
while(scanf("%d %d", &x, &y)){
cout << byakko(x, y) << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:19: error: 'inty' has not been declared
6 | int byakko(int x, inty){
| ^~~~
a.cc:6:24: error: a function-definition is not allowed here before '{' token
6 | int byakko(int x, inty){
| ^
a.cc:11:1: error: 'cout' was not d... |
s722464521 | p00595 | C++ | #include <stdio.h>
int main(){
int x,y;
int byakko(int x, inty){
if(x > y)
return x % y;
else
return y % x;
return x;
}
while(scanf("%d %d", &x, &y)){
cout << byakko(x, y) << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:19: error: 'inty' has not been declared
6 | int byakko(int x, inty){
| ^~~~
a.cc:6:24: error: a function-definition is not allowed here before '{' token
6 | int byakko(int x, inty){
| ^
a.cc:16:1: error: 'cout' was not d... |
s441001606 | p00595 | C++ | #include <stdio.h>
int main(){
int x,y;
while(cin >> x >> y){
while(x % y != 0){
if(x > y)
x = x % y;
}
cout << x << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:7: error: 'cin' was not declared in this scope
6 | while(cin >> x >> y){
| ^~~
a.cc:12:1: error: 'cout' was not declared in this scope
12 | cout << x << endl;
| ^~~~
a.cc:12:14: error: 'endl' was not declared in this scope
12 | cout << x << endl;
... |
s048591818 | p00595 | C++ | #include<bits/stdc++.h>
main(a,b){while(~scanf("%d%d",&a,&b)){printf("%d\n",std::__gcd(a,b));}} | a.cc:2:5: error: expected constructor, destructor, or type conversion before '(' token
2 | main(a,b){while(~scanf("%d%d",&a,&b)){printf("%d\n",std::__gcd(a,b));}}
| ^
|
s485039929 | p00595 | C++ | #include<algorithm>
int a,b;main(){while(~scanf("%d%d",&a,&b);printf("%d\n",std::__gcd(a,b)));}} | a.cc:2:9: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | int a,b;main(){while(~scanf("%d%d",&a,&b);printf("%d\n",std::__gcd(a,b)));}}
| ^~~~
a.cc: In function 'int main()':
a.cc:2:23: error: 'scanf' was not declared in this scope
2 | int a,b;main(){while(~scanf("%d... |
s458131636 | p00595 | C++ | #include "bits/stdc++"
using namespace std;
int main()
{
int a, b;
while (cin >> a >> b){
cout << max(a, b) - min(a, b) < endl;
} | a.cc:1:10: fatal error: bits/stdc++: No such file or directory
1 | #include "bits/stdc++"
| ^~~~~~~~~~~~~
compilation terminated.
|
s491313520 | p00595 | C++ | #include "bits/stdc++.h"
using namespace std;
int main()
{
int a, b;
while (cin >> a >> b){
cout << max(a, b) - min(a, b) < endl;
} | a.cc: In function 'int main()':
a.cc:8:31: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
8 | cout << max(a, b) - min(a, b) < endl;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/regex:68,
... |
s029541723 | p00595 | C++ | #include "bits/stdc++.h"
using namespace std;
int main()
{
int a, b;
while (cin >> a >> b){
cout << max(a, b) - min(a, b) < endl;
}
} | a.cc: In function 'int main()':
a.cc:8:31: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
8 | cout << max(a, b) - min(a, b) < endl;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/regex:68,
... |
s545027328 | p00595 | C++ | #include <iostream>
#include<math.h>
#include<iomanip>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;
int main()
{
int a=0;b=0;
while(cin >> a >> b){
int c=0;
if(a<b){
swap(a,b);
}
while(b>0){
c = a%b;
a=b;
b=c;
}
cout << ... | a.cc: In function 'int main()':
a.cc:11:13: error: 'b' was not declared in this scope
11 | int a=0;b=0;
| ^
|
s921513251 | p00595 | C++ | #include<iostream>
using namespace std;
int euclid(int n, int m);
int main(){
int n,m;
while(cin>>n>>m){
cout <<euclid(n,m<<endl;
}
}
int euclid(int n,int m){
if(n<m){
int temp;
temp=m;
m=n;
n=temp;
}
if(n%m==0){
return m;
}else{
return euclid(m,n%m);
}
}
| a.cc: In function 'int main()':
a.cc:9:22: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
9 | cout <<euclid(n,m<<endl;
| ~^~~~~~
|
s923889976 | p00595 | C++ | #include <stdio.h>
int gcd(int a,int b){
if(b==0)return a;
return gcd(b,a%b);
}
int main(){
int a,b;
while(scanf("%d%d",&a,&b)!=EOF){
printf("%d\n",gcd(a,b);
} | a.cc: In function 'int main()':
a.cc:9:23: error: expected ')' before ';' token
9 | printf("%d\n",gcd(a,b);
| ~ ^
| )
a.cc:10:2: error: expected '}' at end of input
10 | }
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s661513294 | p00595 | C++ | #include <stdio.h>
int gcd(int a,int b){
if(b==0)return a;
return gcd(b,a%b);
}
int main(){
int a,b;
while(scanf("%d%d",&a,&b)!=EOF){
printf("%d\n",gcd(a,b);
}
} | a.cc: In function 'int main()':
a.cc:9:23: error: expected ')' before ';' token
9 | printf("%d\n",gcd(a,b);
| ~ ^
| )
|
s195617619 | p00595 | C++ | ?????? | a.cc:1:1: error: expected unqualified-id before '?' token
1 | ??????
| ^
|
s536359605 | p00595 | C++ | package com.practice.takuya._1009;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
System.out.println(getGreates... | a.cc:1:1: error: 'package' does not name a type
1 | package com.practice.takuya._1009;
| ^~~~~~~
a.cc:3:1: error: 'import' does not name a type
3 | import java.io.BufferedReader;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type... |
s494392064 | p00595 | C++ | int gcd(a,b){return b?gcd(b,a%b):a;}
main(a,b){while(~scanf("%d%d",&a,&b))printf("%d\n",gcd(a,b));} | a.cc:1:9: error: 'a' was not declared in this scope
1 | int gcd(a,b){return b?gcd(b,a%b):a;}
| ^
a.cc:1:11: error: 'b' was not declared in this scope
1 | int gcd(a,b){return b?gcd(b,a%b):a;}
| ^
a.cc:1:12: error: expression list treated as compound expression in initializer [-fperm... |
s693219705 | p00595 | C++ | #include <iostream>
using namespace std;
int main(int argc, char **argv)
{
int *a, *b, s, t, c;
int p, q;
a = &p;
b = &q;
while(cin >> p >> q){
s = *a;
t = *b;
c = 1;
for(int tmp = (*a > *b)? *b : *a, i = 2; i <= tmp; i++){
while(s%i == 0 && t%i == 0){
s /= i;
t /= i;
tmp /= i;
c *= i;... | a.cc: In function 'int main(int, char**)':
a.cc:25:2: error: expected '}' at end of input
25 | }
| ^
a.cc:6:1: note: to match this '{'
6 | {
| ^
|
s957247757 | p00595 | C++ | #include <cstdio>
int solve(int a, int b) {
if (a%b==0) return a;
return solve(b,a%b);
}
int main() {
int a,b;
while(scanf("%d %d",&a,&b)!=EOF) int res=solve(a,b); printf("%d\n",res);
} | a.cc: In function 'int main()':
a.cc:8:76: error: 'res' was not declared in this scope
8 | while(scanf("%d %d",&a,&b)!=EOF) int res=solve(a,b); printf("%d\n",res);
| ^~~
|
s204320992 | p00595 | C++ | main(a,b){while(~scanf("%d%d",&a,&b))printf("%d\n",__gcd(a,b));} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(a,b){while(~scanf("%d%d",&a,&b))printf("%d\n",__gcd(a,b));}
| ^
|
s792040613 | p00595 | C++ | #include <iostream>
ing main()
{
long int a, b, i, maks;
cin >> a >> b;
if (a > b) maks = a;
else maks = b;
for (i=2;i<=maks;i++)
if (maks % a == 0 && maks % b == 0)
{
cout << i << endl;
break;
}
return 0;
} | a.cc:2:1: error: 'ing' does not name a type; did you mean 'int'?
2 | ing main()
| ^~~
| int
|
s063549544 | p00595 | C++ | #include <iostream>
using namespace std;
ing main()
{
long int a, b, i, maks;
cin >> a >> b;
if (a > b) maks = a;
else maks = b;
for (i=2;i<=maks;i++)
if (maks % a == 0 && maks % b == 0)
{
cout << i << endl;
break;
}
return 0;
} | a.cc:3:1: error: 'ing' does not name a type; did you mean 'int'?
3 | ing main()
| ^~~
| int
|
s500396141 | p00595 | C++ | #include<iostream>
#include<stdio.h>
#include<cmath>
#define INF 9999999
using namespace std;
int a,b,c;
int main(){
while(cin>>a>>b){
while(b!=0){
c=a%b;
a=b;
b=c;
}
cout<<a<<endl;
}
return 0 | a.cc: In function 'int main()':
a.cc:16:17: error: expected ';' at end of input
16 | return 0
| ^
| ;
a.cc:16:17: error: expected '}' at end of input
a.cc:7:11: note: to match this '{'
7 | int main(){
| ^
|
s914884598 | p00595 | C++ | #include <iostream>
#include <vector>
using namespace std;
int get(int, int);
int main(int argc, char *argv[]) {
int x, y;
while (cin >> x >> y)
cout << getLCM(x, y) << endl;
return 0;
}
int get(int x, int y) {
int tmp;
if (x < y) {
tmp = y;
y = x;
x = tmp;
}
while (x % y != 0) {
... | a.cc: In function 'int main(int, char**)':
a.cc:12:13: error: 'getLCM' was not declared in this scope
12 | cout << getLCM(x, y) << endl;
| ^~~~~~
|
s829991592 | p00595 | C++ | int gcd( int m, int n )
{
// 引数に0がある場合は0を返す
if ( ( 0 == m ) || ( 0 == n ) )
return 0;
// ユークリッドの方法
while( m != n )
{
if ( m > n ) m = m - n;
else n = n - m;
}
return m;
}
int main(int argc, const char * argv[])
{
//std::cout << "Hello World\n";
while(true){
int n, m;
std:... | a.cc: In function 'int main(int, const char**)':
a.cc:21:14: error: 'cin' is not a member of 'std'
21 | std::cin >> n >> m;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | int g... |
s546233380 | p00595 | C++ | int gcd( int m, int n )
{
// 引数に0がある場合は0を返す
if ( ( 0 == m ) || ( 0 == n ) )
return 0;
// ユークリッドの方法
while( m != n )
{
if ( m > n ) m = m - n;
else n = n - m;
}
return m;
}//gcd
int main(int argc, const char * argv[])
{
int n;
while(cin >> n){
//std::cout << n << "," << m << "\n";
... | a.cc: In function 'int main(int, const char**)':
a.cc:19:11: error: 'cin' was not declared in this scope
19 | while(cin >> n){
| ^~~
|
s318065204 | p00595 | C++ | int gcd( int m, int n ){
// 引数に0がある場合は0を返す
if ( ( 0 == m ) || ( 0 == n ) )
return 0;
// ユークリッドの方法
while( m != n )
{
if ( m > n ) m = m - n;
else n = n - m;
}
return m;
};
int main(int argc, const char * argv[])
{
int n, m;
while(cin >> n >> m){
//std::cout << n << "," << m << "\n... | a.cc: In function 'int main(int, const char**)':
a.cc:18:11: error: 'cin' was not declared in this scope
18 | while(cin >> n >> m){
| ^~~
a.cc:20:9: error: 'cout' was not declared in this scope
20 | cout << gcd(m, n);
| ^~~~
|
s685191640 | p00595 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
while(cin>>a>>b){
if(a<b)swap(a,b);
while(b){
a=a%b;
swap(a,b);
}
cout<<a<<endl;
} | a.cc: In function 'int main()':
a.cc:12:2: error: expected '}' at end of input
12 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s238266606 | p00595 | C++ | #include <cstdlib>
#include <iostream>
using namespace std;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
for(int a, b; cin >> a >> b;) {
cout << __gcd(a, b) << endl;
}
return EXIT_SUCCESS;
} | a.cc: In function 'int main()':
a.cc:10:25: error: '__gcd' was not declared in this scope
10 | cout << __gcd(a, b) << endl;
| ^~~~~
|
s629208132 | p00596 | C | #include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
using namespace std;
#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s587181432 | p00596 | C | #include <iostream>
#include <string>
using namespace std;
int main()
{
int n;
while (cin >> n)
{
int a[7] = {0};
string s;
for (int i=0; i<n; i++)
{
cin >> s;
a[s[0]-'0']++;
a[s[1]-'0']++;
}
int odd=0;
for (int i=0; i<7; i++)
if (a[i]%2)
odd++;
cout << ((odd==0||odd==2) ? "Yes" : ... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s591369777 | p00596 | C++ | #include <stdio.h>
#include <cmath>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std... | a.cc: In function 'int main()':
a.cc:99:57: warning: pointer to a function used in arithmetic [-Wpointer-arith]
99 | if(boss[i] == get_boss[i])num_boss++;
| ^
a.cc:99:44: error: ISO C++ forbids comparison between pointer an... |
s329411303 | p00596 | C++ | #include <stdio.h>
#include <cmath>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std... | a.cc: In function 'int main()':
a.cc:90:65: warning: pointer to a function used in arithmetic [-Wpointer-arith]
90 | if(array[i] > 0 && boss[i] == get_boss[i])num_boss++;
| ^
a.cc:90:52: error: ISO C++ forbids comparison be... |
s175858064 | p00597 | C++ | include<iostream>
using namespace std;
int main(void){
while(true){
int n;
cin>>n;
if(cin.eof())
break;
cout << (1 << (n-1)) << endl;
}
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
6 | cin>>n;
| ^~~
a.cc:9:5: error: 'cout' was not declared in this scope
9 | cout << (1 << (n-1)) << endl;
| ... |
s235906203 | p00597 | C++ | /*
AizuOnline A1011
Title
*/
#include <stdio.h>
// Select Below
//#include <stdlib.h>
//#include <string.h>
//#include <float.h>
//#include <math.h>
//#include <limits.h>
//Global data section
//
int N;
int expt3(int n)
{
if(n==0)
return(1);
else
return(3 * expt3(n-1));
}
int calc_carbon(int n)
{
int i,... | a.cc:34:1: error: ISO C++ forbids declaration of 'calcc' with no type [-fpermissive]
34 | calcc(int n)
| ^~~~~
a.cc:57:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
57 | main()
| ^~~~
|
s477025277 | p00598 | Java | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
try {
String line;
while(true){
/* input from here */
if((line = r.readLine())==null){
break;
}
HashMap<Stri... | Main.java:65: error: non-static variable this cannot be referenced from a static context
Expression e = new Expression(exp);
^
Main.java:86: error: non-static variable this cannot be referenced from a static context
e = new Expression(op, parse(left), parse(right));
^
Main.java:96: erro... |
s770527678 | p00598 | Java | import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
public class Main {
public static void main(String[] args) {
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
try {
String line;
while ((line = r.readLine()) != null) {
HashMap<S... | Main.java:29: error: cannot find symbol
Arrays.sort(e);
^
symbol: variable Arrays
location: class Main
Main.java:34: error: cannot find symbol
Arrays.sort(setU);
^
symbol: variable Arrays
location: class Main
Main.java:47: error: cannot find symbol
Arrays.sort(res);
^
symbol: ... |
s583357859 | p00598 | Java | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
try {
String line;
return;
while ((line = r.readLine()) != null) {
HashMap<String, Integer[]> sets = new HashMap<String, Integer[... | Main.java:10: error: unreachable statement
while ((line = r.readLine()) != null) {
^
1 error
|
s346786921 | p00598 | C++ | #include <iostream>
#include <string>
#include <set>
#include <cstring>
#include <climits>
#include <algorithm>
#include <map>
using namespace std;
typedef map<char, set<int> > mapset;
set<int> atom(string&, mapset&, int&);
set<int> block(string&, mapset&, int&);
set<int> unite(set<int>&, set<int>&);
set<int> inters... | a.cc: In function 'std::set<int> block(std::string&, mapset&, int&)':
a.cc:29:35: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
29 | return parse(expr, sets, k++);
| ~^~
a.cc:19:34: note: initializing argument 3 of 'std::set<i... |
s601899986 | p00598 | C++ | #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <set>
#include <vector>
#include <iterator>
using namespace std;
typedef map<char, set<int> > M;
vector<int> conv_vec(set<int> st) {
vector<int> vec;
for(set<int>::iterator it = st.begin(); it != st.end(); ++it) {
vec.pus... | a.cc: In function 'std::set<int> calc(std::set<int>, std::set<int>, char)':
a.cc:52:9: error: 'set_union' was not declared in this scope
52 | set_union(begin(A), end(A), begin(B), end(B), inserter(result, end(result)));
| ^~~~~~~~~
a.cc:54:9: error: 'set_intersection' was not declared in this s... |
s638902532 | p00598 | C++ | #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <set>
#include <vector>
#include <iterator>
using namespace std;
typedef map<char, set<int> > M;
vector<int> conv_vec(set<int> st) {
vector<int> vec;
for(set<int>::iterator it = st.begin(); it != st.end(); ++it) {
vec.pus... | a.cc: In function 'std::set<int> calc(std::set<int>, std::set<int>, char)':
a.cc:52:9: error: 'set_union' was not declared in this scope
52 | set_union(begin(A), end(A), begin(B), end(B), inserter(result, end(result)));
| ^~~~~~~~~
a.cc:54:9: error: 'set_intersection' was not declared in this s... |
s152075023 | p00598 | C++ | #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <set>
#include <vector>
#include <iterator>
using namespace std;
using std::begin;
using std::end;
typedef map<char, set<int> > M;
vector<int> conv_vec(set<int> st) {
vector<int> vec;
for(set<int>::iterator it = st.begin(); it !=... | a.cc: In function 'std::set<int> calc(std::set<int>, std::set<int>, char)':
a.cc:54:14: error: 'set_union' is not a member of 'std'; did you mean 'is_union'?
54 | std::set_union(begin(A), end(A), begin(B), end(B), inserter(result, end(result)));
| ^~~~~~~~~
| is_union
a.... |
s460737144 | p00598 | C++ | #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <set>
#include <vector>
#include <iterator>
using namespace std;
using std::begin;
using std::end;
typedef map<char, set<int> > M;
vector<int> conv_vec(set<int> st) {
vector<int> vec;
for(set<int>::iterator it = st.begin(); it !=... | a.cc: In function 'std::set<int> calc(std::set<int>, std::set<int>, char)':
a.cc:54:14: error: 'set_union' is not a member of 'std'; did you mean 'is_union'?
54 | std::set_union(begin(A), end(A), begin(B), end(B), inserter(result, end(result)));
| ^~~~~~~~~
| is_union
a.... |
s726872738 | p00598 | C++ | #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <set>
#include <vector>
#include <iterator>
using namespace std;
typedef map<char, set<int> > M;
vector<int> conv_vec(set<int> st) {
vector<int> vec;
for(set<int>::iterator it = st.begin(); it != st.end(); ++it) {
vec.pus... | a.cc: In function 'std::set<int> calc(std::set<int>, std::set<int>, char)':
a.cc:52:9: error: 'set_union' was not declared in this scope
52 | set_union(begin(A), end(A), begin(B), end(B), inserter(result, end(result)));
| ^~~~~~~~~
a.cc:54:9: error: 'set_intersection' was not declared in this s... |
s097219785 | p00598 | C++ | #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <set>
#include <vector>
#include <iterator>
#include <algorithm>
using namespace std;
typedef map<char, set<int> > M;
vector<int> conv_vec(set<int> st) {
vector<int> vec;
for(set<int>::iterator it = st.begin(); it != st.end(); ++... | In file included from /usr/include/c++/14/algorithm:61,
from a.cc:8:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = _Rb_tree_const_iterator<int>; _Compare = __gnu_cxx::__ops::_Iter_less_ite... |
s054086089 | p00598 | C++ | #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <set>
#include <vector>
#include <iterator>
#include <algorithm>
using namespace std;
typedef map<char, set<int> > M;
vector<int> conv_vec(set<int> st) {
vector<int> vec;
for(set<int>::iterator it = st.begin(); it != st.end(); ++... | In file included from /usr/include/c++/14/algorithm:61,
from a.cc:8:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = _Rb_tree_const_iterator<int>; _Compare = __gnu_cxx::__ops::_Iter_less_ite... |
s048990535 | p00598 | C++ | #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <set>
#include <vector>
#include <iterator>
#include <algorithm>
using namespace std;
typedef map<char, set<int> > M;
vector<int> conv_vec(set<int> st) {
vector<int> vec;
for(set<int>::iterator it = st.begin(); it != st.end(); ++... | In file included from /usr/include/c++/14/algorithm:61,
from a.cc:8:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = _Rb_tree_const_iterator<int>; _Compare = __gnu_cxx::__ops::_Iter_less_ite... |
s830159535 | p00598 | C++ | #include<bits/stdc++.h>
using namespace std;
#define r(i,n) for(int i=0;i<n;i++)
int x,p,n;
char c;
string S;
set<int>st[6],uni;
set<int>bnf();
set<int>::iterator it;
void Prin(set<int> ans){
if(!ans.size())cout<<"NULL"<<endl;
else for(it=ans.begin();it!=ans.end();it++){
if(it!=ans.begin())cout<<' ';
cout<<... | a.cc:70:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
70 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:83:29: error: expected identifier before '.' token
83 | set<int>ans=bnf();if(and.size()==0)exit(0);
| ^
a.cc:83:29: error: exp... |
s395018302 | p00598 | C++ | #include<bits/stdc++.h>
using namespace std;
#define r(i,n) for(int i=0;i<n;i++)
int x,p,n;
char c;
string S;
set<int>st[6],uni;
set<int>bnf();
set<int>::iterator it;
void Prin(set<int> ans){
//if(!ans.size())cout<<"NULL"<<endl;
for(it=ans.begin();it!=ans.end();it++){
if(it!=ans.begin())cout<<' ';
cout<<*it... | a.cc: In function 'std::set<int> ge()':
a.cc:57:15: error: expected ')' before ']' token
57 | s=C(uni,uni]);
| ~ ^
| )
a.cc: At global scope:
a.cc:74:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
74 | main(){
| ^~~~
|
s739893916 | p00598 | C++ | #include <bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<map>
#include<cstring>
... | a.cc: In function 'std::vector<long long int> han()':
a.cc:220:23: error: 'ka' was not declared in this scope; did you mean 'pa'?
220 | vector<int> e=ka();
| ^~
| pa
|
s535377744 | p00598 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <iterator>
#include <string>
#include <set>
#include <map>
using namespace std;
#define State string::const_iterator
class ParseError {};
vector<int> U;//mapを使った方が楽。
map<char, vector<int>> sets;
vector<int> expression(State &begin);
vector<int> com... | a.cc: In function 'std::vector<int> _set(std::__cxx11::basic_string<char>::const_iterator&)':
a.cc:91:15: error: 'A' was not declared in this scope
91 | ret = A;
| ^
a.cc:95:15: error: 'B' was not declared in this scope
95 | ret = B;
| ^
a.cc:99:15: error: '... |
s246349873 | p00598 | C++ | #include <iostream>
#include <string>
#include <set>
#include <map>
#define rep(i,n) for(int i=0;i<n;++i)
using namespace std;
typedef set<int> iset;
string src;
int p;
iset set_u;
map<char, iset> sets;
iset parse_expr(); // proto
bool end() { return p >= (int)src.length(); }
char peek() { return src[p]; }
void... | a.cc: In function 'int main()':
a.cc:160:56: error: cannot bind non-const lvalue reference of type 'std::set<int>::const_iterator&' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator&'} to an rvalue of type 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std... |
s302043450 | p00599 | C++ | #include <iostream>
#include <list>
#include <math.h>
#define REP(i, n) for(int (i) = 0; (i) < (n); (i)++)
#define EQF(a, b) (fabs((a) - (b)) < EPS)
const double EPS = 0.1;
class Vector {
double x, y;
int angle;
public:
Vector() : x(0.0), y(0.0) {}
Vector(double x, double y) : x(x), y(y) {}
explicit Vector(std:... | a.cc: In function 'int solve_recursive()':
a.cc:79:33: error: 'simp_count' was not declared in this scope
79 | simp_count++;
| ^~~~~~~~~~
|
s241831491 | p00599 | C++ | #include<complex>
#include<set>
#include<vector>
#include<iostream>
#include<fstream>
#include<stack>
#include<cmath>
#define SHAPE_A 1
#define SHAPE_B 2
#define FRONT 0x01
#define RIGHT 0x02
#define BACK 0x04
#define LEFT 0x08
#define OVER 0x10
#define sc second
#define fr first
#define REP(i,n) for(int i = 0; i <... | a.cc: In function 'void incIt(std::vector<std::complex<double> >::iterator&, std::vector<std::complex<double> >&, int)':
a.cc:276:3: error: 'assert' was not declared in this scope
276 | assert(v.size()>1);
| ^~~~~~
a.cc:8:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding... |
s576275933 | p00599 | C++ | int main(){ cout << chinso << endl; } | a.cc: In function 'int main()':
a.cc:1:13: error: 'cout' was not declared in this scope
1 | int main(){ cout << chinso << endl; }
| ^~~~
a.cc:1:21: error: 'chinso' was not declared in this scope
1 | int main(){ cout << chinso << endl; }
| ^~~~~~
a.cc:1:31: error: 'end... |
s727354024 | p00599 | C++ | int main(){ cout << chinso << endl; } | a.cc: In function 'int main()':
a.cc:1:13: error: 'cout' was not declared in this scope
1 | int main(){ cout << chinso << endl; }
| ^~~~
a.cc:1:21: error: 'chinso' was not declared in this scope
1 | int main(){ cout << chinso << endl; }
| ^~~~~~
a.cc:1:31: error: 'end... |
s598798350 | p00599 | C++ | chinso | a.cc:1:1: error: 'chinso' does not name a type
1 | chinso
| ^~~~~~
|
s119307045 | p00599 | C++ | chinsososo | a.cc:1:1: error: 'chinsososo' does not name a type
1 | chinsososo
| ^~~~~~~~~~
|
s786090887 | p00599 | C++ | chinsaw | a.cc:1:1: error: 'chinsaw' does not name a type
1 | chinsaw
| ^~~~~~~
|
s342590177 | p00601 | Java | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
public class Main{
Scanner sc=new Scanner(System.in);
int INF=1<<28;
double EPS=1e-12;
int n, m;
long[] g;
int ans;
void run()... | Main.java:40: error: cannot find symbol
ans=n-ans+isolated;
^
symbol: variable isolated
location: class Main
1 error
|
s115626249 | p00601 | Java | import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] arg) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String is;
String[] ia;
while(true){
... | Main.java:77: error: illegal character: '\uff5d'
?
^
Main.java:77: error: reached end of file while parsing
?
^
2 errors
|
s954332620 | p00601 | C++ | #include <iostream>
#include <limits.h>
#include <queue>
#include <algorithm>
#include <map>
#include <cstring>
#define dprintf(s,...) printf("%s:%d" s,__func__,__LINE__,__VA_ARGS__)
using namespace std;
typedef pair<int,int> P;
typedef long long int ll;
struct Edge{
int to;
};
vector<Edge> G[30];
int x,y;
bool ch... | a.cc: In function 'int main()':
a.cc:64:3: error: 'sync_with_stdio' was not declared in this scope
64 | sync_with_stdio(false);
| ^~~~~~~~~~~~~~~
|
s704780900 | p00601 | C++ | bool g[100][100];
while(scanf("%d%d",&n,&m) !=EOF , n||m){
if(10<n)assert(1);
for(int i=0;i<n;i++)
for(int j=0;j<n;j++)g[i][j] = 0;
for(int i=0;i<m;i++){
scanf("%d%d",&f,&t);
g[f][t] = g[t][f] = 1;
}
}
} | a.cc:3:3: error: expected unqualified-id before 'while'
3 | while(scanf("%d%d",&n,&m) !=EOF , n||m){
| ^~~~~
a.cc:12:1: error: expected declaration before '}' token
12 | }
| ^
|
s178280516 | p00601 | C++ | #include<cstdio>
#include<cassert>
#include<vector>
using namespace std;
int main(){
int n,m,f,t;
bool g[100][100];
while(scanf("%d%d",&n,&m) !=EOF , n||m){
assert(20=>n);
/*
for(int i=0;i<n;i++)
for(int j=0;j<n;j++)g[i][j] = 0;
*/
for(int i=0;i<m;i++){
scanf("%d%d",&f,&t);
... | In file included from /usr/include/c++/14/cassert:44,
from a.cc:2:
a.cc: In function 'int main()':
a.cc:11:15: error: expected primary-expression before '>' token
11 | assert(20=>n);
| ^
|
s417006527 | p00601 | C++ | clude<cstdio>
#include<cassert>
#include<vector>
using namespace std;
int main(){
int n,m,f,t;
bool g[100][100];
while(scanf("%d%d",&n,&m) !=EOF , n||m){
assert(30>n);
for(int i=0;i<n;i++)
for(int j=0;j<n;j++)g[i][j] = 0;
for(int i=0;i<m;i++){
scanf("%d%d",&f,&t);
assert(f<n && t<n... | a.cc:1:1: error: 'clude' does not name a type
1 | clude<cstdio>
| ^~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/vector:62,
from a.cc:3:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__i... |
s721620150 | p00601 | C++ | #include <iostream>
#include <math.h>
#include <algorithm>
#include <string>
using namespace std;
int x, y;
int solve(int edges[x][2], int edgenum, bool flag[x]){
if(edgenum >= y) return 0;
int node1 = edges[edgenum][0];
int node2 = edges[edgenum][1];
int result;
if(flag[node1] || f... | a.cc:9:21: error: size of array 'edges' is not an integral constant-expression
9 | int solve(int edges[x][2], int edgenum, bool flag[x]){
| ^
a.cc:9:51: error: size of array 'flag' is not an integral constant-expression
9 | int solve(int edges[x][2], int edgenum, bool flag[x]){
|... |
s984866600 | p00601 | C++ | #include <iostream>
#include <math.h>
#include <algorithm>
#include <string>
using namespace std;
int x, y;
int solve(int edges[x][2], int edgenum, bool flag[x]){
if(edgenum >= y) return 0;
int node1 = edges[edgenum][0];
int node2 = edges[edgenum][1];
int result;
if(flag[node1] || f... | a.cc:9:21: error: size of array 'edges' is not an integral constant-expression
9 | int solve(int edges[x][2], int edgenum, bool flag[x]){
| ^
a.cc:9:51: error: size of array 'flag' is not an integral constant-expression
9 | int solve(int edges[x][2], int edgenum, bool flag[x]){
|... |
s750223940 | p00601 | C++ | #include <iostream>
#include <math.h>
#include <algorithm>
#include <string>
using namespace std;
int x, y;
int solve(int edges[x][2], int edgenum, bool flag[x]){
if(edgenum >= y) return 0;
int node1 = edges[edgenum][0];
int node2 = edges[edgenum][1];
int result;
if(flag[node1] || f... | a.cc:9:21: error: size of array 'edges' is not an integral constant-expression
9 | int solve(int edges[x][2], int edgenum, bool flag[x]){
| ^
a.cc:9:51: error: size of array 'flag' is not an integral constant-expression
9 | int solve(int edges[x][2], int edgenum, bool flag[x]){
|... |
s703820448 | p00602 | C | #include<stdio.h>
#include<string.h>
#include<math.h>
#define MOD 1001
#define MAX 10001
int getfibo(int);
int root(int);
int find(int,int);
void merge(int,int);
int fibo[MAX];
int p[MAX];
int main(void)
{
fibo[0]=1; fibo[1]=2;
int a,b,i,j;
while(scanf("%d %d",&a,&d)==2)
{
memset(p,-1,sizeof(p));... | main.c: In function 'main':
main.c:21:27: error: 'd' undeclared (first use in this function)
21 | while(scanf("%d %d",&a,&d)==2)
| ^
main.c:21:27: note: each undeclared identifier is reported only once for each function it appears in
main.c:29:18: error: implicit declaration of func... |
s196201110 | p00602 | C | #include<stdio.h>
#include<string.h>
#include<math.h>
#define MOD 1001
#define MAX 10001
int getfibo(int);
int root(int);
int find(int,int);
void merge(int,int);
int fibo[MAX];
int p[MAX];
int main(void)
{
fibo[0]=1; fibo[1]=2;
int a,d,i,j;
while(scanf("%d %d",&a,&d)==2)
{
memset(p,-1,sizeof(p));... | main.c: In function 'main':
main.c:29:18: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
29 | if(abs(getfibo(i)-getfibo(j))<d)
| ^~~
main.c:4:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
3 | #include<math.h>
+++ |+#include... |
s692825052 | p00602 | C | #include<stdio.h>
#include<string.h>
#include<math.h>
#define MOD 1001
#define MAX 10001
int getfibo(int);
int root(int);
int find(int,int);
void merge(int,int);
int fibo[MAX];
int p[MAX];
int main(void)
{
fibo[0]=1; fibo[1]=2;
int a,d,i,j;
while(scanf("%d %d",&a,&d)==2)
{
memset(p,-1,sizeof(p));... | main.c: In function 'main':
main.c:29:18: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
29 | if(abs(getfibo(i)-getfibo(j))<d)
| ^~~
main.c:4:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
3 | #include<math.h>
+++ |+#include... |
s500768188 | p00602 | C | #include <stdio.h>
#define SIZE (150)
#define N (1001)
void swap(int *a, int *b)
{
int tmp;
tmp = *a;
*a = *b;
*b = tmp;
}
void makeHeap(int *dat, int size, int oya)
{
int i; /// ½§ä
int oidx; /// eÌY¦Û¶
int oval; /// eÌlÛ¶
int ko; /// qÌY¦
oidx = oya; // eÌY¦ðÛ¶
oval = ... | main.c: In function 'main':
main.c:65:15: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
65 | while(gets(input)) {
| ^~~~
| fgets
|
s272606165 | p00602 | C | #include <stdio.h>
///#define Windows
///#include "gettime.h"
#define SIZE (1001)
#define N (1001)
///#define SIZE_OF(x, type) (sizeof(x) / sizeof(type))
///#define PRINT_ARRAY(i, ary, size) for(i = 0; i < size; i++){ printf("%d-", *(ary+i)); } printf("\n")
void swap(int *a, int *b)
{
int tmp;
tmp = *a;
*a = *b;
... | main.c: In function 'main':
main.c:76:15: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
76 | while(gets(input)) {
| ^~~~
| fgets
|
s388592259 | p00602 | C | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int fib[1002];
int main(){
fib[0] = 1;
fib[1] = 2;
for(int i=2;i<1002;i++){
fib[i] = (fib[i-1] + fib[i-2]) % 1001;
}
int v,d;
while(cin >> v >> d){
if((v|d) == 0) break;
vector<int> vec;... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s727319675 | p00602 | C | include<stdlib.h>
p(int*a,int*b){return *a - *b;}
c,V,i,f[1001];main(d){for(;~scanf("%d%d",&V,&d);printf("%d\n",c)){
for(f[1]=3,f[0]=i=2;i<V;i++)f[i]=(f[i-1]+f[i-2])%1001;
for(qsort(f,V,4,p),c=1;i;f[i]-f[--i]<d?:c++);}
return 0;} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdlib.h>
| ^
main.c:3:1: warning: data definition has no type or storage class
3 | c,V,i,f[1001];main(d){for(;~scanf("%d%d",&V,&d);printf("%d\n",c)){
| ^
main.c:3:1: error: type defaults to 'int'... |
s587228553 | p00602 | C | #include<stdlib.h>
p(int*a,int*b){return*a-*b;}
int main () {
int f[1001];
int F[1001];
int N,i,V,d,count;
N=1001;
f[0]=2;
f[1]=3;
for(;~scanf("%d%d",&V,&d);){
count = 1;
for(i=2;i<V;i++)F[i]=(F[i-1]+F[i-2])%N;}
for(i=0;i<V;i++)f[i]=F[i];
qsort(F,V,4,p);
for(i=1;i<V;i++)
if(F[i]-F[i-1]>d-1)
count++;
... | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | p(int*a,int*b){return*a-*b;}
| ^
main.c: In function 'main':
main.c:10:7: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
10 | for(;~scanf("%d%d",&V,&d);){
| ^~~~~
main.c:2:1: note: include '... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.