submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s453755810 | p00105 | C | #include <stdio.h>
#include <stdlib.h>
struct word{
char w[31];
int p;
}w[1000];
int compare(const void *a,const void *b){
int i;
for(i=0;;i++){
if((struct word *)a->w[i]!='\0'&&(struct word *)b->w[i]=='\0')return -1;
if((struct word *)a->w[i]=='\0'&&(struct word *)b->w[i]!='\0')return 1;
if((stru... | main.c: In function 'compare':
main.c:12:24: warning: dereferencing 'void *' pointer
12 | if((struct word *)a->w[i]!='\0'&&(struct word *)b->w[i]=='\0')return -1;
| ^~
main.c:12:24: error: request for member 'w' in something not a structure or union
main.c:12:54: warning: dereferenci... |
s651385971 | p00105 | C | #include <stdio.h>
#include <stdlib.h>
struct word{
char w[31];
int p;
}wo[1000];
int compare(const void *a,const void *b){
int i;
for(i=0;;i++){
if((struct word *)a->w[i]!='\0'&&(struct word *)b->w[i]=='\0')return -1;
if((struct word *)a->w[i]=='\0'&&(struct word *)b->w[i]!='\0')return 1;
if((str... | main.c: In function 'compare':
main.c:12:24: warning: dereferencing 'void *' pointer
12 | if((struct word *)a->w[i]!='\0'&&(struct word *)b->w[i]=='\0')return -1;
| ^~
main.c:12:24: error: request for member 'w' in something not a structure or union
main.c:12:54: warning: dereferenci... |
s184392522 | p00105 | C | #include <stdio.h>
#include <stdlib.h>
struct word{
char w[31];
int p;
}wo[1000];
int compare(const void *a,const void *b){
int i;
for(i=0;;i++){
if((struct word *)a->w[i]!='\0'&&(struct word *)b->w[i]=='\0')return -1;
if((struct word *)a->w[i]=='\0'&&(struct word *)b->w[i]!='\0')return 1;
if((str... | main.c: In function 'compare':
main.c:12:24: warning: dereferencing 'void *' pointer
12 | if((struct word *)a->w[i]!='\0'&&(struct word *)b->w[i]=='\0')return -1;
| ^~
main.c:12:24: error: request for member 'w' in something not a structure or union
main.c:12:54: warning: dereferenci... |
s464823066 | p00105 | C | #include <stdio.h>
#include <stdlib.h>
struct word{
char w[31];
int p;
}wo[1000];
int compare(const void *a,const void *b){
int i;
for(i=0;;i++){
if(((struct word *)a)->w[i]!='\0'&&((struct word *)b)->w[i]=='\0')return -1;
if(((struct word *)a)->w[i]=='\0'&&((struct word *)b)->w[i]!='\0')return 1;
... | main.c: In function 'main':
main.c:26:39: error: 'struct word' has no member named 'd'
26 | while(scanf("%s%d",wo[i].w,&(wo[i++].d)));
| ^
main.c:31:9: error: 'k' undeclared (first use in this function)
31 | for(k=j+1;strcmp(wo[j].w,wo[k].w)==0;k++){
| ... |
s618660251 | p00105 | C | #include <stdio.h>
#include <stdlib.h>
struct word{
char w[31];
int p;
}wo[1000];
int compare(const void *a,const void *b){
int i;
for(i=0;;i++){
if(((struct word *)a)->w[i]!='\0'&&((struct word *)b)->w[i]=='\0')return -1;
if(((struct word *)a)->w[i]=='\0'&&((struct word *)b)->w[i]!='\0')return 1;
... | main.c: In function 'main':
main.c:31:15: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
31 | for(k=j+1;strcmp(wo[j].w,wo[k].w)==0;k++){
| ^~~~~~
main.c:3:1: note: include '<string.h>' or provide a declaration of 'strcmp'
2 | #include <stdlib.h>
+++ |... |
s673724224 | p00105 | C | #include <stdio.h>
#include <stdlib.h>
struct word{
char w[31];
int p;
}w[1000];
int compare(const void *a,const void *b){
int i;
for(i=0;;i++){
if((struct word *)a->w[i]!='\0'&&(struct word *)b->w[i]=='\0')return -1;
if((struct word *)a->w[i]=='\0'&&(struct word *)b->w[i]!='\0')return 1;
if((stru... | main.c: In function 'compare':
main.c:12:24: warning: dereferencing 'void *' pointer
12 | if((struct word *)a->w[i]!='\0'&&(struct word *)b->w[i]=='\0')return -1;
| ^~
main.c:12:24: error: request for member 'w' in something not a structure or union
main.c:12:54: warning: dereferenci... |
s928431640 | p00105 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct Words
{
char word[30];
int page[100];
} WORDS;
WORDS wordArray[100];
WORDS* printMinWord(WORDS*);
WORDS* printMinPage(WORDS*);
int main()
{
char tempWord[30];
int tempPage;
int wordCnt;
int pageCnt;
int inputC... | main.c: In function 'main':
main.c:24:35: warning: missing terminating " character
24 | while (scanf("%s %d", tempWord", &tempPage) != EOF)
| ^
main.c:24:35: error: missing terminating " character
24 | while (scanf("%s %d", tempWord", &tempPage) != EOF)
| ... |
s480474973 | p00105 | C | #include <stdio.h>
#include <string.h>
typedef int BOOL;
#define TRUE 1;
#define FALSE 0;
typedef struct Word
{
char word[31];
int page;
} WORD;
WORD wordArray[100];
void input();
BOOL is_smaller(char *, int, int);
void output();
int main()
{
input();
output();
return 0;
}
void input()
{
int cnt... | main.c: In function 'is_smaller':
main.c:63:9: error: 'else' without a previous 'if'
63 | else if(strcmp(tempWord, wordArray[cnt].word) == 0)
| ^~~~
main.c:67:17: error: expected '}' before 'else'
67 | else
| ^~~~
main.c: At top level:
main.c:70:9: error... |
s520017370 | p00105 | C | #include <stdio.h>
#include <string.h>
typedef int BOOL;
#define TRUE 1;
#define FALSE 0;
typedef struct Word
{
char word[31];
int page;
} WORD;
WORD wordArray[100];
void input();
BOOL is_smaller(char *, int, int);
void output();
int main()
{
input();
output();
return 0;
}
void input()
{
int cnt... | main.c: In function 'is_smaller':
main.c:63:9: error: 'else' without a previous 'if'
63 | else if(strcmp(tempWord, wordArray[cnt].word) == 0)
| ^~~~
main.c:67:17: error: expected '}' before 'else'
67 | else
| ^~~~
main.c: At top level:
main.c:72:9: error... |
s896633974 | p00105 | C | #include <stdio.h>
#include <string.h>
typedef int BOOL;
#define TRUE 1;
#define FALSE 0;
typedef struct Word{
char word[31];
int page;
} WORD;
WORD wordArray[100];
void input();
BOOL is_smaller(WORD, int);
void output();
int main()
{
input();
output();
return 0;
}
void input()
{
int cnt1, cnt2;... | main.c: In function 'is_smaller':
main.c:55:9: error: 'else' without a previous 'if'
55 | else if(strcmp(tempWORD.word, wordArray[cnt].word) == 0)
| ^~~~
|
s150090416 | p00105 | C | #include <stdio.h>
#include <string.h>
typedef int BOOL;
#define TRUE 1;
#define FALSE 0;
typedef struct Word{
char word[31];
int page;
} WORD;
WORD wordArray[100];
void input();
BOOL is_smaller(WORD, int);
void output();
#include <stdio.h>
#include <string.h>
typedef int BOOL;
#define TRUE 1;
#define FALSE ... | main.c:25:16: error: redefinition of 'struct Word'
25 | typedef struct Word{
| ^~~~
main.c:8:16: note: originally defined here
8 | typedef struct Word{
| ^~~~
main.c:28:9: error: conflicting types for 'WORD'; have 'struct Word'
28 | } WORD;
| ^~~~
... |
s648021867 | p00105 | C | #include<functional>
#include<list>
#include<queue>
#include<stack>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
class word{
public:
char w[31];
std::priority_queue<int> q;
};
int main(){
using namespace std;
int p,cmp;
char str[31];
list<word> wlst;
list<word>::iterator it;
stack<int>... | main.c:1:9: fatal error: functional: No such file or directory
1 | #include<functional>
| ^~~~~~~~~~~~
compilation terminated.
|
s773394284 | p00105 | C | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
int i,look,first,prev,n,index;
int dic[105][2],page[105];
char s[105][35],word[35];
int main(void){
while(scanf("%s %d",s[n],&page[n])!=EOF){
dic[n][0]=n;dic[n][1]=999;
look=first;prev=-1;
while(look!=n){
index=dic[look][0];
if(strcmp(s[n],s[ind... | main.c:5:25: error: 'index' redeclared as different kind of symbol
5 | int i,look,first,prev,n,index;
| ^~~~~
In file included from /usr/include/string.h:462,
from main.c:2:
/usr/include/strings.h:68:14: note: previous declaration of 'index' with type 'char *(const cha... |
s274054931 | p00105 | C | int main(void){
while(scanf("%s %d",s[n],&page[n])!=EOF){
dic[n][0]=n;dic[n][1]=999;
look=first;prev=-1;
while(look!=n){
dex=dic[look][0];
if(strcmp(s[n],s[dex])<0 || (strcmp(s[n],s[dex])==0 && page[n]<page[dex]) ){
dic[n][1]=look;
if(prev<0){first=n;}
else{dic[prev][1]=n;}
break;
}
... | main.c: In function 'main':
main.c:2:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
2 | while(scanf("%s %d",s[n],&page[n])!=EOF){
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | in... |
s124267984 | p00105 | C | #include<iostream>
#include<algorithm>
#include<string>
#include<map>
#include<vector>
using namespace std;
string str;
int n;
map<string, vector<int> > dict;
int main(){
while(cin >> str >> n){
dict[str].push_back(n);
}
map<string, vector<int> >::iterator it = dict.begin();
while(it != dict.end()){... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s734917024 | p00105 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
char word[ 31 ];
int cnt, page[ 100 ];
} Data;
Data data[ 100 ];
int compare1( const void *a, const void *b ) {
return *(int *)a - *(int *)b;
}
int compare2( const void *a, const void *b ) {
return strcmp( (*(Data *)a).word, (*(Data *)b... | main.c: In function 'main':
main.c:37:22: error: expected ')' before ';' token
37 | while ( i = 0; i < cnt; i++ ) {
| ~ ^
| )
|
s826722554 | p00105 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s327472819 | p00105 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s130257117 | p00105 | C++ | l
| a.cc:1:1: error: 'l' does not name a type
1 | l
| ^
|
s508533835 | p00105 | C++ | #include <iostream>
#include <string>
#include <map>
#include <vector>
using namespace std;
int main()
{
map<string, vector<int> > index;
vector<string> strv;
string s;
int p;
while (cin >> s >> p){
if (index.find(s) == index.end()){
strv.push_back(s);
}
index[s].push_back(p);
}
sort(strv.begin(), s... | a.cc: In function 'int main()':
a.cc:21:9: error: 'sort' was not declared in this scope; did you mean 'short'?
21 | sort(strv.begin(), strv.end());
| ^~~~
| short
|
s249281978 | p00105 | C++ | #include<cstdio>
#include<iostream>
#include<vector>
#include<map>
using namespace std;
int main() {
map<string, vector<int> > D;
string w;
int n;
while(cin >> w >> n) {
D[w].push_back(n);
}
map<string, vector<int> >::iterator it = D.begin();
for(; it != D.end(); it++) {
cout << it->first << endl;
int size... | a.cc: In function 'int main()':
a.cc:17:17: error: 'sort' was not declared in this scope; did you mean 'short'?
17 | sort(it->second.begin(),it->second.end());
| ^~~~
| short
|
s831264904 | p00105 | C++ | /*
0105:book Index
*/
#include <iostream>
#include <vector>
#include <utility>
#include <string>
using namespace std;
typedef pair<string, int> P_SI;
int main(void) {
string memstr = " ";
vector<P_SI> words;
while(1) {
string buf_s;
int buf_i;
cin >> buf_s >> buf_i;
if(cin.eof()) { break; }
words.... | a.cc: In function 'int main()':
a.cc:25:9: error: 'sort' was not declared in this scope; did you mean 'short'?
25 | sort( words.begin(), words.end() );
| ^~~~
| short
|
s303722982 | p00105 | C++ | //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <... | a.cc:25:10: fatal error: conio.h: No such file or directory
25 | #include <conio.h>
| ^~~~~~~~~
compilation terminated.
|
s162873383 | p00105 | C++ | //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <... | a.cc:25:10: fatal error: conio.h: No such file or directory
25 | #include <conio.h>
| ^~~~~~~~~
compilation terminated.
|
s591600657 | p00105 | C++ | //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <... | a.cc:25:10: fatal error: conio.h: No such file or directory
25 | #include <conio.h>
| ^~~~~~~~~
compilation terminated.
|
s400052737 | p00105 | C++ | //Name: Book Index
//Level: 2
//Category: やるだけ
//Note:
/**
* mapを使って語句とページ番号を管理すると、語句は勝手に昇順に並ぶ。
* ページ番号は出力時にソートする。
*
* オーダーは O(N|S| log N)。
* ただしNは語句の個数、|S|は語句の最大長。
*/
#include <iostream>
#include <string>
#include <vector>
#include <map>
using namespace std;
bool solve() {
string word;
int page;
m... | a.cc: In function 'bool solve()':
a.cc:29:9: error: 'sort' was not declared in this scope; did you mean 'short'?
29 | sort(begin(e.second), end(e.second));
| ^~~~
| short
|
s522459445 | p00105 | C++ | ??£??£??£??? | a.cc:1:3: error: extended character £ is not valid in an identifier
1 | ??£??£??£???
| ^
a.cc:1:6: error: extended character £ is not valid in an identifier
1 | ??£??£??£???
| ^
a.cc:1:9: error: extended character £ is not valid in an identifier
1 | ??£??£??£???
| ^
a.cc:1:1... |
s019729048 | p00105 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
#define SWAP(A, B) {int tmp = (B); (B) = (A); (A) = (tmp);}
int main() {
char word[100][31];
int pagenum[100];
int sortnum[100];
int count;
for (int i = 0; i < 100; i++)
sortnum[i] = i;
for (count = 0; cin >> word[count] >> pagenu... | a.cc: In function 'int main()':
a.cc:17:62: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'long int')
17 | for (count = 0; cin >> word[count] >> pagenum[count] != NULL; count++);
| ... |
s937936837 | p00105 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
int temp;
int k,page;
int i,flag=0;
int j,count=0;
string word;
string index[1000];
int num[1000][100];
int appe[1000][2];
memset(num,0,sizeof(num));
memset(appe,0,sizeof(appe));
for(i=0;i<1000;i++)
{
index[i]="";
... | a.cc: In function 'int main()':
a.cc:16:9: error: 'memset' was not declared in this scope
16 | memset(num,0,sizeof(num));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <vector>
+++ |+#include <cstri... |
s508604118 | p00105 | C++ | #include <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <func... | a.cc: In function 'int main()':
a.cc:54:21: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
54 | vector<index> book;
| ^
a.cc:54:21: note: expected a type, got 'index'
a.cc:54:21: error: template argumen... |
s883132711 | p00105 | C++ | #include <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <func... | a.cc: In function 'int main()':
a.cc:54:21: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
54 | vector<index> book;
| ^
a.cc:54:21: note: expected a type, got 'index'
a.cc:54:21: error: template argumen... |
s438189151 | p00105 | C++ | #include <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <func... | a.cc: In function 'int main()':
a.cc:54:21: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
54 | vector<index> book;
| ^
a.cc:54:21: note: expected a type, got 'index'
a.cc:54:21: error: template argumen... |
s216011510 | p00105 | C++ | #include<cstdio>
#include<map>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
int main(void)
{
map < string, vector<int> > index;
char cbuf[31];
int ibuf;
while (scanf_s("%s %d", cbuf, 31, &ibuf) != EOF)
{
index[cbuf].push_back(ibuf);
}
for (auto &elem : index)
{
sort(elem.sec... | a.cc: In function 'int main()':
a.cc:14:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
14 | while (scanf_s("%s %d", cbuf, 31, &ibuf) != EOF)
| ^~~~~~~
| scanf
a.cc:22:17: error: 'printf_s' was not declared in this scope; did you mean 'prin... |
s723783355 | p00105 | C++ | #include<stdio.h>
#include<map>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
int main(void)
{
map < string, vector<int> > index;
char cbuf[31];
int ibuf;
while (scanf_s("%s %d", cbuf, 31, &ibuf) != EOF)
{
index[cbuf].push_back(ibuf);
}
for (auto &elem : index)
{
sort(elem.se... | a.cc: In function 'int main()':
a.cc:14:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
14 | while (scanf_s("%s %d", cbuf, 31, &ibuf) != EOF)
| ^~~~~~~
| scanf
a.cc:22:17: error: 'printf_s' was not declared in this scope; did you mean 'prin... |
s016181878 | p00105 | C++ | import java.util.*;
import java.io.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Map<String, ArrayList<Integer>> map = new TreeMap<String, ArrayList<Integer>>();
ArrayList<Integer> page ;
while (sc.hasNext() ) {
String key = sc.next();
int pageIn = sc.next... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:15:... |
s689816826 | p00105 | C++ | #include <bits/stdc++.h>
using namespace std;
pair<string,int> a[100];
int main(){
int t=0,g;
string f,b;
while(cin>>a[t].first>>a[t].second)t++;
sort(a,a+t);
b=a[0].first
cout<<b<<endl<<a[0].second;
for(int i=1;i<t;i++){
bool n=0;
f=a[i].first,g=a[i].second;
if(i)if(f==b)n=1;
if(n)cout<<" "<<g;
else c... | a.cc: In function 'int main()':
a.cc:9:21: error: expected ';' before 'cout'
9 | b=a[0].first
| ^
| ;
10 | cout<<b<<endl<<a[0].second;
| ~~~~
|
s382557301 | p00105 | C++ | #include <bits/stdc++.h>using namespace std;pair<string,int> a[100];int main(){int t=0,g,i;string f,b;while(cin>>a[t].first>>a[t].second)t++;sort(a,a+t);b=a[0].first;cout<<b<<endl<<a[0].second;for(i=1;i<t;i++){bool n=0;f=a[i].first,g=a[i].second;if(i)if(f==b)n=1;if(n)cout<<" "<<g;else cout<<endl<<f<<endl<<g;b=f;}cout<<... | a.cc:1:31: warning: extra tokens at end of #include directive
1 | #include <bits/stdc++.h>using namespace std;pair<string,int> a[100];int main(){int t=0,g,i;string f,b;while(cin>>a[t].first>>a[t].second)t++;sort(a,a+t);b=a[0].first;cout<<b<<endl<<a[0].second;for(i=1;i<t;i++){bool n=0;f=a[i].first,g=a[i].second;if(i... |
s843207697 | p00105 | C++ | #include <bits/stdc++.h>
using namespace std;pair<string,int> a[];int main(){int t=0,g,i;while(cin>>a[t].first>>a[t].second)t++;sort(a,a+t);string f,b=a[0].first;cout<<b<<endl<<a[0].second;for(i=1;i<t;i++){bool n=0;f=a[i].first,g=a[i].second;if(f==b)n=1;if(n)cout<<" "<<g;else cout<<endl<<f<<endl<<g;b=f;}cout<<endl;retu... | a.cc:2:38: error: array size missing in 'a'
2 | using namespace std;pair<string,int> a[];int main(){int t=0,g,i;while(cin>>a[t].first>>a[t].second)t++;sort(a,a+t);string f,b=a[0].first;cout<<b<<endl<<a[0].second;for(i=1;i<t;i++){bool n=0;f=a[i].first,g=a[i].second;if(f==b)n=1;if(n)cout<<" "<<g;else cout<<endl<<f<<e... |
s412085276 | p00105 | C++ | #include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char const *argv[]){
vector<int> pages;
map<string, vector<int> > books;
string name;
int page;
while (cin>>name>>page){
auto it = books.find(name);
if (it != books.end(... | a.cc: In function 'int main(int, const char**)':
a.cc:28:9: error: 'sort' was not declared in this scope; did you mean 'short'?
28 | sort(book.second.begin(), book.second.end());
| ^~~~
| short
|
s074635298 | p00105 | C++ | #include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char const *argv[]){
vector<int> pages;
map<string, vector<int> > books;
string name;
int page;
while (cin>>name>>page){
auto it = books.find(name);
if (it != books.end(... | a.cc: In function 'int main(int, const char**)':
a.cc:28:9: error: 'sort' was not declared in this scope; did you mean 'short'?
28 | sort(book.second.begin(), book.second.end());
| ^~~~
| short
|
s281332126 | p00105 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
map<string,vector<int> >A;
string s;
int n;
while(cin>>s>>n){
A[s].push_back(n);
}
map<string,vector<int> >::iterator t=A.begin();
while(t!=A.end()){
cout<<t->first<<endl;
sort(t->second.begin(),t->second.end());
for(int i=0;i<size-... | a.cc: In function 'int main()':
a.cc:14:26: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
14 | for(int i=0;i<size-1i++){
| ~~^~
a.cc:14:28: error: expected ';' before ')' token
14 | for(int i=0;i<size-1i++){
| ^
| ... |
s717971707 | p00105 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
map<string,vector<int> >A;
string s;
int n;
while(cin>>s>>n){
A[s].push_back(n);
}
map<string,vector<int> >::iterator t=A.begin();
while(t!=A.end()){
cout<<t->first<<endl;
sort(t->second.begin(),t->second.end());
for(int i=0;i<SIZE-... | a.cc: In function 'int main()':
a.cc:14:19: error: 'SIZE' was not declared in this scope
14 | for(int i=0;i<SIZE-1i++){
| ^~~~
a.cc:14:26: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
14 | for(int i=0;i<SIZE-1i++){
| ~~^~
a.cc:14... |
s779555671 | p00105 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
map<string,vector<int> >A;
string s;
int n;
while(cin>>s>>n){
A[s].push_back(n);
}
map<string,vector<int> >::iterator t=A.begin();
while(t!=A.end()){
cout<<t->first<<endl;
sort(t->second.begin(),t->second.end());
for(int i=0;i<t->se... | a.cc: In function 'int main()':
a.cc:14:33: error: lvalue required as increment operand
14 | for(int i=0;i<t->second.size()++){
| ~~~~~~~~~~~~~~^~
a.cc:14:37: error: expected ';' before ')' token
14 | for(int i=0;i<t->second.size()++){
| ^
... |
s365917400 | p00105 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for( int i = 0; i < n; i++ )
#define dump(x) cerr << #x << " = " << (x) << endl;
#define INF 2000000000
#define mod 1000000007
#define INF2 1000000000000000000
vector<pair<string,int>> str(100000);
int main(void)
{
cin.tie(0);
... | a.cc: In function 'int main()':
a.cc:29:35: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<std::__cxx11::basic_string<char>, int> >, std::pair<std::__cxx11::basic_string<char>, int> >::value_type' {aka 'struct std::pair<std::__cxx11::basic_string<char>, int>'} has no member named 'secosnd'; did you mean 'se... |
s372356996 | p00105 | C++ | #include<vector>
#include<map>
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
map< string , vector<int> > mp;
string str;
int num;
while( cin>>str>>num ){
mp[ str ].push_back( num );
}
//for( pair<string,vector<int> > p : mp){
string name=p.first;
vector<int> v=... | a.cc: In function 'int main()':
a.cc:18:17: error: 'p' was not declared in this scope; did you mean 'mp'?
18 | string name=p.first;
| ^
| mp
a.cc: At global scope:
a.cc:31:3: error: expected unqualified-id before 'return'
31 | return 0;
| ^~~~~~
a.cc:32:1:... |
s585431501 | p00105 | C++ | #include <iostream>
#include <string>
#include <map>
#include <set>
using namespace std;
class data{
public:
string words;
int page;
bool operator < (const data& s)const{
if(words < s.words) return true;
else if(words > s.words) return false;
else{
if(page < s.page) return true;
else ret... | a.cc: In function 'int main()':
a.cc:21:3: error: reference to 'data' is ambiguous
21 | data in[1000];
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
... |
s257802891 | p00105 | C++ | #include <iostream>
#include <string>
using namespace std;
class data{
public:
string words;
int page;
bool operator < (const data& s)const{
if(words < s.words) return true;
else if(words > s.words) return false;
else{
if(page < s.page) return true;
else return false;
}
}
};
int ma... | a.cc: In function 'int main()':
a.cc:19:3: error: reference to 'data' is ambiguous
19 | data in[1000];
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
... |
s354410787 | p00105 | C++ | #include <iostream>
#include <string>
using namespace std;
class data{
public:
string words;
int page;
bool operator < (const data& s)const{
if(words < s.words) return true;
else if(words > s.words) return false;
else{
if(page < s.page) return true;
else return false;
}
}
};
int ma... | a.cc: In function 'int main()':
a.cc:19:3: error: reference to 'data' is ambiguous
19 | data in[1000];
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
... |
s319206973 | p00105 | C++ | #include <iostream>
#include <string>
using namespace std;
class data{
public:
string words;
int page;
bool operator < (const data&s)const{
if(words < s.words) return true;
else if(words > s.words) return false;
else{
if(page < s.page) return true;
else return false;
}
}
};
int mai... | a.cc: In function 'int main()':
a.cc:19:3: error: reference to 'data' is ambiguous
19 | data in[1000];
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
... |
s395065721 | p00105 | C++ | #include <iostream>
#include <string>
using namespace std;
class data{
public:
string words;
int page;
bool operator < (const data&s)const{
if(words < s.words) return true;
else if(words > s.words) return false;
else{
if(page < s.page) return true;
else return false;
}
}
};
int mai... | a.cc: In function 'int main()':
a.cc:19:3: error: reference to 'data' is ambiguous
19 | data in[1000];
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
... |
s069633117 | p00105 | C++ | #include<iostream>
#include<functional>
#include<string>
#include<map>
#include<queue>
#include<vector>
using namespace std;
typedef pair<string,int> P;
int main(){
string s,temp;
int x;
priority_queue<int,vector<int>,greater<int>()> que;
multimap<string,int> box;
while(cin>>s>>x,x)
box.insert(P(s,x));
box.inse... | In file included from /usr/include/c++/14/queue:66,
from a.cc:5:
/usr/include/c++/14/bits/stl_queue.h: In instantiation of 'class std::priority_queue<int, std::vector<int>, std::greater<int>()>':
a.cc:12:49: required from here
12 | priority_queue<int,vector<int>,greater<int>()> que;
... |
s197603791 | p00105 | C++ | style 12
even 25
introduction 3
easy 9
style 7
document 13
style 21
even 18 | a.cc:1:1: error: 'style' does not name a type
1 | style 12
| ^~~~~
|
s338669392 | p00105 | C++ | #include<cstdio>
#include<cmath>
#include<string>
#include<vector>
#include<queue>
using namespace std;
#define PSI pair<string,int>
vector<PSI> book;
int main(void){
int x;
char tmp[1024];
while(scanf("%s%d",tmp,&x)!=EOF){
string a;
a = tmp;
book.push_back(PSI(a,x));
}
sort(book.begin(),book.end());
... | a.cc: In function 'int main()':
a.cc:22:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
22 | sort(book.begin(),book.end());
| ^~~~
| sqrt
|
s270880319 | p00105 | C++ | int main(){
std::string s;
int p;
std::map<std::string,std::vector<int> > m;
while(std::cin>>s>>p,p!=0){
m[s].push_back(p);
}
std::map<std::string,std::vector<int> >::iterator m_it = m.begin();
while(m_it!=m.end()){
std::cout<<(*m_it).first<<std::endl;
std::vector<int> v = (*m_it).second;
... | a.cc: In function 'int main()':
a.cc:2:8: error: 'string' is not a member of 'std'
2 | std::string s;
| ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
+++ |+#include <string>
1 | int main(){
a.cc:4:8: error: 'map' is ... |
s465779207 | p00105 | C++ | #include<iostream>
#include<string>
#include<vector>
using namespace std;
class tWord{
public:
friend tWord;
string word;
vector<int> page;
tWord( string w );
friend bool operator <( const tWord& l, const tWord& r ){
return (strcmp(l.word.c_str(), r.word.c_str())<0);
}
};
tWord::tWord( string w ){
word = w;
... | a.cc:8:16: warning: class 'tWord' is implicitly friends with itself
8 | friend tWord;
| ^~~~~
a.cc: In function 'bool operator<(const tWord&, const tWord&)':
a.cc:13:25: error: 'strcmp' was not declared in this scope
13 | return (strcmp(l.word.c_str(), r.word.c_str())... |
s489653584 | p00105 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
class tWord{
public:
string word;
vector<int> page;
tWord( string w );
bool operator <( const tWord& r ){
return (strcmp(word.c_str(), r.word.c_str())<0);
}
};
tWord::tWord( string w ){
word = w;
page.clear();
}
int... | a.cc: In member function 'bool tWord::operator<(const tWord&)':
a.cc:13:25: error: 'strcmp' was not declared in this scope
13 | return (strcmp(word.c_str(), r.word.c_str())<0);
| ^~~~~~
a.cc:5:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable b... |
s730175605 | p00105 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <cstdio>
using namespace std;
string char_to_str(char *c) {
string ret = "";
for (; *c; ++c)
ret += *c;
return ret;
}
int main() {
map<string, vector<int> > m;
vector<string> words;
char word[50]; int page;
while (scanf("%s%d\n", word, &page) ... | a.cc: In function 'int main()':
a.cc:28:9: error: 'sort' was not declared in this scope; did you mean 'short'?
28 | sort( words.begin(), words.end() );
| ^~~~
| short
a.cc:29:22: error: 'unique' was not declared in this scope
29 | words.erase( unique( words.begin(), wor... |
s699367235 | p00105 | C++ | #include<iostream>
#include<map>
#include<string>
#include<vector>
#include<algorithm>
#include<set>
using namespace std;
int main(void){
string index;
int page;
map<string,set<int> >dic;
while(cin >> index >> page)
dic[index].insert(page);
map<string,set<int> >::iterator it = dic.begin();
for(;it !=... | a.cc: In function 'int main()':
a.cc:27:58: error: overloaded function with no contextual type information
27 | cout << (++its != (it->second).end() ? " " : endl);
| ^~~~
|
s611768109 | p00105 | C++ | int main(){
string a;
int b;
map<string,set<int> > kok;
map<string,set<int> >::iterator it;
while(cin >> a >> b){
it = kok.find(a);
if(it != kok.end())
it->second.insert(b);
else{
set<int> p;
p.insert(b);
kok[a] = p;
}
}
for(it=kok.begin(); it!=kok.end(); ++it){
... | a.cc: In function 'int main()':
a.cc:2:3: error: 'string' was not declared in this scope
2 | string a;
| ^~~~~~
a.cc:4:3: error: 'map' was not declared in this scope
4 | map<string,set<int> > kok;
| ^~~
a.cc:4:14: error: 'set' was not declared in this scope
4 | map<string,set<int> > ko... |
s326226377 | p00105 | C++ | #include <iostream>
#include <map>
#include <set>
#include <string>
using namespace std;
map<string,set<int>> p;
int main()
{
string str;
int t;
while (cin >> str >> t) p[str].insert(t);
for (auto it = p.begin(); it != p.end(); it++) {
cout << it->first << endl << it->second[0];
for (... | a.cc: In function 'int main()':
a.cc:15:49: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int')
15 | cout << it->first << endl << it->second[0];
| ^
a.cc:17:38: error: no match for 'operator[]' (operand types are 'std::set<int>... |
s589374751 | p00105 | C++ | #include <iostream>
#include <map>
#include <set>
#include <string>
using namespace std;
map<string,vector<int> > p;
int main()
{
string str;
int t;
while (cin >> str >> t) p[str].insert(t);
for (auto it = p.begin(); it != p.end(); it++) {
auto s = it->second.bigen();
cout << it->first << en... | a.cc:7:12: error: 'vector' was not declared in this scope
7 | map<string,vector<int> > p;
| ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
3 | #include <set>
+++ |+#include <vector>
4 | #include <string>
a.cc:7:... |
s905725104 | p00105 | C++ | #include <iostream>
#include <map>
#include <set>
#include <string>
using namespace std;
map<string,set<int>> p;
int main()
{
string str;
int t;
while (cin >> str >> t) p[str].insert(t);
for (auto it = p.begin(); it != p.end(); it++) {
auto s = it->second.bigen();
cout << it->first <<... | a.cc: In function 'int main()':
a.cc:15:29: error: 'class std::set<int>' has no member named 'bigen'
15 | auto s = it->second.bigen();
| ^~~~~
|
s629930769 | p00105 | C++ | #include <iostream>
#include <map>
#include <set>
#include <string>
using namespace std;
map<string,set<int>> p;
int main()
{
string str;
int t;
while (cin >> str >> t) p[str].insert(t);
for (auto it = p.begin(); it != p.end(); it++) {
auto s = it->second.bigen();
cout << it->first <<... | a.cc: In function 'int main()':
a.cc:15:29: error: 'class std::set<int>' has no member named 'bigen'
15 | auto s = it->second.bigen();
| ^~~~~
|
s413493168 | p00105 | C++ | #include<cstdio>
#include<map>
#include<vector>
#include<algorithm>
#include<string>
#include<iostream>
using namespace std;
int main(void)
{
map<string,vector<int> > index;
vector<string> name;
string key;
int page;
while((cin>>key>>page))
{
int flg=0;
for(int f1=0;f1<name.size();f1++)
{
if(name[f1]==ke... | a.cc:10:31: error: extended character is not valid in an identifier
10 | map<string,vector<int> > index;
| ^
a.cc: In function 'int main()':
a.cc:10:33: error: template argument 2 is invalid
10 | map<string,vector<int> > index;
| ... |
s028882186 | p00105 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<map>
#include<queue>
#include<algorithm>
using namespace std;
int main(){
string inWord, num;
map<string, string> word;
map<string, string>::iterator itr;
while(cin >> inWord >> " " >> num){
if(!word[inWord].empty()){
... | a.cc: In function 'int main()':
a.cc:15:25: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>' and 'const char [2]')
15 | while(cin >> inWord >> " " >> num){
| ~~~~~~~~~~~~~ ^~ ~~~
| | |
| | const char [2]
... |
s332494128 | p00106 | Java | mport java.util.Arrays;
import java.util.Scanner;
public class Main {
MyScanner sc = new MyScanner();
Scanner sc2 = new Scanner(System.in);
long start = System.currentTimeMillis();
long fin = System.currentTimeMillis();
final int MOD = 1000000007;
int[] dx = { 1, 0, 0, -1 };
int[] dy = { 0, 1, -1, 0 };
void r... | Main.java:1: error: class, interface, enum, or record expected
mport java.util.Arrays;
^
Main.java:2: error: class, interface, enum, or record expected
import java.util.Scanner;
^
2 errors
|
s179405290 | p00106 | Java | /*
* Copyright Narushima Hironori. All rights reserved.
*/
package aizuonlinejudge;
import java.io.*;
import java.util.*;
/**
* http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0106
*/
public class Calculator {
static class Shop {
int price, volume, discountedPrice, discountedPer;
public Shop(in... | Main.java:12: error: class Calculator is public, should be declared in a file named Calculator.java
public class Calculator {
^
1 error
|
s841635455 | p00106 | Java | /*
* Copyright Narushima Hironori. All rights reserved.
*/
package aizuonlinejudge;
import java.io.*;
import java.util.*;
/**
* http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0106
*/
public class Calculator {
static class Shop {
int price, volume, discountedPrice, discountedPer;
public Shop(in... | Main.java:12: error: class Calculator is public, should be declared in a file named Calculator.java
public class Calculator {
^
1 error
|
s844488933 | p00106 | Java | /*
* Copyright Narushima Hironori. All rights reserved.
*/
package aizuonlinejudge;
import java.io.*;
import java.util.*;
/**
* http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0106
*/
public class Calculator {
static class Shop {
int price, volume, discountedPrice, discountedPer;
public Shop(in... | Main.java:12: error: class Calculator is public, should be declared in a file named Calculator.java
public class Calculator {
^
1 error
|
s315111748 | p00106 | Java | /*
* Copyright Narushima Hironori. All rights reserved.
*/
import java.io.*;
/**
* http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0106
*/
public class BuckwheatCalculator {
static class Shop {
int price, volume, discountedPrice, discountPer;
Shop(int volume, int price, double discount, int p... | Main.java:9: error: class BuckwheatCalculator is public, should be declared in a file named BuckwheatCalculator.java
public class BuckwheatCalculator {
^
1 error
|
s622859157 | p00106 | Java | import java.io.IOException;
import java.util.Scanner;
public class AOJ0106 {
public static int[] A={200,380,5,20};
public static int[] B={300,550,4,15};
public static int[] C={500,850,3,12};
public static void main(String[] args)throws IOException{
Scanner scan = null;
try{
scan = new Scanner(System.in);
... | Main.java:5: error: class AOJ0106 is public, should be declared in a file named AOJ0106.java
public class AOJ0106 {
^
1 error
|
s822017739 | p00106 | C | #include <stdio.h>
/* ????????? */
#define U1 unsigned char
#define S4 int
#define U4 unsigned int
/* ??????????????? */
#define MAX_ITEMS (50)
#define END_MARK (0)
#define MAX_GRAM (5000)
#define MIN_GRAM (500)
#define UNIT (100) /* ?????????DP??????????????????????????????????????? */
#define DP_TABLE_WEIGHT_SIZE ... | main.c:18:7: error: type defaults to 'int' in declaration of 's4_g_buckwheat100Gram' [-Wimplicit-int]
18 | const s4_g_buckwheat100Gram[TABLE_SIZE] = { 2, 3, 5, 10, 12, 15 };
| ^~~~~~~~~~~~~~~~~~~~~
main.c:19:7: error: type defaults to 'int' in declaration of 's4_g_buckwheatPrice' [-Wimplicit-int]
19 |... |
s733540498 | p00106 | C | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(void)
{
int cost[3] = {380, 550, 850};
int weight[3] = {200, 300, 500};
int i, j;
int ans[5001];
memset(ans, -1, sizeof(ans));
ans[0] = 0;
for (i = 0; i < 3; i++){
for (j = 0; j + weight[i] <= 5000; j += 1... | main.c: In function 'main':
main.c:19:25: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
19 | if (min(ans[j + weight[i]], ans[j] + cost[i]) != ans[j + weight[i]]){
| ^~~
| main
|
s203119887 | p00106 | C | #include <strings.h>
#include <stdio.h>
#include <sys/limits.h>
int min;
int calc(int a, int b, int c) {
int ma = (a / 5) * 5 * 380 * 0.8 + (a % 5) * 380;
int mb = (b / 4) * 4 * 550 * 0.85 + (b % 4) * 550;
int mc = (c / 3) * 3 * 850 * 0.88 + (c % 3) * 850;
return ma + mb + mc;
}
void shopping(int amo... | main.c:3:10: fatal error: sys/limits.h: No such file or directory
3 | #include <sys/limits.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s542884813 | p00106 | C | a[6]={2,3,5,10,12,15},b[6]={380,550,850,1520,1870,2244},m[51],T;
int s(n){int d=5;if(m[n]>9998)for(;~d;d--)if(a[d]<=n){T=s(p,n-a[d])+b[d];if(m[n]>T)m[n]=T;}return m[n];}
main(n){for(n=1;n<51;n++)m[n]=9999;for(;scanf("%d",&n),n;)printf("%d\n",s(n/100));exit(0);} | main.c:1:1: warning: data definition has no type or storage class
1 | a[6]={2,3,5,10,12,15},b[6]={380,550,850,1520,1870,2244},m[51],T;
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:23: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
1 | ... |
s684302078 | p00106 | C | a[]={2,3,5,10,12,15},b[]={380,550,850,1520,1870,2244},m[51];main(n,d,T){for(n=1;++n<51;)for(m[n]=1e5,d=5;~d;d--)a[d]<=n&&m[n]>(T=m[n-a[d]]+b[d])&&m[n]=T;for(;~scanf("%d",&n);)n&&printf("%d\n",m[n/100]);} | main.c:1:1: warning: data definition has no type or storage class
1 | a[]={2,3,5,10,12,15},b[]={380,550,850,1520,1870,2244},m[51];main(n,d,T){for(n=1;++n<51;)for(m[n]=1e5,d=5;~d;d--)a[d]<=n&&m[n]>(T=m[n-a[d]]+b[d])&&m[n]=T;for(;~scanf("%d",&n);)n&&printf("%d\n",m[n/100]);}
| ^
main.c:1:1: error: type defaults... |
s841676832 | p00106 | C | #include<stdio.h>
int minof(int min,int y){
min=(min<y)?min:y;
return min;
}
int main(){
int min[51], g,i,j,k,l;
while(1){
scanf("%d",&g);
if(g==0){
break;
};
g/=100;
for(l=0;l<51;l+=1){
min[l]=100000;
};
for(i=0;i<26;i+=1){
for(j=0;j<17;j+= 1){
for(k=0;... | main.c: In function 'main':
main.c:30:3: error: expected declaration or statement at end of input
30 | return 0;
| ^~~~~~
|
s800653937 | p00106 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
#define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++)
#define rep(x,to) rep2(x,0,to)
int main() {
while(1) {
int m;
cin >> m;
if(m == 0) break;
m /= 100;
int ret = INT_MAX;
rep(i,m/2+1) {
rep(j,m/3+1) {
rep(k,m/5+1) {
if(i * 2 + j *... | a.cc: In function 'int main()':
a.cc:13:27: error: 'INT_MAX' was not declared in this scope
13 | int ret = INT_MAX;
| ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
2 | #include <cstdio>
... |
s161574311 | p00106 | C++ | #include<iostream>
#include<vector>
using namespace std;
struct soba{
double gram;
double yen;
soba(double g, double y){gram=g;yen=y;}
};
double n;
double min_y;
vector<soba> v;
void buy(double sum_g, double sum_y){
int len = v.size();
for(int i=0;i < len;i++){
if(sum_g == n){
min_y = min(min_y, sum_y);
... | a.cc: In function 'int main()':
a.cc:41:25: error: 'DBL_MAX' was not declared in this scope
41 | min_y = DBL_MAX;
| ^~~~~~~
a.cc:3:1: note: 'DBL_MAX' is defined in header '<cfloat>'; this is probably fixable by adding '#include <cfloat>'
2 | #include<vector>
+++ |+... |
s259566750 | p00106 | C++ | mport java.util.Arrays;
import java.util.Scanner;
public class Main {
MyScanner sc = new MyScanner();
Scanner sc2 = new Scanner(System.in);
long start = System.currentTimeMillis();
long fin = System.currentTimeMillis();
final int MOD = 1000000007;
int[] dx = { 1, 0, 0, -1 };
int[] dy = { 0, 1, -1, 0 };
void r... | a.cc:1:1: error: 'mport' does not name a type
1 | mport java.util.Arrays;
| ^~~~~
a.cc:2:1: error: 'import' does not name a type
2 | import java.util.Scanner;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
4 | p... |
s270814756 | p00106 | C++ | #include<iostream>
using nameaspace std;
//?????????
#define AG 200
#define BG 300
#define CG 500
//?????????
#define AM 380
#define BM 550
#define CM 850
//??????????????????
#define AN 5
#define BN 4
#define CN 3
//??????????????????
#define AP 20
#define BP 15
#define BP 12
int main(){
int g;
int a,b,c;
int tot... | a.cc:19:9: warning: "BP" redefined
19 | #define BP 12
| ^~
a.cc:18:9: note: this is the location of the previous definition
18 | #define BP 15
| ^~
a.cc:2:7: error: expected nested-name-specifier before 'nameaspace'
2 | using nameaspace std;
| ^~~~~~~~~~
a.cc: In functi... |
s748235936 | p00106 | C++ | #include<iostream>
using namespace std;
//?????????
#define AG 200
#define BG 300
#define CG 500
//?????????
#define AM 380
#define BM 550
#define CM 850
//??????????????????
#define AN 5
#define BN 4
#define CN 3
//??????????????????
#define AP 20
#define BP 15
#define BP 12
int main(){
int g;
int a,b,c;
int tota... | a.cc:19:9: warning: "BP" redefined
19 | #define BP 12
| ^~
a.cc:18:9: note: this is the location of the previous definition
18 | #define BP 15
| ^~
a.cc: In function 'int main()':
a.cc:40:99: error: 'CP' was not declared in this scope; did you mean 'CG'?
40 | work=(a... |
s389369224 | p00106 | C++ | #include <stdio.h>
#include <algorithm>
using namespace std;
int n, ret;
int main() {
while(true) {
scanf("%d", &n);
if(n == 0) break;
ret = 999999999;
for(int a = 0; a <= 13; a++) {
for(int b = 0; b <= 9; b++) {
for(int c = 0; c <= 5; c++) {
... | a.cc: In function 'int main()':
a.cc:15:136: error: expected ')' before ';' token
15 | ret = min(ret, (a / 5) * 1520 + (a % 5) * 380 + (b / 4) * 1870 * (b % 4) * 550 + (c / 3) * 2244 + (c % 3) * 850;
| ~ ... |
s741999877 | p00106 | C++ | ??¶???????????°???????????° | a.cc:1:3: error: extended character ¶ is not valid in an identifier
1 | ??¶???????????°???????????°
| ^
a.cc:1:15: error: extended character ° is not valid in an identifier
1 | ??¶???????????°???????????°
| ^
a.cc:1:27: error: extended character ° is not valid in an identifier
1 ... |
s094403220 | p00106 | C++ | 5 8 105
8 5 105
1 2 24
99 98 24
12 13 26
1 22 23
1 13 201
13 16 112
2 24 50
1 82 61
1 84 125
1 99 999
99 1 999
98 99 999
1 99 11
99 1 12
0 0 0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 5 8 105
| ^
|
s149006143 | p00106 | C++ | include <iostream>
#include <vector>
using namespace std;
#define MAXVALUE (1<<21)
vector<int> dp(5000+1,MAXVALUE);
void init(){
int item[6] = {200,300,500,1000,1200,1500};
int price[6]= {380,550,850,1520,1870,2244};
dp[0]=0;
for(int k=0;k<6;k++){
for(int i=0;i+item[k]<=5000;i++){
dp[i+item[k]] = min( dp[i... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/vector:62,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu... |
s610075934 | p00106 | C++ | #include <iostream>
int opts[6][2] = {{2, 380}, {3, 550}, {5, 850},
{10, 1520}, {12, 1870}, {15, 2244}};
int func(int qnt, int index, int subqnt, int subcost) {
if (qnt == subqnt) return subcost;
if (index < 0) return -1;
int i = (qnt - subqnt) / opts[index][0];
int min_cost = IN... | a.cc: In function 'int func(int, int, int, int)':
a.cc:10:20: error: 'INT_MAX' was not declared in this scope
10 | int min_cost = INT_MAX;
| ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
1 | #include <iostr... |
s782305957 | p00106 | C++ | #include<iostream>
using namespace std;
int main() {
while(1){
int n;
cin >> n;
if(n==0) break;
int min = 1000000;
int fee;
for(int a=0;a<=n/200+1;a++){
for(int b=0;b<=n/300+1;b++){
for(int c=0;c<=n/500+1;c++){
if(a*200+b*300+c*500==n){
fee=a*380+b*550+c*850;
... | a.cc: In function 'int main()':
a.cc:21:14: error: expected '}' at end of input
21 | }
| ^
a.cc:14:38: note: to match this '{'
14 | for(int c=0;c<=n/500+1;c++){
| ^
a.cc:21:14: error: expected '}' at end of input
21 | ... |
s452643311 | p00106 | C++ | #include <stdio.h>
#define MIN(a,b) ((a>b)? b:a)
#define INT_MAX (1<<22)
int dp[61];
int data[61];
int search(int remains){
if(dp[remains]) return data[remains];
if(remains == 0) return 0;
if(remains == 1) return INT_MAX;
int k=INT_MAX;
if(remains >= 15) k = MIN(k, search(remains-15)+2244);
if(remains ... | a.cc: In function 'int main()':
a.cc:46:20: error: expected '}' at end of input
46 | if(n==0) break;
| ^
a.cc:44:11: note: to match this '{'
44 | while(1){
| ^
a.cc:46:20: error: expected '}' at end of input
46 | if(n==0) break;
| ^
a.... |
s519664289 | p00106 | C++ | #include <iostream>
#include <algorithm>
#include <cstdlib>
using namespace std;
int main(){
int weight;
while(cin >> weight){
if(weight == 0) break;
int minimum_cost = INT_MAX;
for(int i = 0; (i-1) * 200 < weight; i++){
int w2 = weight - 200 * i;
for(int j = 0; (j-1) * 300 < w2; j++){
int w3 = w2 - ... | a.cc: In function 'int main()':
a.cc:10:36: error: 'INT_MAX' was not declared in this scope
10 | int minimum_cost = INT_MAX;
| ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
3 | #... |
s650553006 | p00106 | C++ | #include<iostream>
#define INF 10000000
using namespace std;
int main(){
int m[]={380,550,850,1520,1870,2244},dp[100010],
w[]={2,3,5,10,12,15};
for(int i=0;i<=100000;i++)
dp[i]=INF;
dp[0]=0;
for(int i=0;i<6;i++)
for(int j=w[i];j<=100000;j++){
//if(dp[j-w[i]]==INF)
//dp[j]=min(m[i],dp[j]);
//else
dp[j]=m... | a.cc: In function 'int main()':
a.cc:18:9: error: expected primary-expression before '}' token
18 | }
| ^
|
s776247749 | p00106 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
#define NUM 6
#define MAX 5000
struct Data{int weight,cost;};
int main()
{
int n;
int dp[MAX+1]={0};
Data item[NUM]={
{200,380},{300,550},{500,850},{1000,1520},{1200,1870},{1500,2244}
};
for(int j=0;j<=MAX;j++)dp[j]=INT_MAX>>2;
dp[0]=0;
for(i... | a.cc: In function 'int main()':
a.cc:14:32: error: 'INT_MAX' was not declared in this scope
14 | for(int j=0;j<=MAX;j++)dp[j]=INT_MAX>>2;
| ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
2 | #inclu... |
s461224533 | p00106 | C++ | #include <iostream>
using namespace std;
int main() {
int combi[100000][3] = {0},m=0;
int input,price[100000] = {0};
int a,b,c,a1,b1,c1;
while(cin >> input) {
if(input = 0) break;
for(int i=0;i<26;i++) {//generate combination of weight over input
for(int j=0;j<17;j++) {
for(int k=0;k<11;... | a.cc: In function 'int main()':
a.cc:34:5: error: 'sort' was not declared in this scope; did you mean 'short'?
34 | sort(price,price+m);
| ^~~~
| short
|
s380752076 | p00106 | C++ | #include <iostream>
using namespace std;
const int MAX_WEIGHT = 5000;
const int MIN_WEIGHT = 500;
struct Comodity{
int weight, price, unit;
double rate;
};
Comodity com_list[] = {
{ 200, 380, 5, 0.8 },
{ 300, 550, 4, 0.85 },
{ 500, 850, 3, 0.88 },
};
enum{
A,
B,
C,
};
int quantity( int remain, int unit_wei... | a.cc: In function 'int main()':
a.cc:46:34: error: 'INT_MAX' was not declared in this scope
46 | int best_price = INT_MAX;
| ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
1 | #incl... |
s638091023 | p00106 | C++ | #include <iostream>
#include <cmath>
using namespace std;
const int MAX_WEIGHT = 5000;
const int MIN_WEIGHT = 500;
struct Comodity{
int weight, price, unit;
double rate;
};
Comodity com_list[] = {
{ 200, 380, 5, 0.8 },
{ 300, 550, 4, 0.85 },
{ 500, 850, 3, 0.88 },
};
enum{
A,
B,
C,
};
int quantity( int rem... | a.cc: In function 'int main()':
a.cc:47:34: error: 'INT_MAX' was not declared in this scope
47 | int best_price = INT_MAX;
| ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
2 | #incl... |
s375517532 | p00106 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
const int inf = 999999;
int main()
{
int r = inf, w;
for(int i = 0; i <= 25; i++){
for(int j = 0; j <= 17; j++){
for(int k = 0; k <= 10; k++){
w = i*200+j*300+k*500;
if(n == w){
r = min(r, (i/5)*1520 + (i%5)*380 + 1870*(j/... | a.cc: In function 'int main()':
a.cc:16:8: error: 'n' was not declared in this scope
16 | if(n == w){
| ^
a.cc:23:4: error: expected '}' at end of input
23 | }
| ^
a.cc:9:1: note: to match this '{'
9 | {
| ^
|
s581219626 | p00106 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
const int inf = 999999;
int main()
{
int n;
int r = inf, w;
for(int i = 0; i <= 25; i++){
for(int j = 0; j <= 17; j++){
for(int k = 0; k <= 10; k++){
w = i*200+j*300+k*500;
if(n == w){
r = min(r, (i/5)*1520 + (i%5)*380 +... | a.cc: In function 'int main()':
a.cc:24:4: error: expected '}' at end of input
24 | }
| ^
a.cc:9:1: note: to match this '{'
9 | {
| ^
|
s199730607 | p00106 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
const int inf = 999999;
int func(int n)
{
int r = inf, w;
for(int i = 0; i <= 25; i++){
for(int j = 0; j <= 17; j++){
for(int k = 0; k <= 10; k++){
w = i*200+j*300+k*500;
if(n == w){
r = min(r, (i/5)*1520 + (i%5)*380 + ... | a.cc: In function 'int func(int)':
a.cc:24:4: error: expected '}' at end of input
24 | }
| ^
a.cc:9:1: note: to match this '{'
9 | {
| ^
a.cc:24:4: warning: no return statement in function returning non-void [-Wreturn-type]
24 | }
| ^
|
s387147158 | p00106 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
const int inf = 999999;
int func(int n;)
{
int r = inf, w;
for(int i = 0; i <= 25; i++){
for(int j = 0; j <= 17; j++){
for(int k = 0; k <= 10; k++){
w = i*200+j*300+k*500;
if(n == w){
r = min(r, (i/5)*1520 + (i%5)*380 +... | a.cc:8:15: error: expected ')' before ';' token
8 | int func(int n;)
| ~ ^
| )
a.cc:8:16: error: expected unqualified-id before ')' token
8 | int func(int n;)
| ^
|
s785627873 | p00106 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int grum[3]={200,300,500};
int val[3]={380,550,850};
double dis[3]={0.8,0.85,0.88};
int dis_c[3]={5,4,3};
int main()
{
int ans[5001];
for(int i = 500; i < 5100; i+=100)
{
ans[i]=INT_MAX;
for(int j = 0; j <= 25; ++j)
{
for(int k = 0; k <= 17; ++k)
{... | a.cc: In function 'int main()':
a.cc:14:24: error: 'INT_MAX' was not declared in this scope
14 | ans[i]=INT_MAX;
| ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
2 | #include<cmath>
+++ |+#... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.