submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s784372446
p00427
C
#include <stdio.h> #include <string.h> int main(void) { int i, j; int n, k, m, r; __int64 syou, amari; static int farray[10021], sum[10021]; while (1){ scanf("%d%d%d%d", &n, &k, &m, &r); if (n + k + m + r == 0){ break; } if (m == 0)...
main.c: In function 'main': main.c:8:5: error: unknown type name '__int64'; did you mean '__int64_t'? 8 | __int64 syou, amari; | ^~~~~~~ | __int64_t
s789580305
p00427
C++
import java.lang.*; import java.lang.Number.*; import java.math.*; import java.util.*; class RealNumber{ // a/b public BigInteger a; public BigInteger b; public RealNumber(BigInteger aa, BigInteger bb){ a = aa; b = bb; } public RealNumber(String sa, String sb){ a = new BigInteger(sa); b = new B...
a.cc:1:1: error: 'import' does not name a type 1 | import java.lang.*; | ^~~~~~ 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.lang.Number.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a...
s853678601
p00427
C++
import java.math.BigDecimal; import java.math.BigInteger; import java.util.*; class Main { class AOJ0504{ void run(){ Scanner sc=new Scanner(System.in); BigDecimal answer = new BigDecimal(1); BigDecimal one = new BigDecimal(1); int n = sc.nextInt(); int k = sc.nextInt(); int m = sc.nextInt(); in...
a.cc:1:1: error: 'import' does not name a type 1 | import java.math.BigDecimal; | ^~~~~~ 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.math.BigInteger; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmo...
s621608525
p00427
C++
#include <istream> using namespace std; int main(){ int n,m,r; char *s="%.0lf\n"; while(cin>>n>>r>>m>>r,n){ double k=1; if(m) for(m=n;--m;)k+=(double)1/m; s[2]='0'+r; printf(s,k/n); } }
a.cc: In function 'int main()': a.cc:5:17: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 5 | char *s="%.0lf\n"; | ^~~~~~~~~ a.cc:6:15: error: 'cin' was not declared in this scope 6 | while(cin>>n>>r>>m>>r,n){ | ^~~ a....
s397109221
p00427
C++
#include <iostream> using namespace std; int main(){ int n,m,r,t; char s[10]; strcpy(s,"%.0lf\n"); while(cin>>n>>t>>m>>r,n){ double k=1; if(m) for(m=n;--m;)k+=(double)1/m; s[2]='0'+r; printf(s,k/n); } }
a.cc: In function 'int main()': a.cc:6:9: error: 'strcpy' was not declared in this scope 6 | strcpy(s,"%.0lf\n"); | ^~~~~~ a.cc:2:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> ...
s346838418
p00427
C++
#include <iostream> #include <vector> using namespace std; const int MAX_R = 10000; const int MAX_N = 10000; const int MAX_K = 100; int n, k, m, r; int rest[MAX_N+1]; vector<int> num; vector<int> use; int trial; int success; bool is_success() { bool ret = true; for(int i=1; i<=n; i++) { if(rest[i] != 0) { ret...
a.cc: In function 'int main()': a.cc:73:17: error: 'memset' was not declared in this scope 73 | memset(rest, 0, sizeof(int)*MAX_K); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <vecto...
s439228014
p00427
C++
#inlucde <cstdio> #include <cstdlib> #include <iostream> #include <iomanip> #include <cstring> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) #define repa(i,s,e) for(int i=s; i<=e; i++) #define repd(i,s,e) for(int i=s; i>=e; i--) const int R_MAX = 100011; int n, k, m, r; int ans[R_MAX]; void add(int d)...
a.cc:1:2: error: invalid preprocessing directive #inlucde; did you mean #include? 1 | #inlucde <cstdio> | ^~~~~~~ | include
s274877161
p00428
Java
import java.util.Arrays; import java.util.Scanner; public class Main2 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); for (;;) { int m = sc.nextInt(), n = sc.nextInt(); if ((m | n) == 0) { break; } int[]...
Main.java:4: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error
s639006547
p00428
C
#include<stdio.h> int main() { int n,m,i,j,max; int k[1000][100]; int sum[100]; while(scanf("%d%d",&n,&m),n+m){ for(i=0;i<n;i++){ for(j=0;j<m;j++){ scanf("%d",&k[i][j]); } for(i=0;i<100;i++) sum[i]=0; for(j=0;j<m;j++){ for(i=0;i<n;i++){...
main.c: In function 'main': main.c:32:1: error: expected declaration or statement at end of input 32 | } | ^
s118583293
p00428
C
#include <stdio.h> int a,b,c[1000][1000],d[1000][2],e,i,j; int main(){ while(1){ scanf("%d %d",&a,&b); if(a==0&&b==0){ return 0; } for(i=0;i<a;i++){ for(j=0;j<b;j++){ scanf("%d",&c[i][j]); } } for(j=0;j<b;j++){ d[j][0]=0; d[j][1]=j; for(i=0;i<a;i++){ d[j][0]+=c[i][j]; } } ...
main.c: In function 'main': main.c:47:30: error: expected ')' before 'd' 47 | printf("%d\n"d[0][1]+1); | ~ ^ | )
s954603406
p00428
C
#include <stdio.h> int a,b,c[1000][1000],d[1000][2],e,i,j; int main(){ while(1){ scanf("%d %d",&a,&b); if(a==0&&b==0){ return 0; } for(i=0;i<a;i++){ for(j=0;j<b;j++){ scanf("%d",&c[i][j]); } } for(j=0;j<b;j++){ d[j][0]=0; d[j][1]=j; for(i=0;i<a;i++){ d[j][0]+=c[i][j]; } } ...
main.c: In function 'main': main.c:47:30: error: expected ')' before 'd' 47 | printf("%d\n"d[0][1]+1); | ~ ^ | )
s518597318
p00428
C
if(n==0&&m==0)break; for(i=0;i<100;i++){ b[i]=0; a[i]=i+1; }
main.c:1:5: error: expected identifier or '(' before 'if' 1 | if(n==0&&m==0)break; | ^~ main.c:2:5: error: expected identifier or '(' before 'for' 2 | for(i=0;i<100;i++){ | ^~~ main.c:2:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 2 | for(i=0;i...
s384147554
p00428
C
#include<stdio.h> struct ABC{ int p,r,no; }; int main() { for(;;){ int n,m,l,x,a; ABC d[100],s; for(n=0;n<100;n++){ d[n].r=n+1; d[n].no=n; d[n].p=0; } scanf("%d%d",&n,&l); if(n==0&&l==0) break; for(m=0;m<n;m++){ for(x=0;x<l;x++){ scanf("%d",&a); d[x].p+=a; } } for(m=0;m<l;m+...
main.c: In function 'main': main.c:9:17: error: unknown type name 'ABC'; use 'struct' keyword to refer to the type 9 | ABC d[100],s; | ^~~ | struct main.c:11:29: error: request for member 'r' in something not a structure or union 11 | ...
s073939698
p00428
C
#include <stdio.h> #include <stdlib.h> typedef struct { int no; int num; } place_t; int comp(const void* x,const void* y) { place_t* a=(place_t*)x; place_t* b=(place_t*)y; if(a.num>b.num)return 1; if(a.num<b.num)return -1; if(a.no>b.no)return 1; if(a.no<b.no)return -1; return 0; } int main(void) { place_t ...
main.c: In function 'comp': main.c:12:13: error: 'a' is a pointer; did you mean to use '->'? 12 | if(a.num>b.num)return 1; | ^ | -> main.c:12:19: error: 'b' is a pointer; did you mean to use '->'? 12 | if(a.num>b.num)return 1; | ^ |...
s881808320
p00428
C
#include <stdio.h> #include <stdlib.h> typedef struct { int no; int num; } place_t; int comp(const void* x,const void* y) { place_t* a=(place_t*)x; place_t* b=(place_t*)y; if(a->num>b->num)return 1; if(a->num<b->num)return -1; if(a->no>b->no)return 1; if(a->no<b->no)return -1; return 0; } int main(void) { ...
main.c: In function 'main': main.c:42:1: error: expected declaration or statement at end of input 42 | } | ^
s364802080
p00428
C
#include<stdio.h> int main(void){ int p[100],rank[100]; int n,m; int i,j; int tmp; while(1){ scanf("%d %d ",&n,&m); if(!n && !m)break; for(i=0;i<m;i++){ p[i] = 0; rank[i] = i; } for(i=0;i<n;i++){ for(j=0;j<m;j++){ scanf("%d ",&tmp); p[j] += tmp; ...
main.c:1:21: warning: extra tokens at end of #include directive 1 | #include<stdio.h> int main(void){ int p[100],rank[100]; int n,m; int i,j; int tmp; while(1){ scanf("%d %d ",&n,&m); if(!n && !m)break; for(i=0;i<m;i++){ p[i] = 0; rank[i] = i; } for(i=0;i<n;i++)...
s196896614
p00428
C
#include<stdio.h> #include<string.h> int main(){ while(1){ int n, m, results[100], i ,j; memset(rusults, 0, sizeof(results)); scanf("%d%d", &n, &m); if(n == 0 && m == 0)return 0; for(i = 0;i < n;i++){ for(j = 0;j < m;j++){ int k; scanf("%d", &k); results[j] += k; ...
main.c: In function 'main': main.c:6:12: error: 'rusults' undeclared (first use in this function); did you mean 'results'? 6 | memset(rusults, 0, sizeof(results)); | ^~~~~~~ | results main.c:6:12: note: each undeclared identifier is reported only once for each function it appea...
s555851522
p00428
C
#include <stdio.h> int main(void){ int i,j,n,m,result[100],h,rank[100]; for(i=0; i<100; i++){ result[i]=0; rank[i]=0; } scanf(“%d%d”,&n,&m); for(i=0; i<n; i++){ for(j=0; j<m; j++){ scanf(“%d”,&h); result[j]+=h; } } for(i=0; i<m; i++){ j=0; for(j=0; j<m; j++){ if(result[i]<result[j]){ j++...
main.c: In function 'main': main.c:8:15: error: stray '\342' in program 8 | scanf(<U+201C>%d%d<U+201D>,&n,&m); | ^~~~~~~~ main.c:8:16: error: expected expression before '%' token 8 | scanf(“%d%d”,&n,&m); | ^ main.c:8:20: error: stray '\342' in program ...
s893351614
p00428
C
#include <stdio.h> int main(void){ int i,j,n,m,result[100],h,rank[100]; for(i=0; i<100; i++){ result[i]=0; rank[i]=0; } scanf(“%d%d”,&n,&m); for(i=0; i<n; i++){ for(j=0; j<m; j++){ scanf(“%d”,&h); result[j]+=h; } } for(i=0; i<m; i++){ j=0; for(j=0; j<m; j++){ if(result[i]<result[j]){ } w...
main.c: In function 'main': main.c:8:15: error: stray '\342' in program 8 | scanf(<U+201C>%d%d<U+201D>,&n,&m); | ^~~~~~~~ main.c:8:16: error: expected expression before '%' token 8 | scanf(“%d%d”,&n,&m); | ^ main.c:8:20: error: stray '\342' in program ...
s237801078
p00428
C
#include <stdio.h> int main(void){ int i,j,n,m,result[100],h,rank[100]; for(i=0; i<100; i++){ result[i]=0; rank[i]=0; } scanf("%d%d",&n,&m); for(i=0; i<n; i++){ for(j=0; j<m; j++){ scanf("%d",&h); result[j]+=h; } } for(i=0; i<m; i++){ j=0; for(j=0; j<m; j++){ if(result[i]<result[j]){ } w...
main.c: In function 'main': main.c:33:1: error: expected declaration or statement at end of input 33 | } | ^
s315585166
p00428
C
#include <stdio.h> int main(void){ int i,j,n,m,result[100],h,rank[100]; scanf("%d%d",&n,&m); while(n!=0 || m!=0){ for(i=0; i<100; i++){ result[i]=0; rank[i]=0; } for(i=0; i<n; i++){ for(j=0; j<m; j++){ scanf("%d",&h); result[j]+=h; } } ...
main.c: In function 'main': main.c:36:1: error: expected declaration or statement at end of input 36 | } | ^
s317844804
p00428
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; int main() { while (1) { int n, m; cin >> n >> m; if (n == 0 && M == 0)break; int su[1200] = {}, hage[1200] = {}; for (int i = 0; i < n; i++) { for (int s = 0; s < m; s++) { int q; cin >> q; su[s] += q; ha...
a.cc: In function 'int main()': a.cc:13:31: error: 'M' was not declared in this scope 13 | if (n == 0 && M == 0)break; | ^
s330829045
p00428
C++
#include <utility> #include <algorithm> #include <iostream> using namespace std; int main(){ int N, M, v; pair<int,int> vote_area[110]; while (cin >> N >> M && N>0) { //ペアの初期化 for (int j = 0; j < M; ++i) { vote_area[j].first = 0; vote_area[j].second = j+1;/* code */ } for (int i =...
a.cc: In function 'int main()': a.cc:10:30: error: 'i' was not declared in this scope 10 | for (int j = 0; j < M; ++i) | ^
s060376997
p00428
C++
#include <utility> #include <algorithm> #include <iostream> using namespace std; int main(){ int N, M, v; pair<int,int> vote_area[110]; while (cin >> N >> M & M >0) { //ペアの初期化 for (int j = 0; j < M; ++j) { vote_area[j].first = 0; vote_area[j].second = j+1;/* code */ } for (int i =...
a.cc: In function 'int main()': a.cc:8:24: error: no match for 'operator&' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'bool') 8 | while (cin >> N >> M & M >0) { | ~~~~~~~~~~~~~ ^ ~~~~ | | | | ...
s136903632
p00428
C++
#include <utility> #include <algorithm> #include <iostream> using namespace std; int main(){ int N, M, v; pair<int,int> vote_area[110]; while (cin >> N >> M && M >0) { //ペアの初期化 for (int j = 0; j < M; ++j) { vote_area[j].first = 0; vote_area[j].second = j+1;/* code */ } for (int i ...
a.cc: In function 'int main()': a.cc:35:20: error: expected ';' before '}' token 35 | cout << " " | ^ | ; 36 | } | ~
s661250333
p00428
C++
#include <iostream> #include <vector> #include <utility> using namespace std; typedef pair<int, int> pii; bool greaterP(pii lhs, pii rhs) { if (lhs.first != rhs.first) { return lhs.first > rhs.first; } else { return lhs.second < rhs.second; } } int main(void) { int n, m; while (c...
a.cc: In function 'int main()': a.cc:35:9: error: 'sort' was not declared in this scope; did you mean 'short'? 35 | sort(Q.begin(), Q.end(), greaterP); | ^~~~ | short
s709329306
p00428
C++
#include <iostream> #include <vector> #include <map> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n,m; while(cin >> n >> m) { if((n|m) == 0) break; int a[n][m]; for(int i=0;i<n;i++) { for(int j=0;j<m;j++) { cin >> a[i][j]; } } vector< ...
a.cc: In function 'int main()': a.cc:31:5: error: 'sort' was not declared in this scope; did you mean 'short'? 31 | sort(q_res.begin(),q_res.end()); | ^~~~ | short
s848553865
p00428
C++
#include <iostream> bool comp(const std::pair<int, int>& firstElem, const std::pair<int, int>& secondElem) { return firstElem.second > secondElem.second; } int main() { int n, m; int temp; while(1) { std::cin >> n >> m; if (n == 0 && m == 0) break; std::pair<int, int> sums[100]; for (int j ...
a.cc: In function 'int main()': a.cc:24:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 24 | std::sort(std::begin(sums), std::end(sums), comp); | ^~~~ | qsort
s155675722
p00428
C++
#include <iostream> bool comp(const std::pair<int, int>& firstElem, const std::pair<int, int>& secondElem) { return firstElem.second > secondElem.second; } int main() { int n, m; int temp; while(1) { std::cin >> n >> m; if (n == 0 && m == 0) break; std::pair<int, int> sums[100]; for (int j ...
a.cc: In function 'int main()': a.cc:24:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 24 | std::sort(std::begin(sums), std::end(sums), comp); | ^~~~ | qsort
s914654381
p00428
C++
#include <iostream> bool comp(const std::pair<int, int>& firstElem, const std::pair<int, int>& secondElem) { return firstElem.second > secondElem.second; } int main() { int n, m; int temp; while(1) { std::cin >> n >> m; if (n == 0 && m == 0) break; std::pair<int, int> sums[100]; for (int j ...
a.cc: In function 'int main()': a.cc:24:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 24 | std::sort(std::begin(sums), std::end(sums), comp); | ^~~~ | qsort
s897367002
p00428
C++
#include <iostream> bool comp(const std::pair<int, int>& firstElem, const std::pair<int, int>& secondElem) { return firstElem.second > secondElem.second; } int main() { int n, m; int temp; while(1) { std::cin >> n >> m; if (n == 0 && m == 0) break; std::pair<int, int> sums[100]; for (int j ...
a.cc: In function 'int main()': a.cc:24:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 24 | std::sort(std::begin(sums), std::end(sums), comp); | ^~~~ | qsort
s460291880
p00428
C++
#include <iostream> bool comp(const std::pair<int, int>& firstElem, const std::pair<int, int>& secondElem) { return firstElem.second > secondElem.second; } int main() { int n, m; int temp; while(1) { std::cin >> n >> m; if (n == 0 && m == 0) break; std::pair<int, int> sums[100]; for (int j ...
a.cc: In function 'int main()': a.cc:24:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 24 | std::sort(std::begin(sums), std::end(sums), comp); | ^~~~ | qsort
s825118919
p00428
C++
using System; using System.Linq; namespace aizu { public class OnlineJudge { static void Main() { int[] input; while(((input = Console.ReadLine().Split().Select(p => int.Parse(p)).ToArray())[0] | input[1]) != 0) { var data = (from p in Enumerable.Range(1...
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.Linq; | ^~~~~~ a.cc:6:5: error: expected unqualified-id before 'public' 6 | public class OnlineJudge |...
s952810761
p00428
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; int check; while(cin>>n>>m,n+m!=0){ int num[100]={0}; for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ cin>>check; if(check==1) num[j]++; } } for(int j=n;j>=0;j--){ for(int i=0;i<m;i++){ if(num[i]==j) cout<<i+1<...
a.cc: In function 'int main()': a.cc:22:11: error: parse error in template argument list 22 | cout<<endl<endl; | ^~~~~~~~~ a.cc:22:9: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>') 22 | cout<<...
s020171853
p00428
C++
#include <iostream> #include <vector> #include <utility> bool compare(std::pair<int,int> x, std::pair<int,int> y){ return (x.first != y.first) ? x.first > y.first : x.second < y.second; } int n = 0, m = 0; int main(void){ int i = 0; int j = 0; std::vector< std::pair<int,int> > votes; int v = 0; ...
a.cc: In function 'int main()': a.cc:36:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 36 | std::sort(votes.begin(), votes.begin() + m, compare); | ^~~~ | qsort
s907456169
p00428
C++
#include <iostream> #include <vector> #include <utility> bool compare(std::pair<int,int> x, std::pair<int,int> y){ return (x.first != y.first) ? x.first > y.first : x.second < y.second; } int n = 0, m = 0; int main(void){ int i = 0; int j = 0; std::vector< std::pair<int,int> > votes; int v = 0; ...
a.cc: In function 'int main()': a.cc:36:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 36 | std::sort(votes.begin(), votes.begin() + m, compare); | ^~~~ | qsort
s618661553
p00428
C++
#include <iostream> #include <vector> #include <utility> bool compare(std::pair<int,int> x, std::pair<int,int> y){ return (x.first != y.first) ? x.first > y.first : x.second < y.second; } int n = 0, m = 0; int main(void){ int i = 0; int j = 0; std::vector< std::pair<int,int> > votes; int v = 0; ...
a.cc: In function 'int main()': a.cc:36:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 36 | std::sort(votes.begin(), votes.begin() + m, compare); | ^~~~ | qsort
s047014084
p00428
C++
#include<bits\stdc++.h> using namespace std; int main(void){ int n,m,cnt[101],b[101],i,j,temp,a; while(1){ cin>>n>>m; if(n==0&&m==0)break; for(i=1;i<=m;i++) cnt[i]=0,b[i]=i; for(i=0;i<n;i++){ for(j=1;j<=m;j++){ cin>>a; if(a==1) cnt[j]++; } } for(i=1;i<m;i++){ for(j=i+1;j<=m;j++){ if(c...
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s362454865
p00428
C++
#include<iostream> #include<vector> using namespace std; int n, m; int my_find(int val, int res[]) { for(int i = 0; i < m; i++){ if(res[i] == val){ return i; } } return 0; } int main() { int g, gab; int ank[1000][100]; int max, place; for(;;){ cin >> n; cin >> m; if(n == 0 && m == 0){ break;...
a.cc: In function 'int main()': a.cc:48:32: error: 'max_element' was not declared in this scope 48 | max = *max_element(result.begin(), result.end()); //‚±‚ÌŽž“_‚ł̍őå’l‚ðŒŸo | ^~~~~~~~~~~ a.cc:49:58: error: cannot convert 'std::vector<int...
s338259972
p00428
C++
#include<iostream> #include<vector> using namespace std; int n, m; int my_find(int val, int res[]) { for(int i = 0; i < m; i++){ if(res[i] == val){ return i; } } return 0; } int main() { int ank[1000][100]; int max, place; for(;;){ cin >> n; cin >> m; if(n == 0 && m == 0){ break; } vec...
a.cc: In function 'int main()': a.cc:45:32: error: 'max_element' was not declared in this scope 45 | max = *max_element(result.begin(), result.end()); //‚±‚ÌŽž“_‚ł̍őå’l‚ðŒŸo | ^~~~~~~~~~~ a.cc:46:58: error: cannot convert 'std::vector<int...
s744970531
p00428
C++
#include<iostream> #include<vector> using namespace std; int n, m; int my_find(int val, int res[]) { for(int i = 0; i < m; i++){ if(res[i] == val){ return i; } } return 0; } int main() { int ank[1000][100]; int max, place; vector<int> result_sort(m, 0); vector<int> result(m, 0); for(;;){ cin >> n;...
a.cc: In function 'int main()': a.cc:44:32: error: 'max_element' was not declared in this scope 44 | max = *max_element(result.begin(), result.end()); //‚±‚ÌŽž“_‚ł̍őå’l‚ðŒŸo | ^~~~~~~~~~~ a.cc:45:58: error: cannot convert 'std::vector<int...
s242462201
p00428
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int n, m; int my_find(int val, int res[]) { for(int i = 0; i < m; i++){ if(res[i] == val){ return i; } } return 0; } int main() { int ank[1000][100]; int max, place; vector<int> result_sort(m, 0); vector<int> result(m, 0); ...
a.cc: In function 'int main()': a.cc:46:58: error: cannot convert 'std::vector<int>::iterator' to 'int*' 46 | place = my_find(max, result.begin()); | ~~~~~~~~~~~~^~ | | | ...
s377960982
p00428
C++
#include<cstdio> #include<cstdlib> int main(){ int a,b,d; FILE *fp,*fq; fp=fopen("input.txt","r"); while(1){ fscanf(fp,"%d%d",&a,&b); if(a==0) break; int as[b]; for(int j=0;j<a;j++) for(int i=0;i<b;i++) { fscanf(fp,"%d",d); if(d) as[b]++; } } for(int i=0;i<b-1;i++) ...
a.cc: In function 'int main()': a.cc:22:12: error: 'as' was not declared in this scope; did you mean 'a'? 22 | if(as[i]<as[j]){ | ^~ | a a.cc:30:22: error: 'as' was not declared in this scope; did you mean 'a'? 30 | fprintf(fq,"%d ",as[i]); | ...
s702320255
p00428
C++
#include<stdio.h> typedef struct tagDATA { int num; int cnt; } DATA; int cmp(const void* a,const void* b); int cmp(const void* a,const void* b) { return (((DATA*)a)->cnt)-(((DATA*)b)->cnt); } int main(){ int n,m,i,j,t; DATA dat[100]; FILE *ip,*op; freopen("input.txt","r",ip); freopen("output.txt","a+",op); ...
a.cc: In function 'int main()': a.cc:39:17: error: 'qsort' was not declared in this scope 39 | qsort(&dat,m,sizeof(DATA),cmp); | ^~~~~
s182256911
p00428
C++
#include <iostream> #include <map> #include <set> #include <algorithm> #include <vector> using namespace std; int main(){ int n,m; while(cin >> n >> m && !(n == 0 && m == 0)){ vector<int> v(m,0); for(int i = 0; i < n; i++){ for(int j = 0; j < m; j++){ int p; cin >> p; if(p) v[j]++; } }...
a.cc:27:63: error: extended character   is not valid in an identifier 27 | sort(v2.begin(),v2.end(),greater<pair<int,int>ツ >()); | ^ a.cc: In function 'int main()': a.cc:27:67: error: template argument 1 is invalid 27 | ...
s838017295
p00428
C++
#include<iostream> #include<algorithm> #include<utility> using namespace std; bool operator<( const pair<int,int> &l, const pair<int,int> &r ){ return l.second < r.second; } int main(){ int n, m; while( cin >> n >> m, n||m ){ vector< pair<int, int> > res; res.resize(m); for( int i=0; i<m; i++ ){ res[i].fi...
a.cc: In function 'int main()': a.cc:13:17: error: 'vector' was not declared in this scope 13 | vector< pair<int, int> > res; | ^~~~~~ a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 3 | #include<utility> ...
s104343051
p00428
C++
#include<iostream> #include<vector> #include<algorithm> #include<utility> using namespace std; bool operator<( const pair<int,int> &l, const pair<int,int> &r ){ return l.second < r.second; } int main(){ int n, m; while( cin >> n >> m, n||m ){ vector< pair<int, int> > res; res.resize(m); for( int i=0; i<m; i+...
a.cc: In function 'int main()': a.cc:30:22: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'std::pair<int, int>'}) 30 | cout << res[0]; In ...
s850267028
p00428
C++
#include"functions.h" int n,m; int i,j; int req[100],no[100]; int d; void sort(int a[], int n,int b[]){ int x; for(i=n-1;i>0;i--){ for(j=0;j<i;j++){ if(a[j]>a[j+1]){ x=a[j]; a[j]=a[j+1]; a[j+1]=x; x=b[j]; b[j]=b[j+1]; b[j+1]=x; } else if(a[j]==a[j+1])if(b[j]<b[j+1]){ x=b[j]; ...
a.cc:1:9: fatal error: functions.h: No such file or directory 1 | #include"functions.h" | ^~~~~~~~~~~~~ compilation terminated.
s252443866
p00428
C++
#include"functions.h" int n,m; int i,j; int req[100],no[100]; int d; void sort(int a[], int n,int b[]){ int x; for(i=n-1;i>0;i--){ for(j=0;j<i;j++){ if(a[j]>a[j+1]){ x=a[j]; a[j]=a[j+1]; a[j+1]=x; x=b[j]; b[j]=b[j+1]; b[j+1]=x; } else if(a[j]==a[j+1])if(b[j]<b[j+1]){ x=b[j]; ...
a.cc:1:9: fatal error: functions.h: No such file or directory 1 | #include"functions.h" | ^~~~~~~~~~~~~ compilation terminated.
s004899345
p00428
C++
#include<stdio.h> int n,m; int i,j; int req[100],no[100]; int d; void sort(int a[], int n,int b[]){ int x; for(i=n-1;i>0;i--){ for(j=0;j<i;j++){ if(a[j]>a[j+1]){ x=a[j]; a[j]=a[j+1]; a[j+1]=x; x=b[j]; b[j]=b[j+1]; b[j+1]=x; } else if(a[j]==a[j+1])if(b[j]<b[j+1]){ x=b[j]; b[...
a.cc: In function 'int main()': a.cc:44:2: error: expected '}' at end of input 44 | } | ^ a.cc:28:11: note: to match this '{' 28 | int main(){ | ^
s780780537
p00428
C++
#include<iostream> using namespace std; int main(){ int n,m,a,b; int sum[100]; int big[100]; while(cin>>n>>m){ for(int i=0;i<100;i++){ sum[i]=0;} b=0; for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ cin>>a; sum[j]+=a;}} for(int i=1000;i>-1;i--){ for(int j=0;j<m;j++){ if(i==sum[j]){ if(b!=m-1){ cout<<j+1<<" ";} if(b==m-1){...
a.cc: In function 'int main()': a.cc:24:3: error: expected '}' at end of input 24 | }} | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s769919675
p00428
C++
#include <iostream> #include <algorithm> #include <functional> using namespace std; int main(){ int n; int m; int b; int c; int d; while(cin >>n){ cin >>m; if(n==0){break;} int a[m]; b=0; while(b<m){ a[b]=0; b=b+1;} b=0; while(b<n){ c=0; while(c<m){ cin >>d; if(d==1){a[c]=a[c]+1;} c=c+1;} b=b+1;} stable_sort(a.begin(),...
a.cc: In function 'int main()': a.cc:27:15: error: request for member 'begin' in 'a', which is of non-class type 'int [m]' 27 | stable_sort(a.begin(),a.end(),greater<int>() ); | ^~~~~ a.cc:27:25: error: request for member 'end' in 'a', which is of non-class type 'int [m]' 27 | stable_sort(a.be...
s599516606
p00428
C++
#include <stdio.h> int hyou[100]; void main() { int m,n; int zyuni[100]; FILE *fo,*fc; fo = fopen("input.txt","r"); fc = fopen("output.txt","w"); fscanf(fo,"%d %d",&m,&n); for(int i=0; i<m; i++){ for(int j=1; j<=n; j++){ int kari; fscanf(fo,"%d",&kari); hyou[j] += kari; } } for(int i=1;i<=n...
a.cc:5:1: error: '::main' must return 'int' 5 | void main() | ^~~~
s422112165
p00428
C++
#include <cstdio> int hyou[100]; int main() { int m,n; int zyuni[100];#include <cstdio> int hyou[100]; int main() { int m,n; int zyuni[100]; while(1){ scanf("%d %d",&m,&n); if(m==0&&n==0) break; for(int i=0; i<m; i++){ for(int j=1; j<=n; j++){ int kari; scanf("%d",&kari); hyou[j] += kari; } }...
a.cc:8:24: error: stray '#' in program 8 | int zyuni[100];#include <cstdio> | ^ a.cc: In function 'int main()': a.cc:8:25: error: 'include' was not declared in this scope 8 | int zyuni[100];#include <cstdio> | ^~~~~~~ a.cc:8:34: error: '...
s702790559
p00428
C++
#include<cstdio> #include<iostream> #include<algorithm> #include<string> using namespace std; int main(){ while(true){ int n, m, i ,j; int p[100]; for(i = 0; i < 100; i++) p[i] = -1; cin >> n >> m; if(!n) break; for(i = 0; i < n; i++){ for(j = 0; j < m; j ++){ int in...
a.cc: In function 'int main()': a.cc:29:11: error: expected primary-expression before 'else' 29 | else printf("\n"); | ^~~~
s190137064
p00428
C++
#include <stdio.h> #include <vector> #include <utility> #include <algorithm> #include <functional> using namespace std; struct int_pair_more { bool operator()(const pair<int,int>& x, const pair<int,int> return x.second > y.second; } }; vector<pair<int,int> > answer(100); int main() { while(1){ i...
a.cc:11:5: error: expected ',' or '...' before 'return' 11 | return x.second > y.second; | ^~~~~~ a.cc:11:31: error: expected ')' before ';' token 11 | return x.second > y.second; | ^ | ) a.cc:10:18: note: to match this '(' ...
s818287958
p00428
C++
z/********************************************** 1. 2.炭田高輝 3.sumita.takaki@gmail.com last updated: 2013-07-10@19:30 **********************************************/ #include<iostream> #include<algorithm> #include<sstream> #include<vector> #include<queue> #include<deque> #include<map> #include<set> #include<string> #...
a.cc:1:1: error: 'z' does not name a type 1 | z/********************************************** | ^ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41,...
s294326213
p00428
C++
while true do n, m = gets.split.map {|x| x.to_i } if n == 0 && m == 0 then break; end location = Hash.new{|h, k| h[k] = 0 } n.times do gets.split.map {|x| x.to_i }.each_with_index {|x, i| location[i+1] += x } end puts location.sort {|a,b| b[1] <=> a[1] }.map {|x| x[0] }.join ' ' end
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while true do | ^~~~~ a.cc:3:3: error: expected unqualified-id before 'if' 3 | if n == 0 && m == 0 then | ^~ a.cc:5:3: error: 'end' does not name a type 5 | end | ^~~ a.cc:7:3: error: 'n' does not name a type 7 | n.t...
s749471478
p00428
C++
#include <iostream> #include <functional> #include <map> #include <stack> #include <vector> #include <string> #include <algorithm> #include <math.h> #include <deque> using namespace std; int main() { vector<pair<int,int> > place; int n,m,count[101] = {1000},ans[1001][100]; while(1) { cin>>n>>m; if(n == 0 && m...
a.cc: In function 'int main()': a.cc:48:42: error: redeclaration of 'std::vector<std::pair<int, int> >::iterator it' 48 | vector<pair<int,int> >::iterator it = place.begin(); | ^~ a.cc:41:42: note: 'std::vector<std::pair<int, int> >::iterator it' previously decl...
s255369221
p00429
Java
public class Main { public static void main(String[] args)throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); while(true){ String line[] = br.readLine().split(" "); int n = Integer.parseInt(line[0]); if(n==0){break;} String answer = br.readLine().split(" ")[0]...
Main.java:2: error: cannot find symbol public static void main(String[] args)throws IOException { ^ symbol: class IOException location: class Main Main.java:3: error: cannot find symbol BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ ...
s883422312
p00429
Java
public class Q_0506 { public static void main(String[] args){ if(args.length < 2){ System.err.println("too few argument"); return; } String numCode = args[1]; for(int i=0; i<Integer.parseInt(args[0])...
Main.java:1: error: class Q_0506 is public, should be declared in a file named Q_0506.java public class Q_0506 { ^ 1 error
s252399558
p00429
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Main { public static void main(String[] args){ try{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); while(true){ ...
Main.java:18: error: cannot find symbol }catch(StackOverFlowException e){ ^ symbol: class StackOverFlowException location: class Main 1 error
s661120906
p00429
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Main { public static void main(String[] args){ try{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); while(true){ ...
Main.java:18: error: cannot find symbol }catch(StackOverFlowError e){ ^ symbol: class StackOverFlowError location: class Main 1 error
s160470905
p00429
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Main { public static void main(String[] args){ StringBuilder result = new StringBuilder(); try{ BufferedReader in = new BufferedReader(new InputStrea...
Main.java:42: error: illegal character: '\' }\ ^ Main.java:42: error: reached end of file while parsing }\ ^ 2 errors
s180578758
p00429
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Main { public static void main(String[] args){ StringBuilder result = new StringBuilder(); bool flag = false; try{ BufferedReader in = new BufferedRe...
Main.java:8: error: cannot find symbol bool flag = false; ^ symbol: class bool location: class Main 1 error
s184766315
p00429
C
#include <cstdio> #include <iostream> typedef struct { char number; char num; } NUMBER; NUMBER N[2048]; using namespace std; int main() { char str[2048]; int n; while (cin >> n, n){ cin >> str; memset(N, 0, sizeof(N)); for (int c = 0; c < n; c++){ int i = 0; int j = 0; while (str[i] != '...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s124454873
p00429
C
#include<stdio.h> int main(void){ int n,i,j,count; char s[101],t[101]; while(scanf("%d".&n),n){ count=0; scanf("%s",s); while(n--){ for(i=0;s[i]!='\0';i++){ for(j=0;s[i]==s[j];j++); if(j>99){ t[count++]=j/100; j%=100; t[count++]=j/10; j%=10; t[count++]=j; t[count++]=s...
main.c: In function 'main': main.c:7:26: error: expected identifier before '&' token 7 | while(scanf("%d".&n),n){ | ^
s007710073
p00429
C
#include <stdio.h> #include <string.h> ?? int main(void) { ????int n; ????char s[364364], tmp[364364], res[364364]; ????int i, j; ????int cnt, len; ?? ????while (scanf("%d", &n), n){ ????????scanf("%s", s); ????????for (i = 0; i < n; i++){ ????????????cnt = 1; ????????????*res = '\0'; ????????????len = strlen(s); ?????...
main.c:3:1: error: expected identifier or '(' before '?' token 3 | ?? | ^
s076227493
p00429
C
char*p,s[9999],t[9999];c,l,i;main(n){for(;scanf("%d",&n)*n;puts(s))for(scanf("%s",s);n--;strcpy(s,t))for(c=*s,p=t,l=i=0;c;c=s[i])sprintf(p,"%d%c",++l,c),s[++i]-c?p=t+strlen(t,l=0):0;}
main.c:1:24: warning: data definition has no type or storage class 1 | char*p,s[9999],t[9999];c,l,i;main(n){for(;scanf("%d",&n)*n;puts(s))for(scanf("%s",s);n--;strcpy(s,t))for(c=*s,p=t,l=i=0;c;c=s[i])sprintf(p,"%d%c",++l,c),s[++i]-c?p=t+strlen(t,l=0):0;} | ^ main.c:1:24: error: type def...
s044275021
p00429
C
#include <stdio.h> #include <string.h> int main(){ for(;;){ char str[100000],strcopy[100000]; int a,b=0,sum=1,leng; scanf("%d",&a); if(a==0) break; scanf("%s",str); leng=strlen(str); for(j=0;j<a;j++){ for(i=1;i<strlen(str);i++){ if(str[i-1]==str[i]){ sum++; }else{ ...
main.c: In function 'main': main.c:11:9: error: 'j' undeclared (first use in this function) 11 | for(j=0;j<a;j++){ | ^ main.c:11:9: note: each undeclared identifier is reported only once for each function it appears in main.c:12:9: error: 'i' undeclared (first use in this function) 12 | for(...
s189620806
p00429
C
#include<stdio.h> #include<string.h> char StrCount(); main(void){ int i = 0, m, num, cnt = 0; char str[100], target; scanf("%d", &num); scanf("%s", str); for( ; num > 0; num--){ str = StrCount(str); } return 0; } char StrCount(char str[100]){ int i =0, m, cnt = ...
main.c:6:1: error: return type defaults to 'int' [-Wimplicit-int] 6 | main(void){ | ^~~~ main.c: In function 'main': main.c:14:13: error: assignment to expression with array type 14 | str = StrCount(str); | ^ main.c: In function 'StrCount': main.c:30:32: error: passing argument 2 ...
s751035859
p00429
C
#include<stdio.h> #include<string.h> char StrCount(); main(void){ int num; char str[100]; scanf("%d", &num); scanf("%s", str); for( ; num > 0; num--){ str = StrCount(str); } return 0; } char StrCount(char str[100]){ int i =0, m, cnt = 0; char target,restr[] ...
main.c:6:1: error: return type defaults to 'int' [-Wimplicit-int] 6 | main(void){ | ^~~~ main.c: In function 'main': main.c:14:13: error: assignment to expression with array type 14 | str = StrCount(str); | ^ main.c: In function 'StrCount': main.c:30:23: error: assignment to expre...
s941212689
p00429
C++
#include <iostream> #include <string> #include <sstream> using namespace std; typedef stringstream ss; template<class T> inline string toStr(T f){ ss sss; sss << f; return sss.str(); } int main(){ int n; while(cin >> n, n){ string now, prev; cin >> prev; for(int i = 0; i < n; i++){ int cnt; ...
a.cc: In function 'int main()': a.cc:28:4: error: expected '}' at end of input 28 | } | ^ a.cc:9:11: note: to match this '{' 9 | int main(){ | ^
s883488551
p00429
C++
#include <cstdio> #include <iostream> typedef struct { char number; char num; } NUMBER; NUMBER N[2048]; using namespace std; int main() { char str[2048]; int n; while (cin >> n, n){ cin >> str; memset(N, 0, sizeof(N)); for (int c = 0; c < n; c++){ int i = 0; int j = 0; while (str[i] != '...
a.cc: In function 'int main()': a.cc:21:17: error: 'memset' was not declared in this scope 21 | memset(N, 0, sizeof(N)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <iostream> +++ ...
s068368047
p00429
C++
#include<iostream> #include<string> #include<sstream> using namespace std; int main(){ string str1; int n =0; while(1){ cin >> n; if(n == 0) break; cin >> str1; stringstream ss; char num = str1[0]; for(int i = 0; i< n; i++){ int count = 1; for(int j = 0; j< str1.length()...
a.cc: In function 'int main()': a.cc:20:12: error: 'figure' was not declared in this scope 20 | if(figure == str[j]) count++; | ^~~~~~ a.cc:20:22: error: 'str' was not declared in this scope; did you mean 'str1'? 20 | if(figure == str[j]) count++; | ^~~ ...
s938657829
p00429
C++
#include<iostream> using namespace std; char words[21][100000],words2[100000][101],result[100][100000]; int n, counter, counter2; int main() { for (;;) { cin >> n; if (n == 0) { break; } counter++; cin >> words[0]; int i = 0; for (int a = 0; a < n; a++) { for (int b = 0;; b++) { ...
a.cc: In function 'int main()': a.cc:31:41: error: '_itoa_s' was not declared in this scope 31 | _itoa_s(counter2, words2[i], 10); | ^~~~~~~
s900073746
p00429
C++
#include<iostream> #include<stdlib.h> using namespace std; char words[21][100000],words2[100000][101],result[100][100000]; int n, counter, counter2; int main() { for (;;) { cin >> n; if (n == 0) { break; } counter++; cin >> words[0]; int i = 0; for (int a = 0; a < n; a++) { for (int b =...
a.cc: In function 'int main()': a.cc:32:41: error: '_itoa_s' was not declared in this scope 32 | _itoa_s(counter2, words2[i], 10); | ^~~~~~~
s163282527
p00429
C++
#include<iostream> #include<stdlib.h> using namespace std; char words[21][100000],words2[100000][101],result[100][100000]; int n, counter, counter2; int main() { for (;;) { cin >> n; if (n == 0) { break; } counter++; cin >> words[0]; int i = 0; for (int a = 0; a < n; a++) { for (int b =...
a.cc: In function 'int main()': a.cc:32:41: error: 'itoa' was not declared in this scope 32 | itoa(counter2, words2[i], 10); | ^~~~
s330141471
p00429
C++
#include<iostream> #include<stdlib.h> using namespace std; char words[21][100000],words2[100000][101],result[100][100000]; int n, counter, counter2; int main() { for (;;) { cin >> n; if (n == 0) { break; } counter++; cin >> words[0]; int i = 0; for (int a = 0; a < n; a++) { for (int b =...
a.cc: In function 'int main()': a.cc:32:41: error: '_itoa_s' was not declared in this scope 32 | _itoa_s(counter2, words2[i], 10); | ^~~~~~~
s568425314
p00429
C++
#include<iostream> #include<stdlib.h> #include <string.h> using namespace std; char words[21][100000],words2[100000][101],result[100][100000]; int n, counter, counter2; int main() { for (;;) { cin >> n; if (n == 0) { break; } counter++; cin >> words[0]; int i = 0; for (int a = 0; a < n; a++)...
a.cc: In function 'int main()': a.cc:33:41: error: '_itoa_s' was not declared in this scope 33 | _itoa_s(counter2, words2[i], 10); | ^~~~~~~
s370937582
p00429
C++
#include<iostream> #include<stdlib.h> #include <string.h> using namespace std; char words[21][100000],words2[100000][101],result[100][100000]; int n, counter, counter2; int main() { for (;;) { cin >> n; if (n == 0) { break; } counter++; cin >> words[0]; int i = 0; for (int a = 0; a < n; a++)...
a.cc: In function 'int main()': a.cc:33:41: error: '_itoa_s' was not declared in this scope 33 | _itoa_s(counter2, words2[i], 10); | ^~~~~~~
s375392077
p00429
C++
#include<iostream> using namespace std; char words[21][1000000],words2[1000000][101],result[100][1000000]; int n, counter, counter2; int main() { for (;;) { cin >> n; if (n == 0) { break; } counter++; cin >> words[0]; int i = 0; for (int a = 0; a < n; a++) { for (int b = 0;; b++) { ...
a.cc: In function 'int main()': a.cc:31:41: error: '_itoa_s' was not declared in this scope 31 | _itoa_s(counter2, words2[i], 10); | ^~~~~~~
s613101551
p00429
C++
#include<bits/stdc++.h> #define range(i,a,b) for(int i = (a); i < (b); i++) #define rep(i,b) range(i,0,b) #define pb(a) push_back(a) #define all(a) (a).begin(), (a).end() #define debug(x) cout << "debug " << x << endl; using namespace std; string solve(string s){ int count = 1; string r; rep(i,s.size() - 1...
a.cc: In function 'std::string solve(std::string)': a.cc:16:14: error: no match for 'operator+=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::basic_ostream<char>') 16 | r+= In file included from /usr/include/c++/14/string:54, from /usr/include/c++/1...
s591608655
p00429
C++
#include <iostream> #include <sstream> #include <string> #include <cstdlib> using namespace std; int main() { int n, b = 0, c = 0; string Istr, Ostr; char chi; ostringstream oss; char ch; cin >> n; do { cin >> Istr; while (n--) { for (int i = 0; i < (int)Istr.size();) { ch = Istr[i]; for (int j =...
a.cc: In function 'int main()': a.cc:30:33: error: 'itoa' was not declared in this scope 30 | itoa(b, &chi, 10); | ^~~~
s722904652
p00429
C++
#include <iostream> #include <string> using namespace std; template < typename T > std::string to_string(const T& n) { std::ostringstream stm; stm << n; return stm.str(); } int main() { int n, b = 0, c = 0; string Istr, Ostr; char ch; cin >> n; do { cin >> Istr; while (n--) { for (int i = 0; i < (int)Ist...
a.cc: In function 'std::string to_string(const T&)': a.cc:6:28: error: 'stm' has incomplete type 6 | std::ostringstream stm; | ^~~ In file included from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/1...
s401462524
p00429
C++
#include <iostream> #include <ostream> #include <string> using namespace std; template < typename T > std::string to_string(const T& n) { std::ostringstream stm; stm << n; return stm.str(); } int main() { int n, b = 0, c = 0; string Istr, Ostr; char ch; cin >> n; do { cin >> Istr; while (n--) { for (int ...
a.cc: In function 'std::string to_string(const T&)': a.cc:7:28: error: 'stm' has incomplete type 7 | std::ostringstream stm; | ^~~ In file included from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/1...
s457568462
p00429
C++
#include <iostream> #include <ostringstream> #include <string> using namespace std; template < typename T > std::string to_string(const T& n) { std::ostringstream stm; stm << n; return stm.str(); } int main() { int n, b = 0, c = 0; string Istr, Ostr; char ch; cin >> n; do { cin >> Istr; while (n--) { for...
a.cc:2:10: fatal error: ostringstream: No such file or directory 2 | #include <ostringstream> | ^~~~~~~~~~~~~~~ compilation terminated.
s125998271
p00429
C++
#include <iostream> #include <fstream> #include <cstdlib> #include <vector> using namespace std; vector<int> func(vector<int> s); int main(){ ifstream in("input.txt"); int n; vector<int> s; in >> n; char c; while(in>>c){ s.push_back(atoi(c)); } for(int i=0; i<n; i++){ s =...
a.cc: In function 'int main()': a.cc:14:26: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 14 | s.push_back(atoi(c)); | ^ | | | char In file included from /usr/include/c++/14/cstdlib:79, ...
s403694012
p00429
C++
#include "stdafx.h" #include<iostream> #include<string> using namespace std; int main() { int n; string s; while (cin >> n, n) { cin >> s; for (int x = 0;x < n;x++) { s += '@'; string sg=""; char now = s[0]; int ko = 0; for (int i = 0;i < s.size();i++) { if (s[i] == now)ko++; else { ...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s344983316
p00429
C++
#include<iostream> #include<deque> int n; int ToStr(int str[]); int str_max; using namespace std; int main() { char str[101]; int i; int str_int[101]; for(;;){ cin >> n; if(n == 0){ break; } cin >> str; for(i = 0; str[i] != '\0'; i++){ str_int[i] = (char)str[i]; } for(i = 0; str[i] != '\0'; i++){ ...
a.cc: In function 'int main()': a.cc:29:19: error: 'strlen' was not declared in this scope 29 | str_max = strlen(str); | ^~~~~~ a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<deque> +++ |+#include <...
s850555960
p00429
C++
/* ƒvƒƒOƒ‰ƒ€’†‚Ì–³‘Ê‚Ècout‚͏Á‚µ‚Ü‚µ‚傤 */ #include<iostream> #include<deque> #include<string.h> #include<windows.h> int n; int ToStr(int str[]); int str_max; using namespace std; int main() { char str[101]; int i; int str_int[101]; for(;;){ cin >> n; if(n == 0){ break; } cin >> str; for(i = 0; str[...
a.cc:8:9: fatal error: windows.h: No such file or directory 8 | #include<windows.h> | ^~~~~~~~~~~ compilation terminated.
s325949664
p00429
C++
char s[65536],t[65536]; int n,i,r,w,c,a; int main() { while(scanf("%d",&n),n){ scanf("%s",s); for(i=0;i<n;++i){ r=w=0; while(r<strlen(s)){ a=s[r]; for(c=0;s[r+c]==a;++c); sprintf(t+w,"%d\0",c); while(t[++w]); t[w++]=a; r+=c; } t[w]=0; strcpy(s,t); } puts(s); } exit(0); ...
a.cc: In function 'int main()': a.cc:5:15: error: 'scanf' was not declared in this scope 5 | while(scanf("%d",&n),n){ | ^~~~~ a.cc:9:33: error: 'strlen' was not declared in this scope 9 | while(r<strlen(s)){ | ^~~~~~ a.cc:...
s679922652
p00429
C++
char s[65536],t[65536];main(n,i,r,w,c){for(;scanf("%d",&n),n;puts(s))for(i=!scanf("%s",s);i++<n;t[w]=0,strcpy(s,t))for(r=w=0;r<strlen(s);t[w++]=s[r],r+=c){for(c=0;s[++c+r]==s[r];);for(sprintf(t+w,"%d\0",c);t[++w];);}}
a.cc:1:28: error: expected constructor, destructor, or type conversion before '(' token 1 | char s[65536],t[65536];main(n,i,r,w,c){for(;scanf("%d",&n),n;puts(s))for(i=!scanf("%s",s);i++<n;t[w]=0,strcpy(s,t))for(r=w=0;r<strlen(s);t[w++]=s[r],r+=c){for(c=0;s[++c+r]==s[r];);for(sprintf(t+w,"%d\0",c);t[++w];);}} ...
s657514132
p00429
C++
#include<cstdio> #include<iostream> #include<string> #include<cstring> #include<sstream> using namespace std; int main(){ int n,num,cont,v; string a,nex; stringstream ss; char a[100]; while(1){ scanf("%d",&n); if(n==0){break;} cin>>a; for(int i=0;i<n;i++){ cont=0; while(1){ if(...
a.cc: In function 'int main()': a.cc:13:38: error: conflicting declaration 'char a [100]' 13 | char a[100]; | ^ a.cc:11:24: note: previous declaration as 'std::string a' 11 | string a,nex; | ^ a...
s782012216
p00429
C++
#include<cstdio> #include<iostream> #include<string> #include<cstring> #include<sstream> #include<cstdlib> using namespace std; int main(){ int n,num,cont,v; string a,nex; stringstream ss; char bin[100]; while(1){ scanf("%d",&n); if(n==0){break;} cin>>a; for(int i=0;i<n;i++){ cont=0; ...
a.cc: In function 'int main()': a.cc:39:33: error: 'itoa' was not declared in this scope 39 | itoa(v,bin,10); | ^~~~
s385416119
p00429
C++
#include<iostream> using namespace std; const unsigned int N = 10000000; char s[N]; int n; void erace(){ for(int i=0; i<N; i++) if(s[i]=='\0') break; s[i] = '\0'; } void copy(char *a){ for(int i=0; i<N; i++){ a[i] = s[i]; if(s[i]=='\0') break; } } void solve(){ if(n==0) return; char a[N]; copy...
a.cc: In function 'void erace()': a.cc:12:19: error: 'i' was not declared in this scope 12 | s[i] = '\0'; | ^
s292918618
p00429
C++
#include <iostream> #include <algorithm> #include <string> using namespace std; int f(string); int main() { int n; string str; for(;;){ cin>>n; if(n == 0) break; cin>>str; for(int i = 0; i < n; i++){ string ans; for(int j = 0; j < str.size();){ char buf[1024]; int len = f(str.substr(j)); sp...
a.cc: In function 'int main()': a.cc:20:33: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'? 20 | sprintf_s(buf, "%d%c", len, str.at(j)); | ^~~~~~~~~ | sprintf
s817982396
p00429
C++
#include <iostream> #include <algorithm> #include <string> using namespace std; int f(string); int main() { int n; string str; for(;;){ cin>>n; if(n == 0) break; cin>>str; for(int i = 0; i < n; i++){ string ans; for(unsigned int j = 0; j < str.size();){ char buf[1024]; int len = f(str.substr(j)...
a.cc: In function 'int main()': a.cc:20:33: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'? 20 | sprintf_s(buf, "%d%c", len, str.at(j)); | ^~~~~~~~~ | sprintf
s700601002
p00429
C++
#include <iostream> #include <algorithm> #include <string> using namespace std; int f(string); int main() { int n; string str; for(;;){ cin>>n; if(n == 0) break; cin>>str; for(int i = 0; i < n; i++){ string ans; for(unsigned int j = 0; j < str.size();){ char buf[1024]; int len = f(str.substr(j)...
a.cc: In function 'int main()': a.cc:20:33: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'? 20 | sprintf_s(buf, 1024, "%d%c", len, str.at(j)); | ^~~~~~~~~ | sprintf
s564130777
p00429
C++
#include <iostream> #include <string> using namespace std; // sツづ個静ヲツ督ェツつゥツづァツづ個連ツ堕アツ青板づーツ陛板つキ // sst ツづ按づァツ return 2 int f(string s) { unsigned int count; for(count = 1; count < s.size(); count++){ if(s.at(count-1) != s.at(count)) break; } return count; } int main() { int n; string str; while(1){ cin>>n; ...
a.cc: In function 'int main()': a.cc:28:33: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'? 28 | sprintf_s(buf, 1024, "%d%c", len, str.at(j)); | ^~~~~~~~~ | sprintf