submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s315498223
p00451
C++
#include<iostream> #include<cstring> #include<string> using namespace std; int main(void){ int a,b; while(1){ memset(len,0,sizeof(len)); string str; string str2; int ans=0; cin >> str; if(str=="EOF")break; cin >> str2; for(a=0;a<str.size();a++){ int res=0; string tmp= str.substr(a, str.length(...
a.cc: In function 'int main()': a.cc:10:24: error: 'len' was not declared in this scope; did you mean 'mblen'? 10 | memset(len,0,sizeof(len)); | ^~~ | mblen
s405723815
p00451
C++
#include<iostream> #include<cstring> #include<string> using namespace std; int main(void){ int a,b; while(1){ memset(len,0,sizeof(len)); string str; string str2; int ans=0; cin >> str; if(str=="EOF")break; cin >> str2; for(a=0;a<str.size();a++){ int res=0; string tmp= str.substr(a, str.size()-...
a.cc: In function 'int main()': a.cc:10:24: error: 'len' was not declared in this scope; did you mean 'mblen'? 10 | memset(len,0,sizeof(len)); | ^~~ | mblen
s260633112
p00451
C++
#include<stdio.h> #include<string.h> #include<stdlib.h> #include<algorithm> #include<math.h> int main(void){ char s[4001],t[4001]; while(scanf("%s",s)!=EOF){ scanf("%s",t); int sl = strlen(s),tl = strlen(t); int ans = 0; for(int i=0;i+ans<sl;i++){ for(int j=0;j+ans<tl;j++){ if(s[i]==t[j]){ for(int...
a.cc: In function 'int main()': a.cc:16:55: error: 'max' was not declared in this scope; did you mean 'std::max'? 16 | ans = max(ans,k); | ^~~ | std:...
s214826724
p00451
C++
#include<stdio.h> #include<string.h> #include<stdlib.h> #include<algorithm> #include<math> int main(void){ char s[4001],t[4001]; while(scanf("%s",s)!=EOF){ scanf("%s",t); int sl = strlen(s),tl = strlen(t); int ans = 0; for(int i=0;i+ans<sl;i++){ for(int j=0;j+ans<tl;j++){ if(s[i]==t[j]){ for(int k...
a.cc:5:9: fatal error: math: No such file or directory 5 | #include<math> | ^~~~~~ compilation terminated.
s725010433
p00451
C++
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; int dp[4001][4001]={}; char str1[4005],str2[4005]; int ans=0; int main(){while( scanf("%s%s",str1,str2)!=-1){ for(int i=0;i<strlen(str1);i++){ for(int j=0;j<strlen(str2);j++){ if(str1[i]==str2[j]){ if(i==0 || j==0){ dp...
a.cc: In function 'int main()': a.cc:14:61: error: expected ';' before '}' token 14 | else{ dp[i][j]=1+dp[i-1][j-1];ans=max(ans,dp[i][j])} | ^ | ;
s722716360
p00451
C++
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; short dp[4001][4001]={}; char str1[4005],str2[4005]; int ans=0; int main(){while(scanf("%s%s",str1,str2)!=-1){ for(int i=0;i<strlen(str1);i++){ for(int j=0;j<strlen(str2);j++){ if(str1[i]==str2[j]){ if(i==0 || j==0){ dp[...
a.cc: In function 'int main()': a.cc:13:47: error: no matching function for call to 'max(int&, short int&)' 13 | else{ dp[i][j]=1+dp[i-1][j-1];ans=max(ans,dp[i][j]);} | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s150515518
p00451
C++
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; int dp[4001][4001]={}; char str1[4005],str2[4005]; short ans=0; int main(){while(scanf("%s%s",str1,str2)!=-1){ for(int i=0;i<strlen(str1);i++){ for(int j=0;j<strlen(str2);j++){ if(str1[i]==str2[j]){ if(i==0 || j==0){ dp[...
a.cc: In function 'int main()': a.cc:12:46: error: no matching function for call to 'max(short int&, int)' 12 | if(i==0 || j==0){ dp[i][j]=1;ans=max(ans,1);} | ~~~^~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from a.cc:3: /us...
s065081512
p00451
C++
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; short dp[4001][4001]={}; char str1[4005],str2[4005]; short ans=0; int main(){ while(scanf("%s",str1)!=EOF){ scanf("%s",str2); } printf("%d\n",ans); }return 0;}
a.cc:12:24: error: expected unqualified-id before 'return' 12 | printf("%d\n",ans); }return 0;} | ^~~~~~ a.cc:12:33: error: expected declaration before '}' token 12 | printf("%d\n",ans); }return 0;} | ^
s227797638
p00451
C++
#include<stdio.h>#include <string.h> short dp[4001][4001]={},ans=0;char str1[2][4005];int main(){while(scanf("%s",str1[0])!=-1){scanf("%s",str1[1]);int a=strlen(str1[0]),b=strlen(str1[1]); for(int i=0;i<a;i++){for(int j=0;j<b;j++){if(str1[0][i]==str1[1][j]){if(!i || !j){dp[i][j]=1;if(!ans){ans++;}}else{dp[i][j]=1+dp[i-...
a.cc:1:18: warning: extra tokens at end of #include directive 1 | #include<stdio.h>#include <string.h> | ^ a.cc: In function 'int main()': a.cc:2:118: error: 'strlen' was not declared in this scope 2 | short dp[4001][4001]={},ans=0;char str1[2][4005];int main(){while(scanf("%s",str1[0])!=...
s333627187
p00451
C++
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(sc.hasNext()){ char[] s1 = sc.next().toCharArray(); char[] s2 = sc.next().toCharArray(); int len1 = s1.length; int len2 = s2.length; //intテ・ツ楪凝」ツ?ァ, 4000*4...
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:3:1: error: expected unqualified-id before 'public' 3 | public class Main{ | ^~~~~~
s546541010
p00451
C++
#include <cstdlib> #include <iostream> #include <string> #include <vector> using namespace std; template<class T> inline void chmax(T& a, T b) { if(b > a) a = b; } int main() { cin.tie(0); ios::sync_with_stdio(false); for(string a, b; cin >> a;) { cin >> b; vector<vector<int> > dp(a.size() + 1, vector<int>(b...
a.cc: In function 'int main()': a.cc:24:37: error: 'max_element' was not declared in this scope 24 | chmax(ans, *max_element(dp[i].begin(), dp[i].end())); | ^~~~~~~~~~~
s757303890
p00451
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <queue> #include <map> #include <stack> #include <cstring> #define FOR(i, a, b) for(int i = (a); i < (b); i++) #define rep(i, n) for(int i = 0; i < (n); i++) #define MP make_pair #define X first #define Y second using namespace st...
a.cc: In function 'int check(std::string&, std::string&)': a.cc:39:47: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>' 39 | res = max(res, common(a.substr(i),b)); | ...
s036384597
p00451
C++
#include <iostream> #include <string> #include <cstring> short dp[4001][4001]; using namespace std; int main(){ string s,str; int ans = 0; while(cin >> s >> str){ memset(dp,0,sizeof(dp)); for(int i=0,l=s.size();i<l;i++){ for(int j=0,ll=str.size();j<ll;j++){ if(s[i] == str[j]){ dp[i...
a.cc: In function 'int main()': a.cc:15:20: error: no matching function for call to 'max(int&, short int&)' 15 | ans = max(ans,dp[i+1][j+1]); | ~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40...
s989525778
p00451
C++
#include <iostream> #include <iomanip> #include <vector> #include <set> #include <map> #include <list> #include <iterator> #include <queue> #include <stack> #include <deque> #include <sstream> #include <algorithm> #include <numeric> #include <string> #include <cmath> #include <complex> #include <functional> #include <c...
a.cc: In function 'int main()': a.cc:62:25: error: no match for 'operator!=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 62 | while(cin >> a,a!=EOF){ | ~^~ | | | std::string {aka st...
s738195137
p00452
Java
import java.util.Arrays; import java.util.Scanner; public class Main1{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(true) { int n = sc.nextInt(); int m = sc.nextInt(); if(n == 0 && m == 0)break; int[] p = new int[n]; for(int i=0;i<n;i++) { p[i] = sc.ne...
Main.java:4: error: class Main1 is public, should be declared in a file named Main1.java public class Main1{ ^ 1 error
s956226222
p00452
C
#include<stdio.h> #include<stdlib.h> #include<string.h> long p2[501501],c,all; void add(long); void put(long num,long place); long search(long,long,long,long); int cmp(const void*,const void*); int main(){ long p[1001],m,j,max,num,call,; int n,i; while(1){ scanf("%d %ld",&n,&m); if(n==0) break; p2[0]=0; all=...
main.c: In function 'main': main.c:10:39: error: expected identifier or '(' before ';' token 10 | long p[1001],m,j,max,num,call,; | ^ main.c:19:38: error: 'cp' undeclared (first use in this function); did you mean 'p'? 19 | scanf("%ld",&c...
s685555624
p00452
C
#include<stdio.h> #include<stdlib.h> long sum[1002001]; long sumnum; int cmp(const void *a, const void *b); long search(long,long,long,long); int main(){ int n,i,j; long m,p[1000],k,max,score; while(1){ scanf("%d %ld",&n,&m); if(n==0) break; sum[0]=0; sumnum=1; for(i=0;i<n;i++){ scanf("%ld",&p[i]); ...
main.c:48:6: error: redefinition of 'search' 48 | long search(long num,long max,long s,long e){ | ^~~~~~ main.c:40:6: note: previous definition of 'search' with type 'long int(long int, long int, long int, long int)' 40 | long search(long num,long max,long s,long e){ | ^~~~~~
s268728109
p00452
C
#include<stdio.h> #include<stdlib.h> long sum[1002001]; long sumnum; int cmp(const void *a, const void *b); long search(long,long,long,long); int main(){ int n,i,j; long m,p[1000],k,max,score; while(1){ scanf("%d %ld",&n,&m); if(n==0) break; sum[0]=0; sumnum=1; for(i=0;i<n;i++){ scanf("%ld",&p[i]); ...
main.c:48:6: error: redefinition of 'search' 48 | long search(long num,long max,long s,long e){ | ^~~~~~ main.c:40:6: note: previous definition of 'search' with type 'long int(long int, long int, long int, long int)' 40 | long search(long num,long max,long s,long e){ | ^~~~~~
s052971687
p00452
C
#include "stdafx.h" #include<stdio.h> #include<stdlib.h> #include<math.h> int main() { int ans[4]; int temp; double energy,energy_min,energy_now; int M, N; int* p; int i, j; double T=100; int ret; while (1) { scanf_s("%d%d", &N, &M); p = (int*)malloc((N+1) * sizeof(int)); for (i = 0; i < N; i++) { sc...
main.c:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s924362233
p00452
C
#include <stdio.h> #include <stdlib.h> #include <math.h> #define mem(x,y) (x*)malloc(sizeof(x)*(y)) int int_sort(const void* a,const void* b) { if(*(int *)a < *(int *)b) { return -1; } else if(*(int *)a == *(int *)b) { return 0; } return 1; } int* search(int point,int* list,int len,int max) { double i = ...
main.c: In function 'main': main.c:86:29: error: 'll_tmp' undeclared (first use in this function) 86 | for(i = 0;i<ll_tmp;i++) | ^~~~~~ main.c:86:29: note: each undeclared identifier is reported only once for each function it appears in
s208126829
p00452
C
#include <stdio.h> #include <stdlib.h> #include <math.h> #define mem(x,y) (x*)malloc(sizeof(x)*(y)) int int_sort(const void* a,const void* b) { if(*(int *)a < *(int *)b) { return -1; } else if(*(int *)a == *(int *)b) { return 0; } return 1; } int* search(int point,int* list,int len,int max) { double i = ...
main.c: In function 'main': main.c:86:29: error: 'll_tmp' undeclared (first use in this function) 86 | for(i = 0;i<ll_tmp;i++) | ^~~~~~ main.c:86:29: note: each undeclared identifier is reported only once for each function it appears in
s354451831
p00452
C
import std.array; import std.range; import std.stdio; import std.conv; import std.string; import std.algorithm; void main() { while(true) { string[] input = split(chomp(readln())); int N = to!int(input[0]); int M = to!int(input[1]); if(N==0&&M==0) break; int[] inp = new int[N+1]; inp[0] = 0; for(i...
main.c:1:1: error: unknown type name 'import' 1 | import std.array; | ^~~~~~ main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import std.array; | ^ main.c:2:1: error: unknown type name 'import' 2 | import std.range; | ^~~~~~ main.c:2:11: e...
s743098286
p00452
C
#include <iostream> #include <algorithm> #include <functional> using namespace std; int main( void ) { int n, m, input[1001]; while(cin >> n >> m, n | m) { for(int i=0; i < n; ++i) cin >> input[i]; sort(input, input+n, greater<int>()); //for(int i=0; i < n; ++i) cout << input[i] << ' '; //cout << endl; in...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s414082147
p00452
C
#include<cstdio> #include<vector> #include<map> #include<algorithm> using namespace std; int N,M,R,P[1005]={0},X[1000005]; int bs(int r,int l,int k) { int m; while(l-r>1) { m=(r+l)/2; if(X[m]==k) return m; if(X[m]<=k) r=m+1; else l=m-1; } return l; } int main() { for(;scanf("%d%d",&N,&M),N;) { ...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s304405784
p00452
C++
import java.util.Arrays; import java.util.Scanner; public class Main { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); while(true){ int n = sc.nextInt(); int m = sc.nextInt(); if(n == 0 && m == 0){ b...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Arrays; | ^~~~~~ 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.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-t...
s458728630
p00452
C++
#include <iostream> #include <algorithm> using namespace std; int m, n, p[1000], pp[1000*1000]; int main(){ while( true ){ cin >> n >> m; if( m == 0 && n == 0 ) break; for(int i = 0; i < n; i++){ cin >> p[i]; } sort(p, p+n); for(int i = 0; i < n*n; i++){...
a.cc: In function 'int main()': a.cc:27:41: error: expected primary-expression before ';' token 27 | for(int i = 0; i <= n*n/2 &&; i++){ | ^
s751750350
p00452
C++
#include<iostream> using namespace std; int main() {
a.cc: In function 'int main()': a.cc:4:13: error: expected '}' at end of input 4 | int main() { | ~^
s143983332
p00452
C++
#include <cstdio> #include <fstream> #include <algorithm> using namespace std; #define MAX_N 1000 int P[MAX_N + 1]; int N, M; int table[5][MAX_N + 1]; int dfs(int a, int b, int c){ if(c > M) return P[b] * -1; if(a == 0) return P[b]; if(table[a][b] >= 0) return table[a][b]; int cho = b; while(cho <= N){ int d...
a.cc: In function 'int main()': a.cc:37:9: error: 'p' was not declared in this scope 37 | p[0] = 0; | ^
s203085242
p00452
C++
#include<iostream> using namespace std; int main(){ int n,m; cin>>n>>m; int t[n]; for(int i=0;i<n;i++){ cin>>t[i]; } int ans=0; int max=0; sort(t,t+n); for(int i=n-1;i>=0;){ if(ans+t[i]>=m){ i--; continue; } ans+=t[i]; //cout<<"ans "<<ans<<endl; } cout<<ans<<endl; ...
a.cc: In function 'int main()': a.cc:12:3: error: 'sort' was not declared in this scope; did you mean 'short'? 12 | sort(t,t+n); | ^~~~ | short
s906739819
p00452
C++
4 50 3 14 15 9 3 21 16 11 2 0 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 4 50 | ^
s966268470
p00452
C++
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { while(cin >> N >> M, N + M > 0) { int N, M; int P[1111]; vector<int> PP; for(int i= 0; i < N; i++) { cin >> P[i]; } P[N++] = 0; for(int i = 0; i < N; i++) { for(int j = 0; j < N; j++) { PP...
a.cc: In function 'int main()': a.cc:8:22: error: 'N' was not declared in this scope 8 | while(cin >> N >> M, N + M > 0) { | ^ a.cc:8:27: error: 'M' was not declared in this scope 8 | while(cin >> N >> M, N + M > 0) { | ^
s064296225
p00452
C++
#include<iostream> #include<set> #include<vector> using namespace std; int binary(vector<int> &a, int tar){ int begin = 0, end = a.size() - 1, mid = (begin + end)/2; while(begin < mid){ if(a[mid] < tar){ begin = mid; }else{ end = mid; } mid = (begin + end)/2; } return a[mid]; } in...
a.cc: In function 'int main(int, char**)': a.cc:35:5: error: 'sort' was not declared in this scope; did you mean 'short'? 35 | sort(a.begin(), a.end()); | ^~~~ | short
s830230157
p00452
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<functional> long long kazu[1002001];//1001^2 long long n,m,Max = 0,data[1001]; int main(){ while(std::cin>>n>>m, n * m){ if(n==0&&m==0)break; memset(kazu, 0, sizeof(kazu)); memset(data, 0, sizeof(data)); for(int i=0;i<n;i++){ std::cin >> d...
a.cc: In function 'int main()': a.cc:13:17: error: 'memset' was not declared in this scope 13 | memset(kazu, 0, sizeof(kazu)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<functional>...
s045132289
p00452
C++
#include <iostream> #include <queue> using namespace std; const int MAX_M = 100000000; int n, m, p[1000], save; bool dp[MAX_M]; queue <int> que; int main() {#include <iostream> #include <queue> using namespace std; const int MAX_M = 100000000; int n, m, p[1000], save; bool dp[MAX_M+1]; queue <int> que; int main() { ...
a.cc:8:13: error: stray '#' in program 8 | int main() {#include <iostream> | ^ a.cc: In function 'int main()': a.cc:8:14: error: 'include' was not declared in this scope 8 | int main() {#include <iostream> | ^~~~~~~ a.cc:8:31: error: expected primary-expression before '>' to...
s880593051
p00452
C++
#include <iostream> #include <vector> #include <algorithm> #include <cmath> using namespace std; int main() { int n; long long int m; while (cin >> n >> m) { if (n == 0 && m == 0) { break; } vector<long long int> data; long long int b; for (int i = 0; i < n; i++) { cin >> b; if (b <= m) { da...
a.cc: In function 'int main()': a.cc:47:39: error: redeclaration of 'std::vector<long long int> data2' 47 | vector<long long int> data2; | ^~~~~ a.cc:24:39: note: 'std::vector<long long int> data2' previously declared here 24 | vector<lon...
s517722631
p00452
C++
#include <iostream> #include <string> #include <sstream> #include <algorithm> #include <vector> #include <utility> #include <cstdio> #include <cstring> #include <cmath> #include <ctime> #include <cstdlib> #include <map> #include <set> #include <stack> #include <queue> using namespace std; #define pb(n) push_back(n)...
/tmp/ccVt5TpW.o: in function `solve()': a.cc:(.text+0x3c): relocation truncated to fit: R_X86_64_PC32 against symbol `w' defined in .bss section in /tmp/ccVt5TpW.o a.cc:(.text+0xe1): relocation truncated to fit: R_X86_64_PC32 against symbol `w' defined in .bss section in /tmp/ccVt5TpW.o a.cc:(.text+0x135): relocation t...
s218397156
p00452
C++
#include <iostream> #include <string> #include <sstream> #include <algorithm> #include <vector> #include <utility> #include <cstdio> #include <cstring> #include <cmath> #include <ctime> #include <cstdlib> #include <map> #include <set> #include <stack> #include <queue> using namespace std; #define pb(n) push_back(n)...
/tmp/ccazbeA6.o: in function `solve()': a.cc:(.text+0x3c): relocation truncated to fit: R_X86_64_PC32 against symbol `w' defined in .bss section in /tmp/ccazbeA6.o a.cc:(.text+0xe1): relocation truncated to fit: R_X86_64_PC32 against symbol `w' defined in .bss section in /tmp/ccazbeA6.o a.cc:(.text+0x135): relocation t...
s485466328
p00452
C++
#include <iostream> #include <string> #include <sstream> #include <algorithm> #include <vector> #include <utility> #include <cstdio> #include <cstring> #include <cmath> #include <ctime> #include <cstdlib> #include <map> #include <set> #include <stack> #include <queue> using namespace std; #define pb(n) push_back(n)...
/tmp/ccc57zMh.o: in function `solve()': a.cc:(.text+0x3c): relocation truncated to fit: R_X86_64_PC32 against symbol `w' defined in .bss section in /tmp/ccc57zMh.o a.cc:(.text+0xe1): relocation truncated to fit: R_X86_64_PC32 against symbol `w' defined in .bss section in /tmp/ccc57zMh.o a.cc:(.text+0x135): relocation t...
s841848080
p00452
C++
#include <iostream> #include <string> #include <sstream> #include <algorithm> #include <vector> #include <utility> #include <cstdio> #include <cstring> #include <cmath> #include <ctime> #include <cstdlib> #include <map> #include <set> #include <stack> #include <queue> using namespace std; #define pb(n) push_back(n)...
/tmp/cc59VyHz.o: in function `solve()': a.cc:(.text+0x3c): relocation truncated to fit: R_X86_64_PC32 against symbol `w' defined in .bss section in /tmp/cc59VyHz.o a.cc:(.text+0xe1): relocation truncated to fit: R_X86_64_PC32 against symbol `w' defined in .bss section in /tmp/cc59VyHz.o a.cc:(.text+0x135): relocation t...
s004267342
p00452
C++
#include <iostream> #include <string> #include <sstream> #include <algorithm> #include <vector> #include <utility> #include <cstdio> #include <cstring> #include <cmath> #include <ctime> #include <cstdlib> #include <map> #include <set> #include <stack> #include <queue> using namespace std; #define pb(n) push_bac...
a.cc: In function 'int solve()': a.cc:73:28: error: 'N' was not declared in this scope 73 | for(int i = 0; i < N; i++){ | ^ a.cc:74:29: error: 'w' was not declared in this scope 74 | for(int j = w[i]; j <= W; j++){ | ^ a.cc...
s602562581
p00452
C++
#include <iostream> #include <algorithm> #include <vector> #include <cstring> using namespace std; int n, m, point1[1001], sum, ans; vector<int> point2; int solve(int start, int end, int border){ int mid; while(1){ if((end + start) % 2){ mid = (end + start) / 2 + 1; } else{ ...
a.cc: In function 'int main()': a.cc:53:28: error: 'points2' was not declared in this scope; did you mean 'point2'? 53 | ans = max(ans, points2[i] + solve(0, point2.size() - 1, m - point2[i])); | ^~~~~~~ | point2
s211233721
p00452
C++
#include <bits/stdc++.h> #define FOR(i,n) for(int i=0;i<(int)(n);i++) #define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++) #define pb(a) push_back(a) #define mp(x,y) make_pair(x,y) #define ZERO(a) memset(a,0,sizeof(a)) #define len(a) sizeof(a) #define ll long long #define pii pair<int,int> #define INF 1<<29 #define M...
a.cc: In function 'void solve()': a.cc:19:9: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 19 | cin>>n>m; | ~~~~~~^~ | | | | | int | std::basic_istream<char>::__istream_type {aka...
s206760682
p00452
C++
#include <bits/stdc++.h> #define FOR(i,n) for(int i=0;i<(int)(n);i++) #define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++) #define pb(a) push_back(a) #define mp(x,y) make_pair(x,y) #define ZERO(a) memset(a,0,sizeof(a)) #define len(a) sizeof(a) #define ll long long #define pii pair<int,int> #define INF 1<<29 #define M...
a.cc: In function 'void solve()': a.cc:29:10: error: 'a' was not declared in this scope 29 | v.pb(a[i]+a[j]); | ^ a.cc:4:25: note: in definition of macro 'pb' 4 | #define pb(a) push_back(a) | ^ a.cc:33:3: error: 'erase' was not declared in this scope 33 | era...
s108246450
p00452
C++
#include <bits/stdc++.h> using namespace std ; #define pb(n) push_back(n) #define fi first #define se second #define all(r) (r).begin(),(r).end() #define gsort(st,en) sort((st),(en),greater<int>()) #define vmax(ary) *max_element(all(ary)) #define vmin(ary) *min_element(all(ary)) #define debug(x) cout<<#x<<": "<<x<<end...
a.cc: In function 'int main()': a.cc:66:12: error: no match for call to '(std::vector<std::vector<long long int> >) (ll, std::vector<long long int>)' 66 | dp = dp(n+2,vector<ll>(m+2,inf)); | ~~^~~~~~~~~~~~~~~~~~~~~~~~~
s417152650
p00452
C++
#include<iostream> using namespace std; int p[1001],s[1000000]; int main(){ int n,m; cin>>n>>m; int top=1; p[0]=0,s[0]=0; for(int i=1;i<=n;i++){ cin>>p[i]; for(int j=0;j<i;j++){ if(p[i]+p[j]<=m){s[top]=p[i]+p[j]top++;} } } int ans=0; for(int i=0;i<top;i++){ int left=0,right=top,mid; while(true){ ...
a.cc: In function 'int main()': a.cc:12:58: error: expected ';' before 'top' 12 | if(p[i]+p[j]<=m){s[top]=p[i]+p[j]top++;} | ^~~ | ;
s560604126
p00452
C++
4 50 3 14 15 9 3 21 16 11 2
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 4 50 | ^
s312102740
p00452
C++
#include <bits/stdc++.h> using namespace std; #define INF 100000005 #define MAX 1002 long long p[MAX], dp[MAX]; int main(){ long long n, m, ans; while(cin >> n >> m, n){ fill(dp, dp+MAX, 0); for(int i = 0;i < n;i++)cin >> p[i]; ans = 0; for(int i = 0;i < 3;i++){ dp[0] = 5; for(int j = p[i];j <= m;j+...
a.cc: In function 'int main()': a.cc:18:51: error: no matching function for call to 'max(long long int&, int&)' 18 | if(dp[j])ans = max(ans, j); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s244138210
p00452
C++
//http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=2676345#1 //http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=2676345#1 #include <iostream> #include<cstdlib> #include<queue> #include<set> #include<vector> #include<string> #include<algorithm> #include<stack> #include<map> #include<cstdio> #include<fstream> #in...
a.cc:19:12: error: '__int64' does not name a type; did you mean '__int64_t'? 19 | #define ll __int64 | ^~~~~~~ a.cc:21:1: note: in expansion of macro 'll' 21 | ll n,m; | ^~ a.cc:19:12: error: '__int64' does not name a type; did you mean '__int64_t'? 19 | #define ll __int64 | ...
s383244834
p00452
C++
//http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=2676345#1 //http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=2676345#1 #include <iostream> #include<cstdlib> #include<queue> #include<set> #include<vector> #include<string> #include<algorithm> #include<stack> #include<map> #include<cstdio> #include<fstream> #in...
a.cc:19:12: error: '__int64' does not name a type; did you mean '__int64_t'? 19 | #define ll __int64 | ^~~~~~~ a.cc:21:1: note: in expansion of macro 'll' 21 | ll n,m; | ^~ a.cc:19:12: error: '__int64' does not name a type; did you mean '__int64_t'? 19 | #define ll __int64 | ...
s312594779
p00452
C++
#include "algorithm" #include "array" #include "cmath" #include "complex" #include "cstdio" #include "deque" #include "initializer_list" #include "map" #include "numeric" #include "queue" #include "regex" #include "set" #include "stack" #include "string" #include "unordered_map" #include "vector" using std::accumulate...
a.cc: In function 'std::vector<int> str_int_split(char*)': a.cc:167:15: error: 'strtok' was not declared in this scope; did you mean 'strtoq'? 167 | char *tok = strtok(s, " "); | ^~~~~~ | strtoq
s822138322
p00452
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s735862852
p00452
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
s943891001
p00452
C++
#include<stdio.h> #include<iostream> int main(){ int i,j,n,m,s=0,o; static int ,p[1001],v[1001*1001]={0}; scanf("%d%d",&n,&m); if(n==0&&m==0)return 0; o=n+1; for(i=1;i<=n;i++){ scanf("%d",&p[i]); v[i]=p[i]; } for(i=0;i<=n;i++){ for(j=i;j<=n;j++){ v[o]=p[i]+p[j]; o++; } } for(i=0;i<o;i++){ for(j=i;j<o;j++){ if(v[i]+v[j]...
a.cc: In function 'int main()': a.cc:5:12: error: expected unqualified-id before ',' token 5 | static int ,p[1001],v[1001*1001]={0}; | ^ a.cc: At global scope: a.cc:26:1: error: expected unqualified-id before 'return' 26 | return 0; | ^~~~~~ a.cc:27:1: error: expected declaration before '}...
s658372099
p00452
C++
#include<stdio.h> #include<iostream> int main(){ while(1){ int i,j,n,m,s=0,o; static int ,p[1001],v[1001*1001]={0}; scanf("%d%d",&n,&m); if(n==0&&m==0)return 0; o=n+1; for(i=1;i<=n;i++){ scanf("%d",&p[i]); v[i]=p[i]; } for(i=0;i<=n;i++){ for(j=i;j<=n;j++){ v[o]=p[i]+p[j]; o++; } } for(i=0;i<o;i++){ for(j=i;j<o;j++){ if...
a.cc: In function 'int main()': a.cc:6:12: error: expected unqualified-id before ',' token 6 | static int ,p[1001],v[1001*1001]={0}; | ^
s908242381
p00452
C++
#include<stdio.h> #include<iostream> #include<algorithm> using namespace std; int main(){ while(1){ int i,j,n,m,s=0,o=1d=0; static int p[1001]={0},up[1001*1001]={0}; scanf("%d%d",&n,&m); if(n==0&&m==0)return 0; up[0]=0; for(i=1;i<=n;i++){ scanf("%d",&p[i]); for(j=i;j>=0;j--){ up[o]=p[i]+p[j]; ...
a.cc: In function 'int main()': a.cc:7:35: error: unable to find numeric literal operator 'operator""d' 7 | int i,j,n,m,s=0,o=1d=0; | ^~
s060050028
p00452
C++
#include<algorithm> #include<vector> #define MAX_N 1001 using namespace std; int main(void){ while( 1 ){ int n, m; int V[MAX_N] = {0,}; int D[MAX_N][4] = {0,{0,}}; int Max = 0; cin >> n >> m; if( n == 0 && m == 0 ){ break; } for(int i = 0; i < n; i++){ cin >> V[i]; } V[n] = 0; n++; ...
a.cc: In function 'int main()': a.cc:15:17: error: 'cin' was not declared in this scope 15 | cin >> n >> m; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include<vector> +++ |+#include <ios...
s482203967
p00452
C++
#include<set> #include<vector> using namespace std; typedef unsigned int uint; uint maxv; void solve(uint now,uint m,uint *a,int n){ int r=n-1,l=0,mid; while(l <=r){ mid = (l+r)/2; if ( a[mid]+now>m)r=mid-1; else if ( a[mid]+now <m)l=mid+1; else break; } if ( now+a[mid]>maxv&& now+a[mid]<m)maxv...
a.cc:19:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 19 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:22:9: error: 'scanf' was not declared in this scope 22 | while(scanf("%d%d",&n,&m) && n){ | ^~~~~ a.cc:33:5: error: 'sort' was not declared in this ...
s426263533
p00452
C++
#include<cstdio> #include<algorithm> #include<iostream> #include<vector> #include<set> #include<queue> using namespace std; #define rep(i,n) for(int i=0;i<int(n);i++) #define reps(i,n) for(int i=1;i<=int(n);i++) #define f first #define s second int main(){ while(1){ int n,m; cin>>n>>m; if(n==0)break; ...
a.cc: In function 'int main()': a.cc:45:79: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int*' in initialization 45 | int *a = (lower_bound(y2.begin(),y2.end(),(m-y2[i]+1))-1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
s460716142
p00452
C++
#include<cstdio> #include<algorithm> #include<iostream> #include<vector> #include<set> #include<queue> using namespace std; #define rep(i,n) for(int i=0;i<int(n);i++) #define reps(i,n) for(int i=1;i<=int(n);i++) #define f first #define s second int main(){ while(1){ int n,m; cin>>n>>m; if(n==0)break; ...
a.cc: In function 'int main()': a.cc:45:47: error: expected unqualified-id before '=' token 45 | vector<int>::iterator = (lower_bound(y2.begin(),y2.end(),(m-y2[i]+1))-1); | ^ a.cc:46:47: error: 'a' was not declared in this scope 46 | ...
s960447408
p00452
C++
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <queue> #include <bitset> #include <algorithm> #include <functional> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <string> #include <cstring> using namespa...
a.cc: In function 'int main()': a.cc:61:33: error: 'v2' was not declared in this scope; did you mean 'v1'? 61 | v2.pb(v[i] + v[j]); | ^~ | v1
s479997157
p00452
C++
#include<stdio.h> #include<algorithm> #include<vector> using namespace std; int main(){ int a,b,mato[1000]; vector<int> nums; while(scanf("%d%d",&a,&b),a,b){ int res=0; nums.clear(); for(int i=0;i<a;i++)scanf("%d",mato+i); for(int i=0;i<=a;i++) for(int j=0;j<=a;j++) nums.push_back(mato[i]*!!(i-a)+mato...
a.cc: In function 'int main()': a.cc:14:71: error: expected ')' before '!' token 14 | nums.push_back(mato[i]*!!(i-a)+mato[j]!!(j-a)); | ~ ^ | ...
s832893302
p00452
C++
#include<iostream> #include<cstring> #include<queue> using namespace std; vector<long long int> p; vector<long long int> p2; int main(void){ int a,b,n,m; while(1){ long long int ans=0; scanf("%d%d",&n,&m); if(n==0 && m==0)break; p.clear(); p2.clear(); for(a=0;a<n;a++){ int num; scanf("%d",&num); ...
a.cc: In function 'int main()': a.cc:22:17: error: 'sort' was not declared in this scope; did you mean 'short'? 22 | sort(p.begin(),p.end()); | ^~~~ | short
s212852496
p00452
C++
#include<cstdio> #include<vector> #include<algorithm> using namespace std; int main(){ int n, m; while(1){ scanf("%d%d", &n, &m); if(n == 0 && m == 0)return 0; int res = 0, tmp; vector<int> points, points2; for(int i = 0;i < n;i++){ scanf("%d", &tmp); points.push_back(tmp); } ...
a.cc: In function 'int main()': a.cc:17:5: error: 'set' was not declared in this scope 17 | set<int>::iterator it1,it2; | ^~~ a.cc:4:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>' 3 | #include<algorithm> +++ |+#include <set> 4 | using nam...
s895480022
p00452
C++
#include <cstdio> int main() { while(true) { int n, m; vector<int> x, xxx; scanf("%d%d", &n, &m); if(n == 0) break; x.resize(i); for(int i = 0; i < n; ++i) scanf("%d", &x[i]); for(int i = 0; i < n; ++i) { for(int j = 0; j < n; ++j) xxx.push_back(x[i] + x[j]); } xxx.push_back(0); sort(xxx.begin(), xxx.end()); int ans =...
a.cc: In function 'int main()': a.cc:7:1: error: 'vector' was not declared in this scope 7 | vector<int> x, xxx; | ^~~~~~ a.cc:7:8: error: expected primary-expression before 'int' 7 | vector<int> x, xxx; | ^~~ a.cc:11:1: error: 'x' was not declared in this scope 11 | x.resize(i); | ^...
s443440460
p00452
C++
#include <cstdio> #include <vector> #include <algorithm> using namespace std; int main() { while(true) { int n, m; vector<int> x, xxx; scanf("%d%d", &n, &m); if(n == 0) break; x.resize(i); for(int i = 0; i < n; ++i) scanf("%d", &x[i]); for(int i = 0; i < n; ++i) { for(int j = 0; j < n; ++j) xxx.push_back(x[i] + x[j]);...
a.cc: In function 'int main()': a.cc:14:10: error: 'i' was not declared in this scope 14 | x.resize(i); | ^
s777675805
p00452
C++
#include<cstdio> #include<iostream> #include<queue> #include<vector> using namespace std; int main(void) { vector<int>a; priority_queue<int>ans; int n,m; int input; while(scanf("%d%d",&n,&m),n+m) { a.clear(); ans.clear(); a.push_back(0); for(int i = 0;i < n;i++) { ...
a.cc: In function 'int main()': a.cc:19:11: error: 'class std::priority_queue<int>' has no member named 'clear' 19 | ans.clear(); | ^~~~~
s584388601
p00452
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; int main(){ while(1){ int n,m,p,q=0,r=0,l=0,s=0,e=0,ans=0; cin>>n>>m; if(n==0 && m==0) break; vector<int> a,x; a.push_back(0); for(int i=0;i<n;i++){ cin>>p; a.push_back(p); } q=n+1; //cout<<q<<endl; for(int i=0;i<q;i++){ f...
a.cc: In function 'int main()': a.cc:50:33: error: expected '}' before 'else' 50 | else break; | ^~~~ a.cc:49:46: note: to match this '{' 49 | if(x[l+1]<=r){l++; | ...
s403411321
p00453
Java
import java.io.*; import java.util.*; import java.util.Map.Entry; import java.util.stream.Collectors; @SuppressWarnings("unused") public class Main { //final boolean isDebug = true; final boolean isDebug = false; String fileName = "input.txt"; FastScanner sc; PrintWriter out; final int MOD = (int)1e9+7; //fin...
Main.java:27: error: cannot find symbol ArrayList<ArrayList<Pair>> list = new ArrayList<>(); ^ symbol: class Pair location: class Main Main.java:34: error: cannot find symbol list.get(i).add(new Pair(x, d)); ^ symbol: class Pair location: class Main 2 erro...
s509320966
p00453
Java
#include <iostream> #include <vector> #include <map> #include <algorithm> #include <cmath> #include <cstring> using namespace std; const int INF = 1e+9; typedef pair<int, int> P; int memo[151][11][80]; int N, M; vector<P> G[151]; int rec(int n, int p, int m){ if(memo[n][p][m] != -1) return memo[n][p][m]; int ...
Main.java:1: error: illegal character: '#' #include <iostream> ^ Main.java:2: error: illegal character: '#' #include <vector> ^ Main.java:3: error: illegal character: '#' #include <map> ^ Main.java:4: error: illegal character: '#' #include <algorithm> ^ Main.java:5: error: illegal character: '#' #include <cmath> ^ Main...
s994162506
p00453
C++
#include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <iostream> #include <string> #include <algorithm> #include <utility> #include <vector> #include <list> #include <deque> #include <stack> #include <queue> #include <map> #include <set> #include <bitset> #define INF (1000000000) #define MOD...
a.cc: In function 'int main()': a.cc:80:42: error: expected ';' before 'i' 80 | for (int i = 0; i <= maxx i++){ | ^~ | ;
s651151772
p00453
C++
//Solution for aoj:0530 Pyon-Pyon River Crossing #include<iostream> #include<algorithm> #include<vector> using namespace std; const int INF = 100000000, MAX_N = 150; typedef pair<int, int> P; int n, m, ans; int dp[MAX_N + 20][10010][760]; P stone, stone2; vector<P> Stone[151]; //first:??????second:??????????????? int m...
/tmp/cc6d0wBG.o: in function `main': a.cc:(.text+0x4b): relocation truncated to fit: R_X86_64_PC32 against symbol `Stone' defined in .bss section in /tmp/cc6d0wBG.o a.cc:(.text+0xd2): relocation truncated to fit: R_X86_64_PC32 against symbol `Stone' defined in .bss section in /tmp/cc6d0wBG.o a.cc:(.text+0x1b4): relocat...
s790685463
p00453
C++
#include <bits/stdc++.h> #define FOR(i,n) for(int i=0;i<(int)(n);i++) #define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++) #define pb(a) push_back(a) #define mp(x,y) make_pair(x,y) #define ALL(a) a.begin(),a.end() #define ZERO(a) memset(a,0,sizeof(a)) #define INF(a) memset(a,1000000000,sizeof(a)) #define len(a) sizeo...
a.cc: In function 'void solve()': a.cc:32:24: error: incompatible types in assignment of 'int' to 'int [11]' 32 | FOR(i,m+1) dp[n-1][i]=0; | ~~~~~~~~~~^~
s367338124
p00453
C++
#include <bits/stdc++.h> #define FOR(i,n) for(int i=0;i<(int)(n);i++) #define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++) #define pb(a) push_back(a) #define mp(x,y) make_pair(x,y) #define ALL(a) a.begin(),a.end() #define ZERO(a) memset(a,0,sizeof(a)) #define len(a) sizeof(a) #define ll long long #define pii pair<int...
a.cc: In function 'void solve()': a.cc:54:5: error: request for member 'clear' in 'x', which is of non-class type 'std::vector<int> [155]' 54 | x.clear(); d.clear(); | ^~~~~ a.cc:54:16: error: request for member 'clear' in 'd', which is of non-class type 'std::vector<int> [155]' 54 | x.clear(); d.cl...
s728681805
p00453
C++
#include <iostream> #include <vector> #include <cstring> #include <utility> #include <algorithm> #include <functional> #define MP make_pair #define INF 1000000000 using namespace std; int dp[3][11][85]; vector<pair<int,int> > ve[160]; int main(){ int N,M,a,b,c,T,I,O,tmp,cnt,cntt,hog,res; vector<pair<int,int> >::iter...
a.cc: In function 'int main()': a.cc:76:20: error: 'i' was not declared in this scope 76 | if(i!=0)for(int i=0;i<M;i++){ | ^
s263770665
p00453
C++
#include <iostream> #include <vector> #include <cstring> #include <utility> #include <algorithm> #include <functional> #define MP make_pair #define INF 1000000000 using namespace std; int dp[3][11][85]; vector<pair<int,int> > ve[160]; int main(){ int N,M,a,b,c,T,I,O,tmp,cnt,cntt,hog,res; vector<pair<int,int> >::iter...
a.cc: In function 'int main()': a.cc:76:20: error: 'i' was not declared in this scope 76 | if(i!=0)for(int i=0;i<M;i++){ | ^
s949082197
p00453
C++
#include<bits/stdc++.h> #define LL long long #define rep(i,n) for(int i=0;i<n;++i) #define FOR(i,a,b) for(int i=a;i<=b;++i) using namespace std; static const LL INF = 1LL<<61LL; typedef pair<LL,LL> PLL; LL N,M; LL ans; LL V[160][1010]; //LL mem[160][1001][80]; LL cal(int y,int x,int m){ LL res=INF; //if(mem[y...
a.cc: In function 'int main()': a.cc:48:12: error: 'mem' was not declared in this scope 48 | memset(mem,-1,sizeof(mem)); | ^~~
s123148225
p00453
C++
#include<bits/stdc++.h> using namespace std; typedef pair<int,int> P; typedef pair<int,P> PP; int main(){ int n,m; while(cin>>n>>m,n||m){ int dp[200][200]; int i,j,k,x,d,a; int inf = 1 << 20; int ans=inf; vector<PP> v[200]; for(i=0;i<200;i++) v[i].clear(); int c=0; for(i=0;i<n;i++){...
a.cc: In function 'int main()': a.cc:67:13: error: 'ans' was not declared in this scope; did you mean 'abs'? 67 | cout << ans << endl; | ^~~ | abs a.cc: At global scope: a.cc:69:3: error: expected unqualified-id before 'return' 69 | return 0; | ^~~~~~ a.cc:70:1: e...
s906347205
p00453
C++
#include<iostream> #include<cstdio> #include<vector> #include<algorithm> #define int long long using namespace std; struct isi { int zahyou, suberi, mincost; }; int main() { int a, b; while (cin >> a >> b, a | b) { vector<isi>I[152][78]{};//?????? int c; cin >> c; for (int d = 0; d < c; d++) { int e, f; ci...
cc1plus: error: '::main' must return 'int'
s489390983
p00453
C++
#include<iostream> #include<cstdio> #include<vector> #include<algorithm> #define INF LLONG_MAX/3 #define int long long using namespace std; struct isi { int zahyou, suberi, mincost; }; signed main() { int a, b; while (cin >> a >> b, a | b) { vector<isi>I[152][78]{};//?????? int c; cin >> c; for (int d = 0; d ...
a.cc: In function 'int main()': a.cc:5:13: error: 'LLONG_MAX' was not declared in this scope 5 | #define INF LLONG_MAX/3 | ^~~~~~~~~ a.cc:28:49: note: in expansion of macro 'INF' 28 | int m = INF; | ^~...
s116103212
p00453
C++
#include<iostream> #include<cstdio> #include<vector> #include<algorithm> #define int long long using namespace std; struct isi { int zahyou, suberi, mincost; }; const int INF = LLONG_MAX / 3; signed main() { int a, b; while (cin >> a >> b, a | b) { vector<isi>I[152][78]{};//?????? int c; cin >> c; for (int d ...
a.cc:11:17: error: 'LLONG_MAX' was not declared in this scope 11 | const int INF = LLONG_MAX / 3; | ^~~~~~~~~ a.cc:5:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 4 | #include<algorithm> +++ |+#include <climits> 5 | #def...
s007442798
p00453
C++
#include<bits/stdc++>h> #define int long long using namespace std; struct isi { int zahyou, suberi, mincost; }; const int INF = LLONG_MAX / 3; signed main() { int a, b; while (cin >> a >> b, a | b) { vector<isi>I[152][78]{};//?????? int c; cin >> c; for (int d = 0; d < c; d++) { int e, f; cin >> e >> f; ...
a.cc:1:23: warning: extra tokens at end of #include directive 1 | #include<bits/stdc++>h> | ^ a.cc:1:9: fatal error: bits/stdc++>: No such file or directory 1 | #include<bits/stdc++>h> | ^~~~~~~~~~~~~~ compilation terminated.
s533732628
p00453
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<string> #include<vector> #define int long long #define INF INT_MAX using namespace std; struct isi { int zahyou, suberi, mincost; }; signed main() { int a, b; while (cin >> a >> b, a | b) { vector<isi>c[150][75]; int d; cin >> d; for (int e = ...
a.cc: In function 'int main()': a.cc:7:13: error: 'INT_MAX' was not declared in this scope 7 | #define INF INT_MAX | ^~~~~~~ a.cc:30:49: note: in expansion of macro 'INF' 30 | int m = INF; | ^~~ a.cc:6...
s534574023
p00453
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<string> #include<vector> #define int long long #define INF INT_MAX using namespace std; struct isi { int zahyou, suberi, mincost; }; signed main() { int a, b; while (cin >> a >> b, a | b) { vector<isi>c[152][78]; int d; cin >> d; for (int e = ...
a.cc: In function 'int main()': a.cc:7:13: error: 'INT_MAX' was not declared in this scope 7 | #define INF INT_MAX | ^~~~~~~ a.cc:34:49: note: in expansion of macro 'INF' 34 | int m = INF; | ^~~ a.cc:6...
s117361691
p00453
C++
/* Be joyful in hope, patient in affliction, faithful in prayer. */ #include <iostream> #include <cstdio> #include <cstring> #include <string> #include <stack> #include <queue> #include <map> #include <set> #include <list> #include <algorithm> #include <cmath> #include <vector> #include <deque> #include <functional> #i...
a.cc: In function 'int main()': a.cc:66:25: error: expected unqualified-id before '=' token 66 | static = {}; | ^
s683676021
p00453
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef unsigned __int128 HASH; typedef pair<int,int> pii; typedef pair<ll, ll> pll; typedef pair<ull, ull> pullull; typedef pair<ll,int> plli; typedef pair<double, int> pdbi; typedef pair<int,pii> pipii; typedef vector...
a.cc: In function 'int main()': a.cc:85:35: error: 'ans' was not declared in this scope; did you mean 'abs'? 85 | rep(j, m + 1)rep(k, 1001) ans = min(ans, dp[n - 1][j][k]); | ^~~ | abs a.cc:86:17: error: 'ans' was not declared in...
s835983751
p00453
C++
#include"stdafx.h" #include <algorithm> #include <cstdio> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <type_traits> #include <vector> typedef long long int ll; #define FOR(i, ...
a.cc:1:9: fatal error: stdafx.h: No such file or directory 1 | #include"stdafx.h" | ^~~~~~~~~~ compilation terminated.
s802074699
p00453
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<math.h> #define INF 1<<30 using namespace std; int main() { int row, jump; int dp[151][11][76]; int val[151][11]; int Size[151]; int num[151][11]; while (cin >> row >> jump, row) { for (int i = 0; i < row; i++) { cin >> Size[i]; for (in...
a.cc: In function 'int main()': a.cc:24:17: error: 'memset' was not declared in this scope 24 | memset(dp, 0x7f, sizeof(dp)); //初期化 | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4...
s533696594
p00453
C++
#include<cstdlib> #include<cstring> #include<algorithm> using namespace std; #define REP(i,a,b) for(i=a; i<b; ++i) #define rep(i,n) REP(i,0,n) int numstone[151]; pair<int,int> stones[151][11]; int memo[151][151][11]; //memo[ツ甘敖つゥツづァツづ個仰猟猟」][ツ氾イツづ篠つオツ氾イツづ堕づーツつオツつスツ嘉アツ青脳[ツ債。ツづ個暗環置] int n,m; int solve(int i,int j,int k...
a.cc: In function 'int main()': a.cc:38:9: error: 'scanf' was not declared in this scope 38 | while(scanf("%d%d", &n, &m), n|m) { | ^~~~~ a.cc:56:5: error: 'printf' was not declared in this scope 56 | printf("%d\n",ans); | ^~~~~~ a.cc:4:1: note: 'printf' is defined in header '<cstdio...
s922751065
p00453
C++
#include <stdio.h> #include <stdlib.h> #define INF (1000000000) int dp[151][10][77]; typedef struct { int slip; int coor; } ST; int main(void) { int n, m; int k[151]; ST st[151][10]; int ans; k[150] = 0; for (int i = 0; i < 151; i++){ for (int j = 0; j < 10; j++){ for (int l = 0; l < 77; l++){ ...
a.cc: In function 'int main()': a.cc:49:59: error: 'min' was not declared in this scope; did you mean 'main'? 49 | dp[i + 1][h][l] = min(dp[i + 1][h][l], dp[i][j][l] + ((st[i][j].slip + st[i + 1][h].slip) * abs(st[i][j].coor - st[i + 1][h].coor))); | ...
s793565406
p00453
C++
#include <stdio.h> #include <stdlib.h> #include <algorighm> using namespace std; #define INF (1000000000) int dp[151][10][77]; typedef struct { int slip; int coor; } ST; int main(void) { int n, m; int k[151]; ST st[151][10]; int ans; k[150] = 0; for (int i = 0; i < 151; i++){ for (int j = 0; j < 10; ...
a.cc:3:10: fatal error: algorighm: No such file or directory 3 | #include <algorighm> | ^~~~~~~~~~~ compilation terminated.
s519561518
p00453
C++
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <iterator> #include <list> #include <map> #include <queue> #include <bitset> #include <fstream> #include <cmath> #include <ctime> using namespace std; typedef long long ll; typedef vector<int> vint; typedef pair<int,int> pint; #define...
a.cc: In function 'int main()': a.cc:53:17: error: 'memcpy' was not declared in this scope 53 | memcpy(dp[y%5], dp[5], sizeof(dp[y%5])); | ^~~~~~ a.cc:13:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 12 | #include ...
s561963169
p00453
C++
#include <iostream> #include <cstdlib> using namespace std; const int INF = (1<<29); int main(){ int n,m; while(cin >> n >> m && (n || m)){ int dp[150][10][80], a[150][10], x[150][10]; for(int i=0;i<150;i++){ for(int j=0;j<10;j++){ for(int k=0;k<80;k++) dp[i][j][k] = INF; a[i][j] = INF; } ...
a.cc: In function 'int main()': a.cc:48:76: error: expected ';' before 'cout' 48 | for(int j=0;j<m;j++) for(int k=0;k<10;k++) ans = min(ans,dp[n-2][k][j]) | ^ | ...
s873265045
p00453
C++
#import<iostream> #import<vector> #import<cstdlib> int n,m,k,x,d,h,i,j,D[158][151][10];for(;cin>>n>>m,n;cout<<x<<endl){vector<pair<int,int> >S[151];for(i=0;i++<n;)for(cin>>k;k--;S[i].push_back(make_pair(x,d)))cin>>x>>d;fill(**D,*D[158],x=1e9);for(i=S[1].size();i--;)D[m][1][i]=0;for(i=S[2].size();i--;)D[m-1][2][i]=0;for...
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<iostream> | ^~~~~~ a.cc:2:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 2 | #import<vector> | ^~~~~~ a.cc:3:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 3 | #import<cstdli...
s112891455
p00453
C++
#include<cstdio> #include<cstring> #include<vector> #include<map> #include<algorithm> #define INF (1 << 25) using namespace std; int main(){ int n, m, tmp; while(1){ scanf("%d%d", &n, &m); if(n == 0 && m == 0)return 0; int dp[3][10][100]; memset(dp, 0, sizeof(dp)); vector< pair<int, int> >stone...
a.cc: In function 'int main()': a.cc:58:46: error: expected ')' before ';' token 58 | res = min(res,dp[(n - 2) % 3][i][j]; | ~ ^ | )
s997011204
p00453
C++
#include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> using namespace std; int n,m; int a,b; int fie[210][4]; // 行、マス int dp[210][210][4];// x回目1こ飛ばし、行、マス void calc(int u) { u *= 2; u++; for(int i = u-1; i <= n; i++){ for(int j = 0; j < 4; j++){ // 現在の立ち位置 for(int k = 0; k < 4; k++){ ...
a.cc: In function 'void calc(int)': a.cc:20:59: error: expected ';' before 'break' 20 | if(add+((u/2) > m) | ^ | ; 21 | ...
s587036434
p00453
C++
#include <cstdlib> #include <iostream> #include <vector> using namespace std; template<class T> inline void chmin(T& a, T b) { if(b < a) a = b; } int main() { cin.tie(0); ios::sync_with_stdio(false); for(int n, m; cin >> n >> m, n;) { vector<vector<int> > pos(n), danger(n); vector<vector<vector<int> > > dp(n,...
a.cc: In function 'int main()': a.cc:20:54: error: 'INT_MAX' was not declared in this scope 20 | dp[i][j].resize(num, INT_MAX); | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by ...
s868077232
p00453
C++
#include <cstdio> #include <string> #include <cstdlib> #include <algorithm> using namespace std; #define INF (1<<27) int K[150]; //K[i]::=i行目に何個の石があるか int X[10][150]; //X[i][j]::=j列目のi個目が何列目か int D[10][150]; //D[i][j]::=j列目のi個目のすべりやすさ int DP[10][150][80]; //DP[i][j][k]::=j列目のi個目にいて、あとk回ジャンプできる int main() { int N,M; w...
a.cc: In function 'int main()': a.cc:14:17: error: 'memset' was not declared in this scope 14 | memset(K,0,sizeof(K)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <algorithm> +++ |...
s963084690
p00453
C++
#include<iostream> #include<algorithm> using namespace std; int z(int x){ if(x<0)return -x; return x; } int main(){ while(1){ const long long int INF=1000000000000000000; long long int n,m,k; static long long int a[1002],b[152][1002],dp[152][1002][102]; for(int i=0;i<152;i++)for(int j=0;j<1002;j++)for(k=0;k<102...
a.cc: In function 'int main()': a.cc:40:17: warning: overflow in conversion from 'long long int' to 'int' changes value from '1000000000000000000' to '-1486618624' [-Woverflow] 40 | int ret=INF; | ^~~ a.cc:41:60: error: no matching function for call to 'min(int&, long long int&)' 41 ...
s903979550
p00453
C++
//Bokan ga bokka--nn!! //Daily Lunch Special Tanoshii !! #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <string> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <functional> #include <iostream> #include <map> #include <set> using namespace std; typede...
a.cc: In function 'int main()': a.cc:87:38: error: expected primary-expression before '<' token 87 | for(int i=0;zan>0 && <s[y+2].size();i++) | ^
s667435217
p00453
C++
//滑りやすさ>=0なら大丈夫.3Dにすると、メモリがたくさんいるので、2つのナップザックを使いまわす。 #include<iostream> #include<stdlib.h> #include<math.h> using namespace std; int N,M; int pos[151][10]; //石のある場所(x座標) int list[151][10]; //石の滑りやすさ int minest[2][151][10]; //危険度ナップザック(探索用) void ainst(int *a,int index,int num){ for(int i = 0;i < index;i++){ a[i] ...
a.cc: In function 'void ainst(int*, int, int)': a.cc:15:10: error: 's' was not declared in this scope 15 | }s | ^