submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s022996246 | p00037 | C++ | #include<iostream>
main(){
cout << "«ã¤èÍz"<<endll;
} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:4:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
4 | cout << "«ã¤èÍz"<<endll;
| ^~~~
| std::cout
In file included fr... |
s667639230 | p00037 | C++ | ツづ卍つーツつ「 | a.cc:1:1: error: extended character 「 is not valid in an identifier
1 | ツづ卍つーツつ「
| ^
a.cc:1:1: error: '\U000030c4\U00003065\U0000534d\U00003064\U000030fc\U000030c4\U00003064\U0000300c' does not name a type
1 | ツづ卍つーツつ「
| ^~~~~~~~~~~~~~~~
|
s191251238 | p00037 | C++ | #include<iostream>
#include<string>
using namespace std;
#define RIGHT 0
#define DOWN 1
#define LEFT 2
#define UP 3
int main(){
bool cross[5][5][4]; // x,y,dir
int px=0, py=0, dir = RIGHT;
int d[4][2] = {{1,0}, {0,1}, {-1,0}, {0,-1}};
string str;
memset( cross, 0, sizeof(cross) );
for( int i=0; i<4; i++ ){
ge... | a.cc: In function 'int main()':
a.cc:15:9: error: 'memset' was not declared in this scope
15 | memset( cross, 0, sizeof(cross) );
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#inclu... |
s630772281 | p00037 | C++ | }
else if(ex[vy][vx-1] == 1) {
vx--;
direction = 3;
cout << "L";
}
}
}
cout << endl;
} | a.cc:1:7: error: expected declaration before '}' token
1 | }
| ^
a.cc:2:7: error: expected unqualified-id before 'else'
2 | else if(ex[vy][vx-1] == 1) {
| ^~~~
a.cc:7:5: error: expected declaration before '}' token
7 | }
| ^
a.cc:8:3: error: expected declara... |
s492552186 | p00037 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
#define rep(i,n) for(int i=0;i<int(n);i++)
void input(bool grid[][9])
{
rep(i,9){
string s;
cin>>s;
if(i%2==0)
rep(j,4)
grid[i][j*2+1]=s[j]-'0';
else
rep(j,5)a
... | a.cc: In function 'void input(bool (*)[9])':
a.cc:17:21: error: 'a' was not declared in this scope
17 | rep(j,5)a
| ^
|
s047129679 | p00037 | C++ | #include <iostream>
#include <string>
using namespace std;
int a[12][12];
int dx[4] = {1,0,-1,0};
int dy[4] = {0,1,0,-1};
char dc[4] = {'R','D','L','U'};
//ツ篠ゥツ閉ェツづ個偲シツ暗債4ツマツスツづ個陛?づ個湘ウツ妥板づーツ陳イツづ猟づゥ
void cheakWall(int* wall , const int& px ,const int& py ,const int& d ){
for(int i=0 ; i<4 ; ++i ){
int ... | a.cc:27:5: error: 'px' does not name a type
27 | px += dx[d]*2;
| ^~
a.cc:28:5: error: 'py' does not name a type
28 | py += dy[d]*2;
| ^~
a.cc:29:11: error: expected constructor, destructor, or type conversion before '(' token
29 | record( s , wall , d );
| ^
a.c... |
s721091446 | p00037 | C++ | #include <iostream>
#include <cstdio>
#define LEFT 0
#define UP 1
#define RIGHT 2
#define DOWN 3
#define MIN(X,Y) ((X<Y)?X:Y)
#define MAX(X,Y) ((X>Y)?X:Y)
bool map[5][5][5][5];
int direction=RIGHT;
int pos[2]={0,0};
char nul[5000];
void read(void)
{
for(int y=0;y<4;y++)
{
for(int x=0;x<4;x++)
map[x][y][x+... | a.cc: In function 'void read()':
a.cc:24:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
24 | gets(nul);
| ^~~~
| getw
a.cc: In function 'void move()':
a.cc:82:9: error: expected primary-expression before '}' token
82 | }wh... |
s552322790 | p00037 | C++ | #include <iostream>
#include <cstdio>
#define LEFT 0
#define UP 1
#define RIGHT 2
#define DOWN 3
#define MIN(X,Y) ((X<Y)?X:Y)
#define MAX(X,Y) ((X>Y)?X:Y)
bool map[5][5][5][5];
int direction=RIGHT;
int pos[2]={0,0};
char nul[5000];
void read(void)
{
for(int y=0;y<4;y++)
{
for(int x=0;x<4;x++)
map[x][y][x+... | a.cc: In function 'void read()':
a.cc:24:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
24 | gets(nul);
| ^~~~
| getw
a.cc: In function 'void move()':
a.cc:82:9: error: expected primary-expression before '}' token
82 | }wh... |
s464878304 | p00038 | Java |
import java.util.*;
public class _0038 {
public static void main(String[] args){
Scanner stdIn = new Scanner(System.in);
while(stdIn.hasNext()){
String str = stdIn.nextLine();
int[] number = new int[5];
int[] count = new int[14];
int j = 0;
for(int i=0;i<str.length();i++){
if('0'<=str.charA... | Main.java:4: error: class _0038 is public, should be declared in a file named _0038.java
public class _0038 {
^
1 error
|
s832162397 | p00038 | Java | import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Main{
Map<Integer, Integer> number_of_cards;
PokerHand(int... cards){
this.number_of_cards = new HashMap<Integer, Integer>();
for(int c = 1; c <= 13; c++) this.number_of_cards.put(c, 0);
for(int i: cards) this.number_of... | Main.java:10: error: invalid method declaration; return type required
PokerHand(int... cards){
^
1 error
|
s049573030 | p00038 | Java | import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNextLine()) {
String[] cards = sc.nextLine().split(",");
// ?????????????????????????... | Main.java:53: error: cannot find symbol
Arrays.sort(cards, new PokerHand().new Compare());
^
symbol: class PokerHand
location: class Main
Main.java:70: error: cannot find symbol
Arrays.sort(cards, new PokerHand().new Compare());
^
symbol: class PokerHand
loc... |
s564438566 | p00038 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class P0038 {
/**
* 0038 Poker Hand
*/
public static void main(String[] args) throws IOException {
// Read All Hand... | Main.java:8: error: class P0038 is public, should be declared in a file named P0038.java
public class P0038 {
^
1 error
|
s200231429 | p00038 | C | #include<stdio.h>
int main(){
int a,b,c,d,e;
int state = 0; //0:null;1:1pair,2:2pair,3:3card,4:hullhouse,5:straight,6:4card
while(scanf("%d,%d,%d,%d.%d",&a,&b,&c,&d,&e)!=EOF){
while(!((a<=b)&&(b<=c)&&(c<=d)&&(d<=e))){
int tmp;
if(a>b){a = tmp; a = b; b = tmp;}
if(b>c){... | main.c: In function 'main':
main.c:62:39: error: lvalue required as left operand of assignment
62 | }else if(a+1==b&&b+1==c&&c+1 =d&&d+1 ==e){
| ^
main.c:80:7: error: 'swicth' undeclared (first use in this function)
80 | swicth case(state){
| ... |
s500308892 | p00038 | C | #include<stdio.h>
int main(){
int a[5],b[13];
while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])!=EOF){
for(int i=0;i<13;i++)b[i]=0;
for(int i=0;i<13;i++) b[a[i]-1]++;
for(int i=0;i<13;i++){
if(b[i]==4);
printf("four card\n");
goto exit;
}
... | main.c: In function 'main':
main.c:22:16: error: unknown type name 'go'
22 | go to exit;
| ^~
main.c:22:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'exit'
22 | go to exit;
| ^~~~
main.c:45:6: error: 'exit' undecla... |
s311794647 | p00038 | C | #include<stdio.h>
int main(){
int a[5],b[13];
while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])!=EOF){
for(int i=0;i<13;i++)b[i]=0;
for(int i=0;i<13;i++) b[a[i]-1]++;
for(int i=0;i<13;i++){
if(b[i]==4){
printf("four card\n");
goto exit;
... | main.c: In function 'main':
main.c:23:16: error: unknown type name 'go'
23 | go to exit;
| ^~
main.c:23:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'exit'
23 | go to exit;
| ^~~~
main.c:46:6: error: 'exit' undecla... |
s741457176 | p00038 | C | #include<stdio.h>
int main(){
int a[5],b[13];
while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])!=EOF){
for(int i=0;i<13;i++)b[i]=0;
for(int i=0;i<13;i++) b[a[i]-1]++;
for(int i=0;i<13;i++){
if(b[i]==4){
printf("four card\n");
goto exit;
... | main.c: In function 'main':
main.c:46:6: error: 'exit' undeclared (first use in this function)
46 | exit;
| ^~~~
main.c:2:1: note: 'exit' is defined in header '<stdlib.h>'; this is probably fixable by adding '#include <stdlib.h>'
1 | #include<stdio.h>
+++ |+#include <stdlib.h>
2 |
main.c:4... |
s889733425 | p00038 | C | #include<stdio.h>
using namespace std;
int main(){
int a[5],b[13];
while(scanf("%d,%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3],&a[4])!=EOF){
for(int i=0;i<13;i++){b[i]=0;}
for(int i=0;i<5;i++){ b[a[i]-1]++;}
for(int i=0;i<13;i++){
if(b[i]==4){
printf("four card\n");
... | main.c:3:1: error: unknown type name 'using'
3 | using namespace std;
| ^~~~~
main.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
3 | using namespace std;
| ^~~
|
s622138424 | p00038 | C | #include<stdio.h>
#define P 5
int main(void)
{
int card[P] = {0, 0, 0, 0, 0};
int i = 0;
int j = 0;
int k = 0;
int m = 0;
int count = 0;
int t = 0;
int c[P] = {0, 0, 0, 0, 0};
while( scanf("%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3]... | main.c: In function 'main':
main.c:77:1: error: expected expression before '/' token
77 | /bin/bash: indent: コマンドが見つかりません
| ^
main.c:95:1: error: expected declaration or statement at end of input
95 | }
| ^
|
s771533501 | p00038 | C | int count = 0;
int t = 0;
int c[P] = {0, 0, 0, 0, 0};
while( scanf("%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4]) != EOF )
{
for(i = 0; i < P ; i++)
{
for(j = 0; j < P ; j++)
{
... | main.c:3:15: error: 'P' undeclared here (not in a function)
3 | int c[P] = {0, 0, 0, 0, 0};
| ^
main.c:5:9: error: expected identifier or '(' before 'while'
5 | while( scanf("%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4]) != EOF )
| ^~~~~
mai... |
s247031443 | p00038 | C | #include <stdio.h>
#include <stdlib.h>
int compare_int(const void *a, const void *b){
return *(int*)a - *(int*)b;
}
int main(int argc,char* argv[]){
int first_card,is_st;
int i;
int max,max2,max3,max4;
int cards[5];
int hands[13];
while(scanf("%d,%d,%d,%d,%d",&cards[0],&cards[1],&cards[2],&cards[3... | main.c: In function 'main':
main.c:30:16: error: 'ma' undeclared (first use in this function); did you mean 'max'?
30 | max2 = ma;
| ^~
| max
main.c:30:16: note: each undeclared identifier is reported only once for each function it appears in
|
s365669698 | p00038 | C | #include <cstdio>
#include <functional>
#include <algorithm>
using namespace std;
/** Application main entry point. */
int main (
int argc,
char * argv[ ]
)
{
int d[ 5 ];
int i;
while ( scanf ( " %d,%d,%d,%d,%d"
, d, d + 1, d + 2, d + 3, d + 4 ) == 5 )
{
int c[ 13 ] = { 0 };
... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s042539675 | p00038 | C | int main(void){ int card[5],ans,n,i,l,t,f; while(scanf(" %d,%d,%d,%d,%d",&card[0],&card[1],&card[2],&card[3],&card[4])!=EOF){ //昇順にソート for(i=0;i<4;i++){ for(l=4;l>i;l--){ if(card[l-1]>card[l]){ t=card[l-1]; card[... | main.c: In function 'main':
main.c:1:64: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | int main(void){ int card[5],ans,n,i,l,t,f; while(scanf(" %d,%d,%d,%d,%d",&card[0],&card[1],&card[2],&card[3],&card[4])!=EOF){ //昇順にソート for(i=0;i<4;i+... |
s080488998 | p00038 | C | #include<stdio.h>
int main(void){
int c[5];
while(scanf("%d",&c[0])!=EOF){
int i,j,work,count,flag;
//↓昇順に並べ替える↓
for(i=1;i<5;i++)scanf(",%d",&c[i]);
for(i=0;i<4;i++){
for(j=i+1;j<5;j++){
if(c[i]>c[j]){
work=c[i];
... | main.c: In function 'main':
main.c:18:27: error: lvalue required as left operand of assignment
18 | (c[0]==c[1])?i=0:i=1;
| ^
|
s325193413 | p00038 | C | #include<stdio.h>
int main(void){
int c[5];
while(scanf("%d",&c[0])!=EOF){
int i,j,work,count,flag;
for(i=1;i<5;i++)scanf(",%d",&c[i]);
for(i=0;i<4;i++){
for(j=i+1;j<5;j++){
if(c[i]>c[j]){
work=c[i];
c[i]=c[j];
... | main.c: In function 'main':
main.c:18:27: error: lvalue required as left operand of assignment
18 | (c[0]==c[1])?i=0:i=1;
| ^
|
s377109648 | p00038 | C | #include<stdio.h>
int main(void){
int c[5];
while(scanf("%d",&c[0])!=EOF){
int i,j,work,count,flag;
for(i=1;i<5;i++)scanf(",%d",&c[i]);
for(i=0;i<4;i++){
for(j=i+1;j<5;j++){
if(c[i]>c[j]){
work=c[i];
c[i]=c[j];
... | main.c: In function 'main':
main.c:18:27: error: lvalue required as left operand of assignment
18 | (c[0]==c[1])?i=0:i=1;
| ^
|
s797435411 | p00038 | C | #include <cstdio>
#include <algorithm>
using namespace std;
int main(void)
{
int hand[5];
int i, j;
while (scanf("%d", hand) != EOF){
int straight = 1;
int pair = 0;
int three = 0;
int four = 0;
for (i = 1; i < 5; i++){
scanf("%*c%d", hand + i);
}
sort(hand, hand + 5);
for (i = 0; i < 5 || ... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s544033484 | p00038 | C++ | int main(){
int tmp[5];
char com;
while(cin >>tmp[0]>>com>>tmp[1]>>com>>tmp[2]>>com>>tmp[3]>>com>>tmp[4]){
int hand[15]={};
for(int i=0; i<5; ++i){
if(tmp[i]==1)++hand[13];
++hand[tmp[i]-1];
}
int pair=0,three=0,str=0,four=0;
for(int i=1; i<15; ++i){
if(hand[i]==4)... | a.cc: In function 'int main()':
a.cc:4:11: error: 'cin' was not declared in this scope
4 | while(cin >>tmp[0]>>com>>tmp[1]>>com>>tmp[2]>>com>>tmp[3]>>com>>tmp[4]){
| ^~~
a.cc:21:13: error: 'cout' was not declared in this scope
21 | if(four)cout << "four card" << endl;
| ... |
s003590689 | p00038 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
vector<int> poker;
int check[15] = {0};
int two = 0; int three = 0; int four = 0;
int ans = 0;
string trump;
getline(cin,trump));
int a = 0;
int b = 0;
for(char e : trump){
if(e == 49){
if(b == 0){
b = 1;
}
el... | a.cc: In function 'int main()':
a.cc:13:21: error: expected ';' before ')' token
13 | getline(cin,trump));
| ^
| ;
a.cc: At global scope:
a.cc:105:3: error: expected unqualified-id before 'return'
105 | return 0;
| ^~~~~~
a.cc:106:1: error: expected d... |
s250829234 | p00038 | C++ | #include <stdio.h>
#include <algorithm.h>
using namespace std;
int main(void)
{
int card[5];
int count1;
int count2;
int straight;
int i;
int j;
char conma;
while (scanf("%d", &card[0]) != EOF){
for (i = 1; i < 5; i++){
scanf("%c %d", &conma, &card[i]);
}
sort(card, card + 5);
count1 = 0;
count... | a.cc:2:10: fatal error: algorithm.h: No such file or directory
2 | #include <algorithm.h>
| ^~~~~~~~~~~~~
compilation terminated.
|
s302481953 | p00038 | C++ | #include <stdio.h>
#include <algorithm.h>
using namespace std;
int main(void)
{
int card[5];
int count1;
int count2;
int straight;
int i;
int j;
char conma;
while (scanf("%d", &card[0]) != EOF){
for (i = 1; i < 5; i++){
scanf("%c %d", &conma, &card[i]);
}
sort(card, card + 5);
count1 = 0;
co... | a.cc:2:10: fatal error: algorithm.h: No such file or directory
2 | #include <algorithm.h>
| ^~~~~~~~~~~~~
compilation terminated.
|
s302329208 | p00038 | C++ | #include <stdio.h>
#include <algorithm.h>
using namespace std;
int main(void)
{
int card[5];
int c1;
int c2;
int straight;
int i;
int j;
char conma;
while (scanf("%d", &card[0]) != EOF){
for (i = 1; i < 5; i++){
scanf("%c %d", &conma, &card[i]);
}
sort(card, card + 5);
c1 = 0;
c2 = 0;
stra... | a.cc:2:10: fatal error: algorithm.h: No such file or directory
2 | #include <algorithm.h>
| ^~~~~~~~~~~~~
compilation terminated.
|
s179415429 | p00038 | C++ | #include <stdio.h>
#include <stdcomp.h>
#include <algorithm.h>
using namespace std;
int main(void)
{
int card[5];
int count1;
int count2;
int straight;
int i;
int j;
char conma;
while (scanf("%d", &card[0]) != EOF){
for (i = 1; i < 5; i++){
scanf("%c %d", &conma, &card[i]);
}
sort(card, card + 5);
... | a.cc:2:10: fatal error: stdcomp.h: No such file or directory
2 | #include <stdcomp.h>
| ^~~~~~~~~~~
compilation terminated.
|
s714619220 | p00038 | C++ | #include <stdio.h>
#include <algorithm.h>
using namespace std;
int main(void)
{
int card[5];
int c1;
int c2;
int straight;
int i;
int j;
char conma;
while (scanf("%d", &card[0]) != EOF){
for (i = 1; i < 5; i++){
scanf("%c %d", &conma, &card[i]);
}
sort(card, card + 5);
c1 = 0;
c2 = 0;
stra... | a.cc:2:10: fatal error: algorithm.h: No such file or directory
2 | #include <algorithm.h>
| ^~~~~~~~~~~~~
compilation terminated.
|
s690356872 | p00038 | C++ | #include<stdio.h>
#include<iostream>
using namespace std;
int main(){
int n[6];
int c=0,cc=0;
bool f=true;
while(scanf("%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4])!=EOF){
for(int i=0;i<5;i++)
for(int j=4;j>i;j--)
if(n[j-1]>n[j]){int t=n[j];n[j]=n[j-1];n[j-1]=t;}
for(int i=0;i<4;i++){
if(n[i]==n[i+1])c++;
else if(c... | a.cc: In function 'int main()':
a.cc:21:20: error: expected ';' before 'f'
21 | if(n[i+1]!=(n[i]+1)f=false;
| ^
| ;
a.cc:22:1: error: expected primary-expression before '}' token
22 | }
| ^
a.cc:21:28: error: expected ')' before '}' token
21 | if(n[i+1]!=... |
s803566177 | p00038 | C++ | #include<iostream>
#include<string>
#include<vector>
using namespace std;
int main(){
int a[5];
char c;
while(cin>>a[0]>>c>>a[1]>>c>>a[2]>>c>>a[3]>>c>>a[4]){
sort(a,a+5);
int c[5],j=0;
memset(c,0,sizeof(c));
for(int i=0;i<4;i++){
if(a[i+1]!=a[i])
... | a.cc: In function 'int main()':
a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'short'?
10 | sort(a,a+5);
| ^~~~
| short
a.cc:12:9: error: 'memset' was not declared in this scope
12 | memset(c,0,sizeof(c));
| ^~~~~~
a.cc:4:1: note: '... |
s091812897 | p00038 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<string.h>
using namespace std;
int main(){
int a[5];
char c;
while(cin>>a[0]>>c>>a[1]>>c>>a[2]>>c>>a[3]>>c>>a[4]){
sort(a,a+5);
int c[5],j=0;
memset(c,0,sizeof(c));
for(int i=0;i<4;i++){
if(a[i+1]!=a[i... | a.cc: In function 'int main()':
a.cc:11:9: error: 'sort' was not declared in this scope; did you mean 'short'?
11 | sort(a,a+5);
| ^~~~
| short
|
s527841091 | p00038 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <cstring>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <stdio.h>
#include <sstream>
#include <stdlib.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#define FOR(i,s,n) f... | a.cc:26:20: error: expected ',' or '...' before 'nums'
26 | string judge(int[] nums){
| ^~~~
a.cc: In function 'std::string judge(int*)':
a.cc:33:27: error: 'nums' was not declared in this scope
33 | st.insert(nums[i]);
| ^~~~
a.cc:42:23: er... |
s939721740 | p00038 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <cstring>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <stdio.h>
#include <sstream>
#include <stdlib.h>
#include <math.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#d... | a.cc: In function 'std::string judge(int*)':
a.cc:43:23: error: no match for 'operator>' (operand types are 'std::pair<const int, int>' and 'int')
43 | if(*it>0){
| ~~~^~
| | |
| | int
| std::pair<... |
s068164972 | p00038 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <cstring>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <stdio.h>
#include <sstream>
#include <stdlib.h>
#include <math.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#d... | a.cc: In function 'std::string judge(int*)':
a.cc:43:23: error: no match for 'operator>' (operand types are 'std::pair<const int, int>' and 'int')
43 | if(*it>0){
| ~~~^~
| | |
| | int
| std::pair<... |
s344640023 | p00038 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <cstring>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <stdio.h>
#include <sstream>
#include <stdlib.h>
#include <math.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#d... | a.cc: In function 'std::string judge(int*)':
a.cc:43:23: error: no match for 'operator>' (operand types are 'std::pair<const int, int>' and 'int')
43 | if(*it>0){
| ~~~^~
| | |
| | int
| std::pair<... |
s326112861 | p00038 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <cstring>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <stdio.h>
#include <sstream>
#include <stdlib.h>
#include <math.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#d... | a.cc: In function 'std::string judge(int*)':
a.cc:43:23: error: no match for 'operator>' (operand types are 'std::pair<const int, int>' and 'int')
43 | if(*it>0){
| ~~~^~
| | |
| | int
| std::pair<... |
s032733413 | p00038 | C++ | import sys
def is_onepair(x):
for i in range(4):
if x.count(x[i]) == 2:
return True
return False
def is_twopair(x):
count = 0
for e in x:
for e2 in x:
if e == e2:
count += 1
if count == 2:
return True
return Fals... | a.cc:1:1: error: 'import' does not name a type
1 | import sys
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s750643858 | p00038 | C++ | #include <bits/stdc++.h>
typedef long long LL;
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
using namespace std;
int main(void)
{
for(;;){
int n[5];
char c;
REP(i,5){
if(i) cin >> c;
if(cin >> n[i] == 0) return 0;
}
... | a.cc: In function 'int main()':
a.cc:16:22: error: no match for 'operator==' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
16 | if(cin >> n[i] == 0) return 0;
| ~~~~~~~~~~~ ^~ ~
| | |
| | ... |
s919358353 | p00038 | C++ | #include <bits/stdc++.h>
typedef long long LL;
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
using namespace std;
int main(void)
{
for(;;){
int n[5];
char c;
REP(i,5){
if(i) cin >> c;
if((cin >> n[i]) == 0) return 0;
... | a.cc: In function 'int main()':
a.cc:16:24: error: no match for 'operator==' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
16 | if((cin >> n[i]) == 0) return 0;
| ~~~~~~~~~~~~~ ^~ ~
| | |
| ... |
s760483863 | p00038 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
int main(){
int n[5], num[14], pair[3],i;
while (scanf_s("%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4]) != EOF){
i = 0;
for (int i = 0; i < 14; i++) num[i] = 0;
for (int i = 0; i < 3; i++) pair[i] = 0;
for (int i = 0; i < 5; i++) num[n[i] - 1]++;
... | a.cc: In function 'int main()':
a.cc:7:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
7 | while (scanf_s("%d,%d,%d,%d,%d",&n[0],&n[1],&n[2],&n[3],&n[4]) != EOF){
| ^~~~~~~
| scanf
|
s654036670 | p00038 | C++ | def function(a,b,c,d,e):
A=[a,b,c,d,e]
A.sort()
if A[0]==A[3] or A[1]==A[4]:
print("four card")
elif (A[0]==A[1] and A[2]==A[4]) or (A[0]==A[2] and A[3]==A[4]):
print("full house")
elif A[0]==A[2] or A[1]==A[3] or A[2]==A[4]:
print("three card")
elif (A[0]==A[1] and A[2]==A[3]) or (A[0]==A[1] and A[3]==A[4... | a.cc:1:1: error: 'def' does not name a type
1 | def function(a,b,c,d,e):
| ^~~
|
s620812513 | p00038 | C++ | # -*- coding: utf-8 -*-
def is_four_card(d):
return 4 in d.values()
def is_full_house(d):
return 3 in d.values() and 2 in d.values()
def is_straight(d):
flag = [False, 0]
for i in d.values():
if flag[0] == True and flag[1] == 5:
return True
if i == 1:
flag[... | a.cc:1:3: error: invalid preprocessing directive #-
1 | # -*- coding: utf-8 -*-
| ^
a.cc:38:15: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
38 | print('four card')
| ^~~~~~~~~~~
a.cc:40:15: warning: multi-character literal with 10 character... |
s445289694 | p00038 | C++ | #include <iostream>
#include <string>
using namespace std;
#define ??????????????£?????? 114514
string pairs[2][3] = { {"null","one pair","two pair"},
{"three card","full house",""} };
int main() {
int n, c, three, two;
char t;
string res;
while (!cin.eof()) {
int card[13] = { 0 }, c = 0, three = 0, two... | a.cc:5:9: error: macro names must be identifiers
5 | #define ??????????????£?????? 114514
| ^
a.cc:5:23: error: extended character £ is not valid in an identifier
5 | #define ??????????????£?????? 114514
| ^
a.cc:25:51: error: extended character £ is not valid in an ide... |
s381040473 | p00038 | C++ |
#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
int check(vector<int> v) {
sort(v.begin(), v.end());
//for (int i = 0; i < v.size(); i++)cout << v[i] << " ";
if ((v[0] == v[1] && v[1] == v[2] && v[2]== v[3]) || (v[1] == v[2] && v[2]== v[3] && v[3] == v[4])) {//four ca... | a.cc: In function 'int main()':
a.cc:42:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
42 | while (scanf_s("%d,%d,%d,%d,%d", &a, &b, &c, &d, &e) != EOF) {
| ^~~~~~~
| scanf
|
s362693528 | p00038 | C++ | while 1:
try: p=sorted(list(map(int,input().split(','))))
except: break
if (p[0] == p[3]) or (p[1] == p[4]):
print('four card')
elif p[0] == p[2] or p[1] == p[3] or p[2] == p[4]:
print('three card')
elif (p[0] == p[1] == p[2] and p[3] == p[4]) or (p[0] == [1] and p[2] == p[3] == p[4]):
print('full house')
... | a.cc:5:23: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
5 | print('four card')
| ^~~~~~~~~~~
a.cc:7:23: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
7 | print('three card')
... |
s579734234 | p00038 | C++ | afga
| a.cc:1:1: error: 'afga' does not name a type
1 | afga
| ^~~~
|
s400286308 | p00038 | C++ | #include<iostream>
#include<array>
int main()
{
while (true)
{
int a, b, c, d, e;
char foo;
std::cin >> a >> foo >> b >> foo >> c >> foo >> d >> foo >> e;
if (std::cin.eof())
{
break;
}
std::array<int, 5>num = { a,b,c,d,e };
std::sort(num.begin(), num.end());
if (num[0] == num[3] || num[1] == num... | a.cc: In function 'int main()':
a.cc:15:22: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
15 | std::sort(num.begin(), num.end());
| ^~~~
| qsort
|
s359607561 | p00038 | C++ | #include<iostream>
#include<stdio.h>
#include<vector>
#include<utility>
#include<queue>
#include<math.h>
#include<string>
#include<stack>
#include<typeinfo>
using namespace std;
typedef pair<int, int> P;
int main() {
char ch, straight, four, three, twop, onep;
int check[5] = { 1,10,11,12,13 }, st = 0;
int card[5]; w... | a.cc: In function 'int main()':
a.cc:17:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
17 | sort(card, card + 5);
| ^~~~
| sqrt
|
s774565946 | p00038 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int a[5];
bool isStraight(){
vector<int> n;
for(int i=0 ; i<5 ; i++){
n.push_back(a[i]);
}
sort( n.begin(), n.end() );
if( n[0]+1 == n[1] && n[1]+1 == n[2] && n[2]+1 == n[3] && n[3]+1 == n[4]){
return true;
}
if( n[0]==1 && n[1]==... | a.cc: In function 'bool isStraight()':
a.cc:13:9: error: 'sort' was not declared in this scope; did you mean 'short'?
13 | sort( n.begin(), n.end() );
| ^~~~
| short
|
s669672049 | p00038 | C++ | #include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int a[5];
bool isStraight(){
vector<int> n;
for(int i=0 ; i<5 ; i++){
n.push_back(a[i]);
}
sort( n.begin(), n.end() );
if( n[0]+1 == n[1] && n[1]+1 == n[2] && n[2]+1 == n[3] && n[3]+1 == n[4]){
return true;
}
if... | a.cc: In function 'bool isStraight()':
a.cc:14:9: error: 'sort' was not declared in this scope; did you mean 'short'?
14 | sort( n.begin(), n.end() );
| ^~~~
| short
|
s672060411 | p00038 | C++ | #include <stdio.h>
int compare_int (const void* a,const void* b) {
return (*(int*)a-*(int*)b);
}
int main(void) {
int hand[5];
int overlap[5];
int used[5];
int count;
int full_or_three=-1;
int two_or_one=-1;
int temp;
int i,j,k,l,m=0;
char c;
while(scanf("%d,%d,%d,%d,%d",&hand[0],&hand[... | a.cc: In function 'int main()':
a.cc:27:5: error: 'qsort' was not declared in this scope
27 | qsort(hand,sizeof(hand)/sizeof(hand[0]),sizeof(int),compare_int);
| ^~~~~
|
s732373867 | p00038 | C++ | #include <stdio.h>
int compare_int (const void* a,const void* b) {
return (*(int*)a-*(int*)b);
}
int main(void) {
int hand[5];
int overlap[5];
int used[5];
int count;
int full_or_three=-1;
int two_or_one=-1;
int temp;
int i,j,k,l,m=0;
char c;
while(scanf("%d,%d,%d,%d,%d",&hand[0],&hand[... | a.cc: In function 'int main()':
a.cc:27:5: error: 'qsort' was not declared in this scope
27 | qsort(hand,sizeof(hand)/sizeof(hand[0]),sizeof(int),compare_int);
| ^~~~~
|
s804574011 | p00038 | C++ | #include<iostream>
#include<cstdio>
#include<stdlib>
using namespace std;
int max(const void* x,const void* y);
int main(){
for(;;){
int hand[5];
if(scanf("%d,%d,%d,%d,%d",&hand[0],&hand[1],&hand[2],&hand[3],&hand[4]) == EOF){break;}
qsort(hand,5,sizeof(int),max);
int f = 0;
for(int i=0; i<5; i++){
if(han... | a.cc:3:9: fatal error: stdlib: No such file or directory
3 | #include<stdlib>
| ^~~~~~~~
compilation terminated.
|
s801428921 | p00038 | C++ | #include<iostream>
#include<cstdio>
#include<stdlib>
using namespace std;
int max(const void* x,const void* y);
int main(){
for(;;){
int hand[5];
if(scanf("%d,%d,%d,%d,%d",&hand[0],&hand[1],&hand[2],&hand[3],&hand[4]) == EOF){break;}
qsort(hand,5,sizeof(int),max);
int f = 0;
for(int i=0; i<5; i++){
if(han... | a.cc:3:9: fatal error: stdlib: No such file or directory
3 | #include<stdlib>
| ^~~~~~~~
compilation terminated.
|
s203502672 | p00038 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(void){
int x[5],card[14],fg[5],i;
vector<int>y;
while(~scanf("%d,%d,%d,%d,%d"
,&x[0],&x[1],&x[2],&x[3],&x[4])){
memset(card,0,sizeof(card));
memset(fg,0,sizeof(fg));
for(i=0;i<5;i++)... | a.cc: In function 'int main()':
a.cc:14:5: error: 'memset' was not declared in this scope
14 | memset(card,0,sizeof(card));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<cstdio>
+++ |+#include <cstring>
... |
s101079982 | p00038 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
using namespace std;
int main(void){
int x[5],card[14],fg[5],i;
vector<int>y;
while(~scanf("%d,%d,%d,%d,%d"
,&x[0],&x[1],&x[2],&x[3],&x[4])){
memset(card,0,sizeof(card));
memset(fg,0,sizeof(fg));
... | a.cc: In function 'int main()':
a.cc:15:5: error: 'memset' was not declared in this scope
15 | memset(card,0,sizeof(card));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include<cstdlib>
+++ |+#include <cstring>
... |
s650868777 | p00038 | C++ | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(void){
string yaku[]={"one pair","two pair","three card","full house","four card","straight","null"};
int tefuda[5],count[14];
bool flag,straight;
while(scanf("%d,%d,%d,%d,%d",&tefuda[0],&tefuda[1],&tefuda[2],&tefuda[3],&tefu... | a.cc: In function 'int main()':
a.cc:18:17: error: 'memset' was not declared in this scope
18 | memset(count,0,sizeof(count));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<algorithm>
... |
s773200461 | p00038 | C++ | #include<cstdio>
#include<algorithm>
using namespace std;
int cards[5];
int card[14]={0};
int main()
{
start:
while(scanf("%d,%d,%d,%d,%d",&cards[0],&cards[1],&cards[2],&cards[3],&cards[4])!=EOF)
{
fill(card,card+14,0);
for(int i=0;i<5;i++)
{
card[cards[i]-1]++;
if(cards[i]==1)card[13]++;
}
for(i... | a.cc:73:1: error: extended character is not valid in an identifier
73 | return 0;
| ^
a.cc:73:1: error: extended character is not valid in an identifier
a.cc:73:1: error: extended character is not valid in an identifier
a.cc:73:1: error: extended character is not valid in an identifier
a.cc: In fun... |
s441580026 | p00038 | C++ | #include<algorithm>
#include<stdio.h>
int main()
{
int card[5];
while( scanf( "%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4] ) != EOF ){
int a[20];
std::fill( a, a + 20, 0 );
int c = 0;
for( int i = 0; i < 5; i++ ) a[card[i]]++;
for( int i = 0; i < 5; i++ ){
c = std::max... | a.cc: In function 'int main()':
a.cc:17:38: error: no matching function for call to 'max(int&, std::iterator_traits<int*>::difference_type)'
17 | c = std::max( c, std::count( card, card + 5, card[i] ) );
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
s019830682 | p00038 | C++ | #include<algorithm>
#include<iostream>
#include<stdio.h>
int main()
{
int card[5];
while( scanf( "%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4] ) != EOF ){
int a[20];
std::fill( a, a + 20, 0 );
int c = 0;
for( int i = 0; i < 5; i++ ) a[card[i]]++;
for( int i = 0; i < 5; i++ ... | a.cc: In function 'int main()':
a.cc:18:38: error: no matching function for call to 'max(int&, std::iterator_traits<int*>::difference_type)'
18 | c = std::max( c, std::count( card, card + 5, card[i] ) );
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
s455917272 | p00038 | C++ | #include<algorithm>
#include<iostream>
#include<stdio.h>
#include<string.h>
int main()
{
int card[5];
while( scanf( "%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4] ) != EOF ){
int a[20];
memset( a, 0, sizeof( a ) );
int c = 0;
for( int i = 0; i < 5; i++ ) a[card[i]]++;
for( i... | a.cc: In function 'int main()':
a.cc:19:38: error: no matching function for call to 'max(int&, std::iterator_traits<int*>::difference_type)'
19 | c = std::max( c, std::count( card, card + 5, card[i] ) );
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
s211016303 | p00038 | C++ | #include<algorithm>
#include<iostream>
#include<vector>
#include<stdio.h>
#include<string.h>
int main()
{
int card[5];
while( scanf( "%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4] ) != EOF ){
int a[20];
memset( a, 0, sizeof( a ) );
int c = 0;
for( int i = 0; i < 5; i++ ) a[card[i... | a.cc: In function 'int main()':
a.cc:20:38: error: no matching function for call to 'max(int&, std::iterator_traits<int*>::difference_type)'
20 | c = std::max( c, std::count( card, card + 5, card[i] ) );
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
s354429928 | p00038 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
int c[6],s[6],ans=0;
string a[7]={"null","one pair","two pair","three card","straight","full
house","four card"};
while(scanf("%d,%d,%d,%d,%d",&c[0],&c[1],&c[2],&c[3],&c[4])!=EOF){
ans=0;
for(int i=0;i<5;i++)s[i]=100;
s[0]=c[0];
for(int i=1;i<5;i++... | a.cc:7:67: warning: missing terminating " character
7 | string a[7]={"null","one pair","two pair","three card","straight","full
| ^
a.cc:7:67: error: missing terminating " character
7 | string a[7]={"null","one pair","two pair","three card"... |
s446786896 | p00038 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
int c[6],s[6],ans=0;
string a[7]={"null","one pair","two pair","three card","straight","full
house","four card"};
while(scanf("%d,%d,%d,%d,%d",&c[0],&c[1],&c[2],&c[3],&c[4])){
ans=0;
for(int i=0;i<5;i++)s[i]=100;
s[0]=c[0];
for(int i=1;i<5;i++){
fo... | a.cc:7:67: warning: missing terminating " character
7 | string a[7]={"null","one pair","two pair","three card","straight","full
| ^
a.cc:7:67: error: missing terminating " character
7 | string a[7]={"null","one pair","two pair","three card"... |
s130008743 | p00038 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
int c[6],s[6],ans=0;
string a[7]={"null","one pair","two pair","three card","straight","full
house","four card"};
while(scanf("%d,%d,%d,%d,%d",&c[0],&c[1],&c[2],&c[3],&c[4])!=EOF){
ans=0;
for(int i=0;i<5;i++)s[i]=100;
s[0]=c[0];
for(int i=1;i<5;i++... | a.cc:7:67: warning: missing terminating " character
7 | string a[7]={"null","one pair","two pair","three card","straight","full
| ^
a.cc:7:67: error: missing terminating " character
7 | string a[7]={"null","one pair","two pair","three card"... |
s863294165 | p00038 | C++ | <?php
while (TRUE) {
$c = fscanf(STDIN, '%d,%d,%d,%d,%d');
if (feof(STDIN)) {
break;
}
sort($c);
$hash = array();
$max = 0;
foreach ($c as $v) {
if (!isset($hash[$v])) {
$hash[$v] = 0;
}
$hash[$v]++;
$max = $hash[$v] > $max ? $hash[$v] : $... | a.cc:4:24: warning: multi-character literal with 14 characters exceeds 'int' size of 4 bytes
4 | $c = fscanf(STDIN, '%d,%d,%d,%d,%d');
| ^~~~~~~~~~~~~~~~
a.cc:19:14: warning: multi-character character constant [-Wmultichar]
19 | $combo = 'null';
| ^~~~~~
a.... |
s419304486 | p00038 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
int main(void){
int i,j,k,l;
int card[5];
int poker_hand;
bool flag;
while(true){
poker_hand=0;
for(i=0;i<5;i++){
if(scanf("%d,",&card[i])==EOF)return(0);
}
sort(card,card+5);
for(i=0;i<4;i++){
if(card[i]==card[i+1])... | a.cc: In function 'int main()':
a.cc:17:5: error: 'sort' was not declared in this scope; did you mean 'short'?
17 | sort(card,card+5);
| ^~~~
| short
|
s359193144 | p00038 | C++ | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AOJ
{
class Program
{
static void Main(string[] args)
{
string s;
while ((s = Console.ReadLine()) != null)
{
var list = s.Split(',').Select(int.Par... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.L... |
s284397820 | p00038 | C++ | #include <stdio.h>
#include <iostream>
using namespace std;
int main() {
int a[5];
int kari;
char d;
while (cin >> a[0] >> d >> a[1] >> d >> a[2] >> d >> a[3] >> d >> a[4]) {
for (int i = 4; i > 0; i--) {
for (int j = 0; j < i; j++) {
if (a[j] > a[j+1]) {
... | a.cc: In function 'int main()':
a.cc:26:62: error: expected identifier before numeric constant
26 | } else if ((a[0] == a[1] && a[1] == a[2] && [2]==a[3]) || (a[1] == a[2] && a[2] == a[3] && a[3] == a[4])){
| ^
a.cc: In lambda functio... |
s668018811 | p00038 | C++ | #include<iostream>
#include<string>
using namespace std;
int Result(int cards[5]){
int num_card[13];
bool four=false, three=false, two=false;
int num_two=0;
int min = 12,max = 0;
for(int i=0;i<13;++i)num_card[i]=0;
for(int i=0;i<5;++i){
num_card[ cards[i] - 1 ] ++;
}
for(int i=0;i<13;++i){
if(num_car... | a.cc: In function 'int main()':
a.cc:80:16: error: expected '(' before 'Result'
80 | switch Result(card){
| ^~~~~~
| (
|
s461729123 | p00038 | C++ | #include<iostream>
#include<string>
using namespace std;
int Result(int cards[5]){
int num_card[13];
bool four=false, three=false, two=false;
int num_two=0;
int min = 12,max = 0;
for(int i=0;i<13;++i)num_card[i]=0;
for(int i=0;i<5;++i){
num_card[ cards[i] - 1 ] ++;
}
for(int i=0;i<13;++i){
if(num_car... | a.cc: In function 'void toint(char*, int*)':
a.cc:62:14: error: 'strtok' was not declared in this scope; did you mean 'strtoq'?
62 | tp = strtok(s,",");
| ^~~~~~
| strtoq
|
s653491965 | p00039 | Java | import java.util.Hashtable;
import java.util.Scanner;
public class AOJ_Volume0039 {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
Hashtable<Character,Integer> roman = new Hashtable<Character,Integer>();
roman.put('I',1);
roman.put('V',5);
roman.put('X',10);
roman.put('L',50... | Main.java:5: error: class AOJ_Volume0039 is public, should be declared in a file named AOJ_Volume0039.java
public class AOJ_Volume0039 {
^
1 error
|
s883614204 | p00039 | Java | import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line;
while((line=br.readLine())!=null){
int ans=0:
char[] n=line.toCharArray();
int[] fig=new int[n.length];
for(int i=0;i<fig.length;i++){
fig[i]=toN... | Main.java:8: error: ';' expected
int ans=0:
^
Main.java:23: error: illegal start of expression
static int toNum(char c){
^
2 errors
|
s132649817 | p00039 | Java | import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line;
while((line=br.readLine())!=null){
int ans=0;
char[] n=line.toCharArray();
int[] fig=new int[n.length];
for(int i=0;i<fig.length;i++){
fig[i]=toN... | Main.java:34: error: reached end of file while parsing
}
^
1 error
|
s026149294 | p00039 | Java | import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line;
while((line=br.readLine())!=null){
int ans=0;
char[] n=line.toCharArray();
int[] fig=new int[n.length];
for(int i=0;i<fig.length;i++){
fig[i]=toN... | Main.java:26: error: cannot find symbol
case I: return 1;
^
symbol: variable I
location: class Main
Main.java:27: error: cannot find symbol
case V: return 5;
^
symbol: variable V
location: class Main
Main.java:28: error: cannot find symbol
case X: return 10;
^
symbol: variable X
locatio... |
s952539670 | p00039 | Java | import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line;
while((line=br.readLine())!=null){
int ans=0;
char[] n=line.toCharArray();
int[] fig=new int[n.length];
for(int i=0;i<fig.length;i++){
fig[i]=toN... | Main.java:34: error: missing return statement
}
^
1 error
|
s970329378 | p00039 | Java | import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line;
while((line=br.readLine())!=null){
int ans=0;
char[] n=line.toCharArray();
int[] fig=new int[n.length];
for(int i=0;i<fig.length;i++){
fig[i]=toN... | Main.java:34: error: missing return statement
}
^
1 error
|
s200314705 | p00039 | Java | import java.io.*;
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line;
while((line=br.readLine())!=null){
int ans=0;
char[] n=line.toCharArray();
int[] fig=new int[n.length];
for(int i=0;i<fig.length;i++){
fig[i]=toN... | Main.java:42: error: variable n might not have been initialized
return n;
^
1 error
|
s909218166 | p00039 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main{
public static void main(String args[]){
BufferedReader reader =
new BufferedReader(new InputStreamReader(System.in));
String st = "";
int[] a = new int[100];
... | Main.java:41: error: unreachable statement
try{
^
1 error
|
s629510981 | p00039 | Java | import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import javafx.scene.shape.Ellipse;
class Main {
static String line;
static String[] sx = { "XC", "XL", "XXX", "XX", "XIX", "XIV", "XIII", "XII", "XI", "XVIII", "XVII", "XVI", "XV",
"X" };
static int[]... | Main.java:5: error: package javafx.scene.shape does not exist
import javafx.scene.shape.Ellipse;
^
1 error
|
s274050341 | p00039 | Java | import java.util.Scanner;
public class AOJ0039 {
int n;
public static void main(String[] args) {
//new AOJ0039().run();
new Main().run();
}
void run(){
Scanner sc=new Scanner(System.in);
while(sc.hasNext()){
String str=sc.next();
n=str.length();
System.out.println(roman(str.toCharArray(),0,0,0))... | Main.java:3: error: class AOJ0039 is public, should be declared in a file named AOJ0039.java
public class AOJ0039 {
^
Main.java:7: error: cannot access Main
new Main().run();
^
bad source file: ./Main.java
file does not contain class Main
Please remove or make sure it appears in the correct sub... |
s844100206 | p00039 | Java | import java.io.*;
class Main
{
public static void main(String args[])throws IOException
{
BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
String str;
int a[]=new int[str.length()];
while((str=input.readLine())!=null)
{
String str_ary[]=new String[str.length()];
for(int i=... | Main.java:8: error: variable str might not have been initialized
int a[]=new int[str.length()];
^
1 error
|
s101670070 | p00039 | C | #include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
int main(){
string s;
map<char,int>mp={
{'I',1},
{'V',5},
{'X',10},
{'L',50},
{'C',100},
{'D',500},
{'M',1000}
};
while(cin>>s){
int cnt=mp[s[0]],r=1;
char back=s[0];
if(i>1){
for(int i=1;i<s.size();i++){
i... | main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s853314161 | p00039 | C | V[]={1e3,500,100,50,10,5,1};char*R="NEDMYWJ";v,n,s=1e3,r;main(c){for(r=R;c=getchar()+1;s=v)n=c-11?(v=V[strchr(R,c)-r],n+v-s*2*(s<v)):!printf("%d\n",n,v=*V);} | main.c:1:1: warning: data definition has no type or storage class
1 | V[]={1e3,500,100,50,10,5,1};char*R="NEDMYWJ";v,n,s=1e3,r;main(c){for(r=R;c=getchar()+1;s=v)n=c-11?(v=V[strchr(R,c)-r],n+v-s*2*(s<v)):!printf("%d\n",n,v=*V);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'V' [-Wimplicit-in... |
s668024161 | p00039 | C | n,l,t[256];
main(char r[]){
t[73]=1;
t[86]=5;
t[88]=10;
t[76]=50;
t[67]=100;
t[68]=500;
t[77]=1000;
for(;l=read(0,r,128);){
n=t[r[l--]];
for (;l--;){
n+=t[r[l]*(t[r[l+1]]>t[r[i]]?-1:1);
}
printf("%d\n",n);
}
return (0);
} | main.c:1:1: warning: data definition has no type or storage class
1 | n,l,t[256];
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'l' [-Wimplicit-int]
1 | n,l,t[256];
| ^
main.c:1:5: error: type defaul... |
s364665007 | p00039 | C | main()
{
int t[256],n,l;
char r[128];
t[73] = 1;
t[86] = 5;
t[88] = 10;
t[76] = 50;
t[67] = 100;
t[68] = 500;
t[77] = 1000;
for(;l=read(0,r,128);){
n=t[r[--l]];
for(;--l;){
n+=t[r[l]]*(t[r[l+1]]>t[r[i]]?-1:1);
}
printf("%d\n", n);
... | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main()
| ^~~~
main.c: In function 'main':
main.c:14:12: error: implicit declaration of function 'read' [-Wimplicit-function-declaration]
14 | for(;l=read(0,r,128);){
| ^~~~
main.c:17:39: error: 'i' undeclared (first ... |
s605845893 | p00039 | C | #include<stdio.h>
int main(){
int i,j,moji[100]sum;
char tmp[100];
while(fgets(tmp,100,stdin)!=NULL){
sum=0;
i=0;
while(tmp[i]!='\0'){
if(tmp[i]=='I') moji[i]=1;
else if(tmp[i]=='V') moji[i]=5;
else if(tmp[i]=='X') moji[i]=10;
else if(tmp[i]=='L') moji[i]=50;
else if(tmp[i]=='C') moji[i]=100;... | main.c: In function 'main':
main.c:5:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sum'
5 | int i,j,moji[100]sum;
| ^~~
main.c:9:17: error: 'sum' undeclared (first use in this function)
9 | sum=0;
| ^~~
main.c:9:1... |
s070953566 | p00039 | C | #include<stdio.h>
int main(){
int i,j,moji[100],sum;
char tmp[100];
while(fgets(tmp,100,stdin)!=NULL){
sum=0;
i=0;
while(tmp[i]!=10){
if(tmp[i]=='I') moji[i]=1;
else if(tmp[i]=='V') moji[i]=5;
else if(tmp[i]=='X') moji[i]=10;
else if(tmp[i]=='L') moji[i]=50;
else if(tmp[i]=='C') moji[i]=100;
... | main.c: In function 'main':
main.c:26:41: error: expected expression before '<' token
26 | else if(moji[j]=<moji[j-1]){
| ^
|
s082355686 | p00039 | C++ | #include <cstdio>
#include <map>
using namespace std;
int main()
{
map <string, int> list;
list["I"] = 1;
list["V"] = 5;
list["X"] = 10;
list["L"] = 50;
list["C"] = 100;
list["D"] = 500;
list["M"] = 1000;
list["N"] = 0;
char s[10001];
while(scanf("%s", s) != EOF){
string str = s;
string str_next =... | a.cc: In function 'int main()':
a.cc:8:14: error: 'string' was not declared in this scope
8 | map <string, int> list;
| ^~~~~~
a.cc:3:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
2 | #include <map>
+++ |+#include <str... |
s774708315 | p00039 | C++ | #include <stdio.h>
char c[200];
int main(){
int ans;
int n;
while(scanf("%s",&c) != EOF){
n = strlen(c);
ans = 0;
for(int i = 0; i < n; i++){
if(c[i] == 'I'){
if(c[i + 1] == 'V' || c[i + 1] == 'X'){
ans -= 1;
}else{
ans += 1;
}
}
if(c[i] == 'X'){
if(c[i + 1] == 'L' || c[i +... | a.cc: In function 'int main()':
a.cc:9:21: error: 'strlen' was not declared in this scope
9 | n = strlen(c);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <stdio.h>
+++ |+#inclu... |
s622433356 | p00039 | C++ | #include <stdio.h>
#include <string>
char c[200];
int main(){
int ans;
int n;
while(scanf("%s",&c) != EOF){
n = strlen(c);
ans = 0;
for(int i = 0; i < n; i++){
if(c[i] == 'I'){
if(c[i + 1] == 'V' || c[i + 1] == 'X'){
ans -= 1;
}else{
ans += 1;
}
}
if(c[i] == 'X'){
if(c[i + ... | a.cc: In function 'int main()':
a.cc:10:21: error: 'strlen' was not declared in this scope
10 | n = strlen(c);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <string>
+++ |+#inclu... |
s027485808 | p00039 | C++ | #include<stdio.h>
int main(){
char ch,;
int sum;
int w,b,a;
sum=0;ch='\0';w=0;b=0;a=0;
while(scanf("%c",&ch)!=EOF){
while(1){
if(ch=='\0')break;
if(ch=='I')w=1;
else if(ch=='V')w=5;
else if(ch=='X')w=10;
else if(ch=='L')w=50;
else if(ch=='C)w=100;
else if(ch=='D')w=500;
else if(ch=='M')w=1000;
switch(w){
case 1:
a=1;b... | a.cc:15:13: warning: missing terminating ' character
15 | else if(ch=='C)w=100;
| ^
a.cc:15:13: error: missing terminating ' character
15 | else if(ch=='C)w=100;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:4:9: error: expected unqualified-id before ';' token
4 | char c... |
s359234511 | p00039 | C++ | #include <iostream>
#include <string>
using namespace std;
void Solution()
{
string str;
int a;
int b;
int l;
int x;
char c;
while (getline(cin, str)) //enter
{
x = 0;
l = (int)str.size();
for (int i = 0; i < l; i++)
{
... | a.cc:23:18: error: extended character is not valid in an identifier
23 | for (int i = 0; i < l; i++)
| ^
a.cc:23:22: error: extended character is not valid in an identifier
23 | for (int i = 0; i < l; i++)
| ^
a.cc:23:27: error: extended charac... |
s134191829 | p00039 | C++ | import java.util.Scanner;
//Roman Figure
public class AOJ0039 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
char[] s = sc.next().toCharArray();
int sum = 0;
int i;
for(i=0;i<s.length-1;i++){
if(f(s[i])>=f(s[i+1]))sum+=f(s[i]);
else{
... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
4 | public class AOJ0039 {
| ^~~~~~
|
s521267238 | p00039 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
while(cin>>s){
int b[2][100000]={0};bool bb[2][100000]={0};
for(int i=0;i<100000;i++)for(j=0;j<2;j++)b[j][i]=0;
for(int i=0;i<100000;i++)for(j=0;j<2;j++)bb[j][i]=0;
int a[200],sum=0;
for(int i=0;i<200;i++)a[i]=0;
for(int i=0;i<s.size();... | a.cc: In function 'int main()':
a.cc:7:46: error: 'j' was not declared in this scope
7 | for(int i=0;i<100000;i++)for(j=0;j<2;j++)b[j][i]=0;
| ^
a.cc:8:46: error: 'j' was not declared in this scope
8 | for(int i=0;i<100000;i++)fo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.