submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s640010208
p03919
C++
#include <iostream> #include <string> int main() { int H, W; std::string S[30][30]; std::cin >> H >> W; char str[26] = { 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' }; for (int i = 0; i < H; i++) for (int j = 0; j < W; j++) std::cin >> S[i][j];   fo...
a.cc:11:1: error: extended character   is not valid in an identifier 11 |   | ^ a.cc: In function 'int main()': a.cc:11:1: error: '\U000000a0' was not declared in this scope 11 |   | ^ a.cc:12:25: error: 'i' was not declared in this scope 12 | for (int i = 0; i < H; i++) | ...
s572404136
p03919
C++
#include <iostream> #include <string> int main() { int H, W; std::string S[30][30]; std::cin >> H >> W; char str[26] = { 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' }; for (int i = 0; i < H; i++) for (int j = 0; j < W; j++) std::cin >> S[i][j];   fo...
a.cc:11:1: error: extended character   is not valid in an identifier 11 |   | ^ a.cc: In function 'int main()': a.cc:11:1: error: '\U000000a0' was not declared in this scope 11 |   | ^ a.cc:12:25: error: 'i' was not declared in this scope 12 | for (int i = 0; i < H; i++) | ...
s061970684
p03919
C++
#include <iostream> #include <string> int main() { int H, W; std::string S[30][30]; std::cin >> H >> W; char str[25] = { 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' }; for (int i = 0; i < H; i++) for (int j = 0; j < W; j++) std::cin >> S[i][j]; for...
a.cc: In function 'int main()': a.cc:7:130: error: too many initializers for 'char [25]' 7 | char str[25] = { 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' }; | ...
s993942067
p03919
C
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> #include <stdlib.h> #include <stdbool.h> #define MOD 1000000007 #define INFTY 2147400000 #define DEBUG 1 #define END printf("\n");return 0; #define QS09(how_data,data) qsort(data,how_data,sizeof(long),(int (*)(const void *,const void *))qsort_...
main.c: In function 'main': main.c:76:48: error: 'u' undeclared (first use in this function) 76 | if(S[0]=='s' && S[1]=='n' && S[2]==u){ | ^ main.c:76:48: note: each undeclared identifier is reported only once for each function it appears in
s399040706
p03919
C++
h,w = map(int, input().split()) for i in range(h): s = input().split() for j in range(w): if s[j] == "snuke": print("{}{}".format(chr(ord('A')+j), i+1))
a.cc:1:1: error: 'h' does not name a type 1 | h,w = map(int, input().split()) | ^
s904274214
p03919
C++
#inclde#include<iostream> #include<vector> #define r(i,n) for(int i=0;i<n;i++) using namespace std; typedef pair<int,int>P; int n,a[222][222],y,x,t,d[6],b[222][222],f; int dx[]={0,1,0,-1}; int dy[]={1,0,-1,0}; vector<P>v; void make_dice(){ d[0]=t; d[1]=f; d[3]=7-f; d[5]=7-t; if(t==1){ if(f==3)d[2]=5,d[4]=...
a.cc:1:2: error: invalid preprocessing directive #inclde; did you mean #include? 1 | #inclde#include<iostream> | ^~~~~~ | include a.cc: In function 'int main()': a.cc:82:9: error: 'cin' was not declared in this scope 82 | while(cin>>n,n){ | ^~~ a.cc:3:1: note: 'std::cin' is defined ...
s768189300
p03919
C++
15 10 snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake snake sn...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 15 10 | ^~
s369807325
p03919
C++
#include <algorithm> #include <cstdio> #include <iostream> #include <map> #include <cmath> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <stdlib.h> #include <stdio.h> #include <bitset> #include <cstring> using namespace std; #define FOR(I,A,B) for(int I...
a.cc: In function 'int main()': a.cc:28:11: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<std::vector<std::__cxx11::basic_string<char> > >, std::vector<std::__cxx11::basic_string<char> > >::value_type' {aka 'std::vector<...
s141252662
p03919
C++
foo
a.cc:1:1: error: 'foo' does not name a type 1 | foo | ^~~
s269471327
p03919
C++
#include<bits/stdc++.h> using namespace std; int main(){ int h,w; string s; cin >> h >> w; for(int i=1;i<=h;i++){ for(int j=0;j<w;j++){ cin >> s; if(s=="snuke"){ cout << ''A'+j << i << endl; } } } return 0; }
a.cc:13:41: error: empty character constant 13 | cout << ''A'+j << i << endl; | ^~~ a.cc:13:44: warning: missing terminating ' character 13 | cout << ''A'+j << i << endl; | ...
s378089664
p03919
C++
#include <stdio.h> int main(void) { char name[][]; int i,j; int gyou; int retu; int atari_g,atari_r; printf("行と列をスペースを空けて入力せよ。\n"); scanf("%d %d",&gyou,&retu); if(gyou<1 || retu>26){ pritnf("もう一回入力してください\n"); scanf("%d %d",&gyou,&retu); } //配列の行の入力 for(i=1;i<=gyou;i++){ for(j=1; j<=retu;j++){ sc...
a.cc: In function 'int main()': a.cc:5:14: error: declaration of 'name' as multidimensional array must have bounds for all dimensions except the first 5 | char name[][]; | ^~~~ a.cc:15:17: error: 'pritnf' was not declared in this scope; did you mean 'printf'? 15 | pritn...
s379461432
p03919
Java
import java.util.Scanner; public class Snuke { public static void main(String[] args) { Snuke sn = new Snuke(); Scanner sc = new Scanner(System.in); int col = sc.nextInt(); int row = sc.nextInt(); for(int i = 0; i < col;i++){ for(int j = 0 ;j < row;j++){ ...
Main.java:3: error: class Snuke is public, should be declared in a file named Snuke.java public class Snuke { ^ 1 error
s243467443
p03919
Java
import java.util.Scanner; public class Snuke { public static void main(String[] args) { Snuke sn = new Snuke(); Scanner sc = new Scanner(System.in); int col = sc.nextInt(); int row = sc.nextInt(); for(int i = 0; i < col;i++){ for(int j = 0 ;j < row;j++){ ...
Main.java:3: error: class Snuke is public, should be declared in a file named Snuke.java public class Snuke { ^ 1 error
s080155265
p03919
C++
#include <algorithm>//min/max/sort(rand-access it)/merge #include <array> #include <bitset> // #include <chrono>//std::chrono::/system_clock/steady_clock/high_resolution_clock/duration #include <climits>//INT_MAX/INT_MIN/ULLONG_MAX #include <cmath>//fmin/fmax/fabs/sin(h)/cos(h)/tan(h)/exp/log/pow/sqrt/cbrt/ceil/floor/r...
a.cc: In function 'int main()': a.cc:72:19: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'equals' 72 | if (s.equals("snuke")) { | ^~~~~~
s858964012
p03919
C++
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.io.BufferedWriter; import java.util.InputMismatchException; import java.io.IOException; import java.io.Writer; import java.io.OutputStreamWriter; import java.io.Input...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.OutputStream; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmod...
s427381824
p03919
C++
#include<iostream> using namespace std; int main() { // 整数の入力 int a,b; cin >> a >> b; int i,j; string s; string s1 = "snuke"; for(i=0;i<a;i++){ for(j=0;j<b;j++){ cin >> s; if(strcmp(s,s1)==0)break; } } // 出力 cout << 'A'+i << j << endl; return 0; }
a.cc: In function 'int main()': a.cc:16:28: error: 'strcmp' was not declared in this scope 16 | if(strcmp(s,s1)==0)break; | ^~~~~~ a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #inclu...
s936627083
p03919
C++
#define _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES 1 #include <sstream> #include <vector> #include <string> #include <algorithm> #include <numeric> #include <set> #include <map> #include <queue> #include <stack> #include <iostream> #include <cstdio> #include <cmath> #include <cstring> #include <random> const long long INF...
a.cc: In function 'int main()': a.cc:26:38: error: no matching function for call to 'std::vector<std::vector<std::__cxx11::basic_string<char> > >::vector(int&, int&)' 26 | vector <vector<string>> S(H,W); | ^ In file included from /usr/include/c++/14/vector:66, ...
s433626183
p03919
C++
#include<cstdio> #include<iostream> #include<algorithm> #include<string> using namespace std; int main(){ int h,w; char m[6]; scanf(" %d %d",&h,&w); for(int i=1;i<=h;i++){ for(int j=0;j<w;j++){ scanf(" %s",m); if(strcmp(m,"snuke")==0){ char a='A'+j; cout << a << i << endl; ...
a.cc: In function 'int main()': a.cc:16:10: error: 'strcmp' was not declared in this scope 16 | if(strcmp(m,"snuke")==0){ | ^~~~~~ a.cc:4:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<algorithm> +++ |+#include <cstr...
s467711423
p03919
C++
h,w = gets.split.map(&:to_i) h.times{|i| d = gets.chomp.split j = d.index("snuke") if j printf "%c%d\n",65+j,i+1 exit end }
a.cc:1:1: error: 'h' does not name a type 1 | h,w = gets.split.map(&:to_i) | ^
s514666904
p03919
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <complex> #include <stack> #includ...
a.cc: In function 'int main()': a.cc:33:29: error: 'strcmp' was not declared in this scope 33 | if (strcmp(str, "snuke") == 0) | ^~~~~~ a.cc:20:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 19 |...
s587305933
p03919
C++
#include "bits/stdc++.h" #define debug(x) cout<<#x<<": "<<x<<endl #define rep(i,n) for (int i=0;i<(n);i++) #define FOR(i,a,b) for (int i=(a);i<=(b);i++) #define all(a) (a).begin(),(a).end() using namespace std; typedef vector<int> VI; typedef vector<vector<int>> VVI; typedef long long ll; void solve() { #ifdef _WIN3...
a.cc:45:2: error: stray '#' in program 45 | }#include "bits/stdc++.h" | ^ a.cc:45:3: error: 'include' does not name a type 45 | }#include "bits/stdc++.h" | ^~~~~~~ a.cc:57:6: error: redefinition of 'void solve()' 57 | void solve() { | ^~~~~ a.cc:13:6: note: 'void solve()' previously d...
s181259135
p03920
C
#include <stdio.h> int main(){ nong int i; long int n; long int a; long int sum=0; scanf("%ld",&n); for(i=1;i<=n;i++){ a=sum; if((a+i)==n){ printf("%ld\n",i); break; } if((n-(a+i))>=i+1){ printf("%ld\n",i); sum+=i; } } return 0; }
main.c: In function 'main': main.c:3:3: error: 'nong' undeclared (first use in this function) 3 | nong int i; | ^~~~ main.c:3:3: note: each undeclared identifier is reported only once for each function it appears in main.c:3:7: error: expected ';' before 'int' 3 | nong int i; | ^~~~ ...
s245693235
p03920
C++
n = int(input()) ans = [] for i in range(1, n+1): if n - i >= i+1 or n - i == 0: ans.append(i) n -= i for i in range(len(ans)): print(ans[i])
a.cc:1:1: error: 'n' does not name a type 1 | n = int(input()) | ^
s106837169
p03920
C++
#include <bits/stdc++.h> using namespace std; #define ll long long #define rep(i, n) for (ll i = 0; i < n; ++i) ll dx[4] = { 0, 1, 0, -1 }; ll dy[4] = { 1, 0, -1, 0 }; const ll INF = LLONG_MAX; const ll MOD = 1e9 + 7; int main() { ios_base::sync_with_stdio(false); cin.tie(0); ll N; cin >> N; set<in...
a.cc: In function 'int main()': a.cc:18:9: error: 'sum' was not declared in this scope 18 | sum += i; | ^~~ a.cc:31:13: error: 'cnt' was not declared in this scope; did you mean 'int'? 31 | cout << cnt << endl; | ^~~ | int
s999158801
p03920
C++
#include <iostream> #include <algorithm> #include <bits/stdc++.h> using namespace std; int main (){ long long int a; cin >>a ; for(long long int i=1;(i+1)*(i+2)<=2*a;i++){ cout << i<< endl; } int b=i; if(a-(b-1)*(b-2)/2 !=0){ cout << a-(b-1)*(b-2)/2 << endl; ...
a.cc: In function 'int main()': a.cc:19:13: error: 'i' was not declared in this scope 19 | int b=i; | ^
s180616664
p03920
C++
#include <iostream> #include <algorithm> #include <bits/stdc++.h> using namespace std; int main (){ long long int a; cin >>a ; for(long long int i=0;i*(i+1)<2*a;i++){ cout << i<< endl; } cout << a-(b-1)*(b-2)/2 << endl; return 0; }
a.cc: In function 'int main()': a.cc:20:18: error: 'b' was not declared in this scope 20 | cout << a-(b-1)*(b-2)/2 << endl; | ^
s449846079
p03920
C++
#include <iostream> #include <algorithm> #include <bits/stdc++.h> using namespace std; int main (){ long long int a; cin >>a ; for(int i=0;i*i<4*a;i++){ if(i*(i+1)/2 > a){ long int b =i for(int i=1;i<b-1;i++){ cout << i << endl; } cout << a-(b-1...
a.cc: In function 'int main()': a.cc:20:7: error: expected ',' or ';' before 'for' 20 | for(int i=1;i<b-1;i++){ | ^~~ a.cc:20:28: error: expected ';' before ')' token 20 | for(int i=1;i<b-1;i++){ | ^ | ;
s673994455
p03920
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,sum=0; cin>>n; vector<int> ans; for(int i=1;i<=n;i++){ if(sum+i>n&&sum<n){ sum+=i; ans.push_back(i); break; } sum+=i; ans.push_back(i); } ans.erase((int)(sum-n)); for(auto i : ans){ cout<<ans<<endl; ...
a.cc: In function 'int main()': a.cc:17:12: error: no matching function for call to 'std::vector<int>::erase(int)' 17 | ans.erase((int)(sum-n)); | ~~~~~~~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:64, from /usr...
s506170104
p03920
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,sum=0; cin>>n; vector<int> ans; for(int i=1;i<=n;i++){ if(sum+i>n&&sum<n){ sum+=i; ans.push_back(i); break; } sum+=i; ans.push_back(i); } ans.erase(sum-n); for(auto i : ans){ cout<<ans<<endl; } r...
a.cc: In function 'int main()': a.cc:17:12: error: no matching function for call to 'std::vector<int>::erase(int)' 17 | ans.erase(sum-n); | ~~~~~~~~~^~~~~~~ In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:64, from /usr/include/x86_6...
s083147942
p03920
C++
// ConsoleApplication9.cpp : アプリケーションのエントリ ポイントを定義します。 // #include<iostream> #include<string> #include<algorithm> #include<vector> #include<queue> #include<map>// ConsoleApplication9.cpp : アプリケーションのエントリ ポイントを定義します。 // #include<iostream> #include<string> #include<algorithm> #include<vector> #include<queue>// Console...
a.cc:238:5: error: redefinition of 'int dy [4]' 238 | int dy[4] = { 0,0,1,-1 }; | ^~ a.cc:59:5: note: 'int dy [4]' previously defined here 59 | int dy[4] = { 0,0,1,-1 }; | ^~ a.cc:239:5: error: redefinition of 'int dx [4]' 239 | int dx[4] = { 1,-1,0,0 }; | ^~ a.cc:60:5: note: 'int d...
s846418980
p03920
C++
// ConsoleApplication9.cpp : アプリケーションのエントリ ポイントを定義します。 // #include<iostream> #include<string> #include<algorithm> #include<vector> #include<queue> #include<map>// ConsoleApplication9.cpp : アプリケーションのエントリ ポイントを定義します。 // #include<iostream> #include<string> #include<algorithm> #include<vector> #include<queue> #include<...
a.cc:229:5: error: redefinition of 'int dy [4]' 229 | int dy[4] = { 0,0,1,-1 }; | ^~ a.cc:51:5: note: 'int dy [4]' previously defined here 51 | int dy[4] = { 0,0,1,-1 }; | ^~ a.cc:230:5: error: redefinition of 'int dx [4]' 230 | int dx[4] = { 1,-1,0,0 }; | ^~ a.cc:52:5: note: 'int d...
s180472416
p03920
C++
#include <bits/stdc++.h> using namespace std; bool isOK(int ma, int n) { for (int i = ma; i >= 1; --i) { if (n >= i) { n -= i; } } return n == 0; } int main() { int n; cin >> n; int left = 0, right = n; int ma = n; while (right - left > 1) { int mid = left + (right - left) / 2; ...
a.cc: In function 'int main()': a.cc:24:5: error: 'else' without a previous 'if' 24 | else left = mid; | ^~~~
s280994095
p03920
C++
def getN(): return int(input()) def getNM(): return map(int, input().split()) def getList(): return list(map(int, input().split())) N = getN() for i in range(10**4): if i*(i+1)/2 >= N: M = i upper =int(M*(M+1)/2) break diff = upper-N for i in range(M): j = i+1 if j is n...
a.cc:1:1: error: 'def' does not name a type 1 | def getN(): | ^~~
s191342043
p03920
C++
#include<cstdio> int main(void){ int n; int s=0; scanf("%d",&n); for(int i=1;i<n;i++){ if(n-s>2*i){ printf("%d\n",i); s=s+i; } else if(n-s==i){ printf("%d"\n,i); s=s+i; } } return 0; }
a.cc:12:12: error: stray '\' in program 12 | printf("%d"\n,i); | ^ a.cc: In function 'int main()': a.cc:12:12: error: expected ')' before 'n' 12 | printf("%d"\n,i); | ~ ^~ | )
s439142040
p03920
C++
#include <iostream> #include <vector> using namespace std; int main() { int N, i = 1, j; vector<long long> NN; cin >> N; while (N >= 0) { NN.push_back(i); N -= i; //cout << i << endl; i++; } for (j = 0; j < i - 1; j++) { if (NN[j] != N*-1) { cout << NN[j] << endl; } } return 0;
a.cc: In function 'int main()': a.cc:22:18: error: expected '}' at end of input 22 | return 0; | ^ a.cc:5:12: note: to match this '{' 5 | int main() { | ^
s601251133
p03920
C++
#include <iostream> #include <string> #include <cstdio> #include <string> #include <cstring> #define rep(i, n) REP(i, 0, n) #define REP(i, a, n) for(int i = a ; i < (int)n ; i++) typedef long long ll; using namespace std; int N; int n=1; bool memo[2001][2001]; bool visited[2001][2001]; bool solve(int i, int sum){ ...
a.cc: In function 'int main()': a.cc:50:3: error: 'vector' was not declared in this scope 50 | vector<int> v; | ^~~~~~ a.cc:6:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 5 | #include <cstring> +++ |+#include <vector> 6 | a.cc:50:...
s788935051
p03920
C++
#include<iostream> #include<string> #include<vector> using namespace std; int max = INT_MAX; vector<vector<int>> n; bool finding = false; int max1 = INT_MAX; int calcPattern(long long sum, vector<int> pattern, int nextNumber,int just) { long long temp = sum; vector<int> tempPattern = pattern; sum += nextNumber; i...
a.cc:6:11: error: 'INT_MAX' was not declared in this scope 6 | int max = INT_MAX; | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include<vector> +++ |+#include <climits> 4 | using namespace std; a.cc:9:12: ...
s815850113
p03920
C++
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <vector> namespace Program { using namespace std; class Solver { private: int N; vector<int> v; bool flg = false; public: Solver() { cin.tie(0); ios::sync_with_stdio(false); ...
a.cc: In function 'int main()': a.cc:69:20: error: '_CRTDBG_ALLOC_MEM_DF' was not declared in this scope 69 | _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | ^~~~~~~~~~~~~~~~~~~~ a.cc:70:11: error: '_CRTDBG_DELAY_FREE_MEM_DF' was not declared in this scope 70 | | _CRTDBG_DELAY_FREE_MEM_...
s887756366
p03921
C++
#include <bits/stdc++.h> #define fi first #define se second #define rep(i,n) for(int i = 0; i < (n); ++i) #define rrep(i,n) for(int i = 1; i <= (n); ++i) #define drep(i,n) for(int i = (n)-1; i >= 0; --i) #define srep(i,s,t) for (int i = s; i < t; ++i) #define rng(a) a.begin(),a.end() #define maxs(x,y) (x = max(x,y)) #d...
a.cc: In function 'int main()': a.cc:157:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 157 | if(flag==1){ | ~~~~^~~
s603047859
p03921
C++
#include <bits/stdc++.h> #define fi first #define se second #define rep(i,n) for(int i = 0; i < (n); ++i) #define rrep(i,n) for(int i = 1; i <= (n); ++i) #define drep(i,n) for(int i = (n)-1; i >= 0; --i) #define srep(i,s,t) for (int i = s; i < t; ++i) #define rng(a) a.begin(),a.end() #define maxs(x,y) (x = max(x,y)) #d...
a.cc: In function 'int main()': a.cc:142:18: error: expected primary-expression before '>' token 142 | if(j=>1){ | ^ a.cc:157:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 157 | if(flag==1){ | ~~~~^~~
s920880602
p03921
C++
#include<iostream> #include<vector> #include<algorithm> #include<utility> #include<string> #include<cmath> #include<cstring> #include<queue> #include<map> #include<climits> #include<set> #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i >= 0;i--) #define FOR(i, m, n) for(int i = m;i < n;i++...
a.cc: In function 'void person_dfs(int)': a.cc:46:23: error: 'n' was not declared in this scope 46 | for(int i = 0;i < n;i++){ | ^
s437644768
p03921
C++
#include <iostream> using namespace std; const int NMAX = 1e+5; const int MMAX = 1e+5; int par[NMAX+MMAX], rank[NMAX+MMAX]; void init(int n) { for(int i = 0; i < n; i++){ par[i] = i; rank[i] = 0; } } int find(int x) { if(par[x] == x) return x; else return par[x] = find(par[x]); } void unite(int x, ...
a.cc: In function 'void init(int)': a.cc:13:5: error: reference to 'rank' is ambiguous 13 | rank[i] = 0; | ^~~~ In file included from /usr/include/c++/14/bits/move.h:37, from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/14/exception:166, ...
s379922774
p03921
C++
#include <bits/stdc++.h> using namespace std; int64_t point[100000*100000+10][2]; int64_t node; int64_t a[100000*2+10]; bool visit[100000*2+10]; int64_t s[100000*2+10]; int64_t h,t; int main() { memset(point,0,sizeof(point)); memset(a,0,sizeof(a)); node=0; int64_t n,m; cin>>n>>m; for (int64_t...
a.cc:5:21: warning: integer overflow in expression of type 'int' results in '1410065408' [-Woverflow] 5 | int64_t point[100000*100000+10][2]; | ~~~~~~^~~~~~~ a.cc:5:28: error: size of array 'point' exceeds maximum object size '9223372036854775807' 5 | int64_t point[100000*100000+10][2]; ...
s778300615
p03921
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int) (n); i++) #define reps(i, n, m) for (int i = (int) (n); i < (int) (m); i++) #define PB push_back using ll = long long; using namespace std; void init(); void solve(); void dfsl(int); int main() { init(); solve(); } struct person { vector<int>...
a.cc: In function 'void dfsl(int)': a.cc:75:16: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<lang>, lang>::value_type' {aka 'lang'} and 'bool') 75 | l[x] = true; | ^~~~ a.cc:26:8: note: candidate: 'lang& lang::operator=(const lang&)' 26 ...
s615508128
p03921
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int) (n); i++) #define reps(i, n, m) for (int i = (int) (n); i < (int) (m); i++) #define PB push_back using ll = long long; using namespace std; void init(); void solve(); int main() { init(); solve(); } struct person { vector<int> v; bool f; }; ...
a.cc: In function 'void dfsp(int)': a.cc:65:17: error: 'dfsl' was not declared in this scope; did you mean 'ffsl'? 65 | dfsl(t); | ^~~~ | ffsl
s768301311
p03921
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int) (n); i++) #define reps(i, n, m) for (int i = (int) (n); i < (int) (m); i++) #define PB push_back using ll = long long; using namespace std; void init(); void solve(); int main() { init(); solve(); } struct person { vector<int> v; bool f; }; ...
a.cc: In function 'void dfsp(int)': a.cc:65:17: error: 'dfsl' was not declared in this scope; did you mean 'ffsl'? 65 | dfsl(t); | ^~~~ | ffsl a.cc: In function 'void solve()': a.cc:80:24: error: 'x' was not declared in this scope 80 | if...
s871301464
p03921
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int) (n); i++) #define reps(i, n, m) for (int i = (int) (n); i < (int) (m); i++) #define PB push_back using ll = long long; using namespace std; void init(); void solve(); int main() { init(); solve(); } struct person { vector<int> v; bool f; }; ...
a.cc: In function 'void init()': a.cc:54:32: error: 'class std::vector<int>' has no member named 'OB' 54 | p[i].v.OB(t); | ^~ a.cc:55:32: error: 'class std::vector<int>' has no member named 'OB' 55 | l[t].v.OB(i); | ...
s472737788
p03921
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <set> #include <bitset> #include <cmath> #include <string> #define FI first #define SE second #define PF push_front #define PB push_back #define PPF pop_front #define PPB pop_back #define MA make_pair #define ll long long #define PA pa...
a.cc: In function 'void unite(int, int)': a.cc:62:10: error: expected unqualified-id before '[' token 62 | if(rank[X]<rank[Y]){ | ^
s371071875
p03921
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <set> #include <bitset> #include <cmath> #include <string> #define FI first #define SE second #define PF push_front #define PB push_back #define PPF pop_front #define PPB pop_back #define MA make_pair #define ll long long #define PA pa...
a.cc: In function 'void init(int)': a.cc:44:5: error: reference to 'rank' is ambiguous 44 | rank[i]=0; | ^~~~ In file included from /usr/include/c++/14/bits/move.h:37, from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/14/exception:166, ...
s846706564
p03921
C++
/// // File: c.go // Author: ymiyamoto // // Created on Fri May 25 00:05:10 2018 // package main import ( "fmt" ) var N, M int var visited []bool var graph [][]int var graph2 [][]int func dfs(root int) { visited[root] = true for _, r := range graph[root] { if !visited[r] { dfs(p) } } } func main() { f...
a.cc:7:1: error: 'package' does not name a type 7 | package main | ^~~~~~~ a.cc:28:1: error: 'func' does not name a type 28 | func main() { | ^~~~
s492358645
p03921
C++
#include <iostream> #include <vector> #include <set> using namespace std; int N,M,K,L; int p[100010] = {0},r[100010] = {0}; void init(int N){ for(int i=0;i<=N;++i) p[i] = i; } int root(int a){ if(p[a] == a) return a; return (p[a] = root(p[a])); } bool is_same_set(int a,int b){ return root(a) == root(b); } void...
a.cc: In function 'int main()': a.cc:75:2: error: expected '}' at end of input 75 | } | ^ a.cc:35:11: note: to match this '{' 35 | int main(){ | ^
s355801616
p03921
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; import java.util.HashSet; import java.util.InputMismatchException; import java.util.Set; import java.util.StringTokenizer; import codefesti...
Main.java:14: error: package codefestival2016Final.C does not exist import codefestival2016Final.C.UnionFind; ^ Main.java:36: error: cannot find symbol UnionFind uf = new UnionFind(n + m); ^ symbol: class UnionFind location: class TaskX Main.java:36: error: cannot find symbol ...
s287935500
p03921
C++
#include<iostream> using namespace std; int n,m; int p[1<<17],rank[1<<17]; int l[1<<17]; int find(int a){return p[a]-a?p[a]=find(p[a]):a;} void unite(int a,int b) { int pa=find(a),pb=find(b); if(pa==pb)return; if(rank[pa]<rank[pb]) { p[pa]=pb; } else { p[pb]=pa; if(rank[pa]==rank[pb])rank[pa]++; } } main(...
a.cc: In function 'void unite(int, int)': a.cc:11:12: error: reference to 'rank' is ambiguous 11 | if(rank[pa]<rank[pb]) | ^~~~ In file included from /usr/include/c++/14/bits/move.h:37, from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/...
s107381945
p03921
C++
#include<iostream> #include<bits/stdc++.h> using namespace std;   vector<int>e[100005]{}; int par[100005]; int Rank[100005]; int find(int x) { if (par[x] == x)return x; return par[x] = find(par[x]); } void unite(int x, int y) { x = find(x); y = find(y); if (x == y)return; if (Rank[x] < Rank[y]) { par[x] = y; }...
a.cc:4:1: error: extended character   is not valid in an identifier 4 |   | ^ a.cc:4:1: error: '\U000000a0' does not name a type 4 |   | ^ a.cc: In function 'int main()': a.cc:38:25: error: 'e' was not declared in this scope 38 | e[g].push_back(c); | ...
s461208491
p03921
C++
#include <iostream> #include <vector> #include <map> #include <unordered_map> #include <set> #include <list> #include <algorithm> using namespace std; // Returns 1 if the i-th bit of x is set, 0 otherwise. #define BIT_SET(x, i) (((x) & (1<<(i))) != 0) // Sets the i-th bit of x to 1 #define SET_BIT(x, i) ((x) | (1<<(i...
a.cc:22:17: error: ISO C++ forbids declaration of 'solve' with no type [-fpermissive] 22 | solve(istream& in, ostream& out) { | ^~~~~ a.cc: In member function 'int Task::solve(std::istream&, std::ostream&)': a.cc:40:17: warning: no return statement in function returning non-void...
s969167427
p03921
C
#include<stdio.h> int lang[1000][1000],inter[1000][1000],list[1000],num,n; int search(int i){ int f; num++; if(num==n) return 1; list[i]=1; f=0; while(f==0){ for(j=0;j<n && f==0;j++){ if(list[j]==0 && i!=j && k[i][j]==1){ if(search(j)) return 1; } } } list[i]=0; return 0; } int main(){ int m,...
main.c: In function 'search': main.c:12:21: error: 'j' undeclared (first use in this function) 12 | for(j=0;j<n && f==0;j++){ | ^ main.c:12:21: note: each undeclared identifier is reported only once for each function it appears in main.c:13:50: error: 'k' undeclared (first u...
s283820211
p03921
C
#include<stdio.h> int lang[1000][1000],inter[1000][1000]list[1000],num,n; int search(int i){ int f; num++; if(num==n) return 1; list[i]=1; f=0; while(f==0){ for(j=0;j<n && f==0;j++){ if(list[j]==0 && i!=j && k[i][j]==1){ if(search(j)) return 1; } } } list[i]=0; return 0; } int main(){ int m,k...
main.c:3:39: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'list' 3 | int lang[1000][1000],inter[1000][1000]list[1000],num,n; | ^~~~ main.c: In function 'search': main.c:7:9: error: 'num' undeclared (first use in this function) 7 | num++; ...
s564272814
p03921
C
#include <stdio.h> #include <stdbool.h> int find(int x); void f_union(int x, int y); int G[1001]; typedef struct { int K; int O; unsigned char other[1001]; unsigned char lang[1001]; }CODER; CODER player[1001] = {0}; int main(void) { int N, M, K, n; int i, j, k, l, m; CODER tmp; sca...
main.c: In function 'find': main.c:61:27: error: lvalue required as left operand of assignment 61 | return G[x]==x?x:G[x] = find(G[x]); | ^
s728854466
p03921
Java
import java.io.*; import java.lang.*; import java.util.*; public class Main { static int count = 0; static boolean[] m; static Map<Integer, List<Integer>> spoken; static int[][] L; public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(Syst...
Main.java:34: error: cannot find symbol if (count == N) return; ^ symbol: variable N location: class Main Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
s657096255
p03921
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <queue> using namespace std; #define FOR(i,a,b) for(int i = (a); i < (b); i++) #define REP(i,n) FOR(i,0,n) #define FORCLS(i,a,b) for(int i = (a); i <= (b); i++) #define REPCLS(i,n) FORCLS(i,1,n) const int NMAX = 100005; const int ...
/tmp/cc5HV29r.o: in function `dfs(int, bool*)': a.cc:(.text+0x88): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc5HV29r.o /tmp/cc5HV29r.o: in function `isConnected()': a.cc:(.text+0xba): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss secti...
s154071869
p03921
C++
#include <fstream> #include <iostream> #include <algorithm> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <sstream> #include <map> #include <set> #include <vector> #include <cmath> #include <queue> #include <random> using namespace std; #define min(a,b) ((a)<(b) ? (a):(b)) #def...
a.cc: In function 'int main(int, const char**)': a.cc:252:18: error: expected initializer before numeric constant 252 | int L[100000]100000; | ^~~~~~ a.cc:256:20: error: 'L' was not declared in this scope 256 | cin >> L[i][j]; | ^ a.cc:261:15: error: '...
s085939573
p03921
C++
#include<iostream> #include<math.h> #include<algorithm> #include<vector> #include<queue> #include<set> using namespace std; #define forn(i,n) for(int i=0;i<(int)(n); i++) #define forsn(i,s,n) for(int i=(s);i<(int)(n); i++) vector<int> parent, rank; int find(int a){ if(parent[a]!=a){ parent[a] = find(parent[a]); ...
a.cc: In function 'void uni(int, int)': a.cc:25:13: error: reference to 'rank' is ambiguous 25 | if (rank[pa]>rank[pb]){ | ^~~~ In file included from /usr/include/c++/14/bits/move.h:37, from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++...
s269101783
p03921
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <queue> using namespace std; #define FOR(i,a,b) for(int i = (a); i < (b); i++) #define REP(i,n) FOR(i,0,n) #define FORCLS(i,a,b) for(int i = (a); i <= (b); i++) #define REPCLS(i,n) FORCLS(i,1,n) const int NMAX = 100005; const int ...
/tmp/ccIBFVEd.o: in function `isDist2(int)': a.cc:(.text+0x34): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccIBFVEd.o a.cc:(.text+0xe7): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccIBFVEd.o a.cc:(.text+0x17c): relocat...
s153460608
p03921
C++
#include <bits/stdc++.h> #define mp make_pair #define mt make_tuple #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; using ll = long long; using ull = unsigned long long; using pii = pair<int, int>; const int INF=1<<29; const double EPS=1e-9; const ll MOD = 1000000007; const int dx[]={1,0,-1,0},...
a.cc: In function 'int main()': a.cc:75:1: error: expected primary-expression before '|' token 75 | | | ^ a.cc:75:2: error: expected primary-expression at end of input 75 | | | ^ a.cc:75:2: error: expected '}' at end of input a.cc:41:11: note: to match this '{' 41 | int main(){ | ^...
s069691584
p03921
C++
#include <bits/stdc++.h> #define mp make_pair #define mt make_tuple #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; using ll = long long; using ull = unsigned long long; using pii = pair<int, int>; const int INF=1<<29; const double EPS=1e-9; const ll MOD = 1000000007; const int dx[]={1,0,-1,0},...
a.cc: In function 'int main()': a.cc:71:12: error: expected '}' at end of input 71 | return 0; | ^ a.cc:40:11: note: to match this '{' 40 | int main(){ | ^
s134679510
p03921
C++
#include <bits/stdc++.h> #define mp make_pair #define mt make_tuple #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; using ll = long long; using ull = unsigned long long; using pii = pair<int, int>; const int INF=1<<29; const double EPS=1e-9; const ll MOD = 1000000007; const int dx[]={1,0,-1,0},...
a.cc: In function 'void dfs(int)': a.cc:61:1: error: 'u' was not declared in this scope 61 | u if (cnt >= 600000000){ | ^
s052959322
p03921
C++
#include "bits/stdc++.h" #define debug(x) cout<<#x<<": "<<x<<endl #define rep(i,n) for (int i=0;i<(n);i++) #define FOR(i,a,b) for (int i=(a);i<=(b);i++) #define all(a) (a).begin(),(a).end() using namespace std; typedef vector<int> VI; typedef vector<vector<int>> VVI; typedef long long ll; set<int> mergeSet(set<int> s...
a.cc: In function 'std::set<int> mergeSet(std::set<int>, std::set<int>)': a.cc:13:13: error: expected '(' before 'each' 13 | for each (int ele in s2) { | ^~~~ | ( a.cc:13:19: error: expected primary-expression before 'int' 13 | for each (int ele in s2) { |...
s470164140
p03922
C++
#include<bits/stdc++.h> #define int long long using namespace std; const int INF = 1000000000000; const int mod = 1000000007; int dx[4] = { 1, 0, -1, 0 }, dy[4] = { 0, 1, 0, -1 }; int test[12345678], aa[12345678]; signed main() { int n, m, a, ans = 0; cin >> n >> m; for (int h = 0; h < n; h++) { cin >> a; test[a % m]...
a.cc: In function 'int main()': a.cc:21:2: error: expected '}' at end of input 21 | } | ^ a.cc:8:15: note: to match this '{' 8 | signed main() { | ^
s727382161
p03922
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) int n,m,x,ans; map<int,int>mp; int cnt[100010][2];//[mod M] 1:pair int main(){ cin>>n>>m; rep(i,n){ cin>>x; mp[x]++; } for(P p:mp){ cnt[p.first%m][0]+=p.second%2; cnt[p.first%m][1]+=p.second/2; } for(int i=0;i<=m/2;i++){ ...
a.cc: In function 'int main()': a.cc:13:13: error: 'P' was not declared in this scope 13 | for(P p:mp){ | ^ a.cc:17:9: error: expected primary-expression before 'for' 17 | for(int i=0;i<=m/2;i++){ | ^~~ a.cc:16:10: error: expected ';' before 'for' 16 | } ...
s274059022
p03922
C++
#include <bits/stdc++.h> #define sp ' ' #define nyan "(=^・ω・^=)" #define mkp make_pair #define intmax 2147483647 #define llmax 9223372036854775807 #define lP pair<ll,ll> #define iP pair<int,int> typedef long long ll; using namespace std; const int mod = 1000000007; const int mod998 = 998244353; int N, M, X, res; vecto...
a.cc: In function 'int main()': a.cc:38:35: error: no matching function for call to 'min(std::vector<int>::size_type, unsigned int&)' 38 | res += min((v[i].size() - v[M - i].size()) / 2, c); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included fr...
s603730923
p03922
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++) #define REP(i,n) FOR(i,0,n) template <class T = ll> T in() { T x; cin >> x; return (x); } typedef long long ll; signed main() { ll n,m; cin >> n >> m; ll res[m];//あまりごとの個数 ll dis[m];//あまりごとの緩衝材...
a.cc:8:21: error: 'll' does not name a type 8 | template <class T = ll> T in() { T x; cin >> x; return (x); } | ^~ a.cc: In function 'int main()': a.cc:22:29: error: no matching function for call to 'in()' 22 | REP (i,n) {ll x = in();res[x%m]++;yoo[x]++;} | ...
s375271927
p03922
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++) #define REP(i,n) FOR(i,0,n) typedef long long ll; signed main() { ll n,m; cin >> n >> m; ll res[m];//あまりごとの個数 ll dis[m];//あまりごとの緩衝材 ll yoo[100010];//緩衝材 REP (i,m) {res[i] = 0;dis[i] = 0;} RE...
a.cc: In function 'int main()': a.cc:20:27: error: 'in' was not declared in this scope; did you mean 'i'? 20 | REP (i,n) {ll x = in();res[x%m]++;yoo[x]++;} | ^~ | i
s083003474
p03922
C++
#include <bits/stdc++.h> typedef long long ll; typedef long double ld; const int INF=1e9,MOD=1e9+7,ohara=1e6+10; const ll LINF=1e18; using namespace std; #define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++) #define rrep(i,a,b) for(int i=(a);i<(b);i++) #define rrrep(i,a,b) for(int i=(a);i>=(b);i--) #define all(v) (v).beg...
a.cc: In function 'int main()': a.cc:74:12: error: no matching function for call to 'reverse(std::pair<long long int, long long int> [1000010], ll&)' 74 | reverse(p,p_cou); | ~~~~~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++...
s068818700
p03922
C++
#include <cstdio> #include <vector> #include <algorithm> #include <string> #include <cmath> #include <utility> #include <map> using namespace std; template <class RandomIt, class T> ptrdiff_t num_element(RandomIt first, RandomIt last, T value, T lb_, T ub_) { RandomIt ub=upper_bound(first, last, make_pair(value, ...
a.cc: In function 'bool testcase_ends()': a.cc:59:19: error: no matching function for call to 'min(long long int, ptrdiff_t)' 59 | res += min(cur+pairs, (upper+lower)/2); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/vector:62, from a.cc:2: ...
s514171075
p03922
C++
#include<set> #include<map> #include<cmath> #include<queue> #include<bitset> #include<string> #include<cstdio> #include<cctype> #include<cassert> #include<cstdlib> #include<cstring> #include<sstream> #include<iostream> #include<algorithm> #define For(i,x,y) for (int i=x;i<y;i++) #define pb push_back #define mp make_pa...
a.cc: In function 'void work(int&, int&)': a.cc:43:32: error: expected primary-expression before '.' token 43 | x-=tmp,y-=tmp,res+=tmp;. | ^ a.cc:44:1: error: expected unqualified-id before '}' token 44 | } | ^
s359963412
p03923
C
#include<math.h> using namespace std; long N,A; main() { scanf("%ld%ld",&N,&A); long ans=N; for(int k=1;k<40;k++) { long p=pow(N,1./(k+1)); long now=1; for(int i=0;i<k;i++)now*=p; for(int i=0;i<=k;i++) { ans=fmin(ans,A*k+p*k+i+(N+now-1)/now); now=now/p*(p+1); } } printf("%ld\n",ans); }
main.c:2:1: error: unknown type name 'using' 2 | using namespace std; | ^~~~~ main.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std' 2 | using namespace std; | ^~~ main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int] 4 | main() | ^~~~...
s101157614
p03923
C++
#!/usr/bin/env python # -*- coding: utf-8 -*- def pow(a, b): if b == 1:return a if b%2 == 0: return pow(a*a, int(b/2)) return a*pow(a*a, int(b/2)) def binaryOne(n, multi): l, r = 0, n mid = (l + r)/2 while r - l > 1: if pow(mid, multi) >= n: r = mid else: ...
a.cc:1:2: error: invalid preprocessing directive #! 1 | #!/usr/bin/env python | ^ a.cc:2:3: error: invalid preprocessing directive #- 2 | # -*- coding: utf-8 -*- | ^ a.cc:4:1: error: 'def' does not name a type 4 | def pow(a, b): | ^~~ a.cc:21:1: error: 'def' does not name a type 21 |...
s138572853
p03923
C++
int dp[1000001]; //dp[x] = minTime int n, a; int main() { cin >> n >> a; for (int i = 0; i <= n; i++) { dp[i] = 1145141919; } dp[1] = 0; for (int i = 1; i < n; i++) { for (int j = i; j <= n; j += i) { dp[j] = min(dp[j], dp[i] + j / i + a); } } if (n == 1) { cout << 1 << endl; return 0; } else { cout << dp[n] - a...
a.cc: In function 'int main()': a.cc:5:1: error: 'cin' was not declared in this scope 5 | cin >> n >> a; | ^~~ a.cc:13:25: error: 'min' was not declared in this scope; did you mean 'main'? 13 | dp[j] = min(dp[j], dp[i] + j / i + a); | ^~~ | ...
s192833007
p03923
C++
#include <iostream> #include <iomanip> #include <vector> #include <algorithm> #include <numeric> #include <functional> #include <cmath> #include <queue> #include <stack> #include <set> #include <map> #include <sstream> #include <string> #define _repargs(_1,_2,_3,name,...) name #define _rep(i,n) repi(i,0,n) #define repi...
a.cc: In function 'll ok(ll)': a.cc:34:14: error: 'LONG_LONG_MAX' was not declared in this scope 34 | ll ret = LONG_LONG_MAX; | ^~~~~~~~~~~~~
s830732093
p03923
C++
#include <iostream> #include <iomanip> #include <vector> #include <algorithm> #include <numeric> #include <functional> #include <cmath> #include <queue> #include <stack> #include <set> #include <map> #include <sstream> #include <string> #define _repargs(_1,_2,_3,name,...) name #define _rep(i,n) repi(i,0,n) #define repi...
a.cc: In function 'll ok(ll)': a.cc:34:14: error: 'LONG_LONG_MAX' was not declared in this scope 34 | ll ret = LONG_LONG_MAX; | ^~~~~~~~~~~~~
s051912690
p03923
C++
#include "iostream" using namespace std; long long int N,A; long long int dis; long long int time; long long int num; long long int gain = 1; int main() { cin >> N >>A; if (A == 1)dis = 2; else dis = A; while (num < N) { if ((N - 1) / gain + 1 < (N - 1) / (gain*dis) + dis * 2) { time += (N - 1) / gain + 1; ...
a.cc:6:15: error: 'long long int time' redeclared as different kind of entity 6 | long long int time; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++...
s612765546
p03924
C++
#include <iostream> #include <algorithm> #include <cmath> #include <stdio.h> #include <stdlib.h> #include <vector> #include <map> #include <queue> #include <set> #include <string> #include <string.h> #include <stack> #include <assert.h> #include <bitset> #define Endl endl #define mp make_pair #define ll long long #def...
a.cc:94:36: error: ISO C++ forbids declaration of 'upadd' with no type [-fpermissive] 94 | template <typename T1,typename T2> upadd(T1 &a,T2 b) {a+=b;if(a>=mod) a-=mod;} | ^~~~~ a.cc: In function 'int upadd(T1&, T2)': a.cc:94:78: warning: no return statement in function retur...
s823799877
p03925
C++
#include <stdio.h> #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdlib.h> #include <string...
a.cc:118:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 118 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:131:11: error: 'struct UnionFind' has no member named 'same' 131 | if(uf.same(now.a,now.b)){ | ^~~~
s917218376
p03925
C++
#include <stdio.h> #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdlib.h> #include <string...
a.cc:118:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 118 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:120:40: error: template argument 2 is invalid 120 | priority_queue<querry,vector<querry> pq; | ^~ a.cc:120:40: error:...
s798842975
p03925
C++
#include <stdio.h> #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdlib.h> #include <string...
a.cc:118:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 118 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:120:25: error: two or more data types in declaration of 'type name' 120 | priority_queue<querry,vector<querry> pq; | ^~~~~~~~~~~~~~ ...
s357212813
p03925
C++
#include <stdio.h> #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdlib.h> #include <string...
a.cc:115:8: error: 'bool querry::operator<(const querry&, const querry&)' must have exactly one argument 115 | bool operator<(const querry &x,const querry &y){ | ^~~~~~~~ a.cc:118:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 118 | main(){ | ^~~~ a.cc: In functi...
s147913100
p03925
C++
#include <stdio.h> #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdlib.h> #include <string...
a.cc:116:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 116 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:118:40: error: lambda-expression in template-argument only available with '-std=c++20' or '-std=gnu++20' 118 | priority_queue<querry,vector<querry>,[](querry x,qu...
s364769801
p03925
C++
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<algorithm> #include<functional> #include<vector> #include<queue> #include<stack> #include<set> #include<map> using namespace std; #define MOD 1000000007 #define f(i,n) for(long long i=0;i<(long long)(n);i++) #define N (long long)210000 int...
a.cc: In function 'int main()': a.cc:75:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 75 | scanf_s("%lld %lld", &n, &m); | ^~~~~~~ | scanf
s252217283
p03928
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define rep(i,n) for(int i=0;i<(n);i++) #define pb push_back #define all(v) (v).begin(),(v).end() #define fi first #define se second typedef vector<int>vint; typedef pair<int,int>pint; typedef vector<pint>vpint; template<typename A,typename B>inline ...
a.cc: In function 'int main()': a.cc:144:17: error: 'struct MCF' has no member named 'mincostFlow'; did you mean 'minCostFlow'? 144 | int tmp=mcf.mincostFlow(src,snk,N*N); | ^~~~~~~~~~~ | minCostFlow
s593699948
p03928
C++
#include<bits/stdc++.h> #define REP(i,m) for(int i=0;i<(m);++i) #define REPN(i,m,in) for(int i=(in);i<(m);++i) #define ALL(t) (t).begin(),(t).end() #define CLR(a) memset((a),0,sizeof(a)) #define pb push_back #define mp make_pair #define fr first #define sc second using namespace std; #ifdef DEB #define dump(x) cerr...
a.cc: In function 'int main()': a.cc:147:31: error: 'init' was not declared in this scope; did you mean 'int'? 147 | REP(i,n) REP(j,n) buf[i][j]=init[i][j]; | ^~~~ | int
s010644686
p03928
C++
// In the name of God #include <iostream> #include <algorithm> #include <fstream> #include <vector> #include <deque> #include <assert.h> #include <queue> #include <stack> #include <set> #include <map> #include <stdio.h> #include <string.h> #include <utility> #include <math.h> #include <bitset> #include <iomanip> usin...
a.cc: In function 'int32_t main()': a.cc:95:9: error: redeclaration of 'int sum' 95 | int sum = 0; | ^~~ a.cc:77:9: note: 'int sum' previously declared here 77 | int sum = 0; | ^~~
s166764239
p03928
C++
// In the name of God #include <iostream> #include <algorithm> #include <fstream> #include <vector> #include <deque> #include <assert.h> #include <queue> #include <stack> #include <set> #include <map> #include <stdio.h> #include <string.h> #include <utility> #include <math.h> #include <bitset> #include <iomanip> usin...
a.cc: In function 'int32_t main()': a.cc:95:9: error: redeclaration of 'int sum' 95 | int sum = 0; | ^~~ a.cc:77:9: note: 'int sum' previously declared here 77 | int sum = 0; | ^~~
s478776810
p03928
C++
// In the name of God #include <bits/stdc++.h> using namespace std; const int N = (int) 1e5 + 5, mod = (int) 0; int mark[N], head[N], pre[N], cap[N], to[N], en; void nein() { cout << "NO\n"; exit(0); } void add_edge(int u, int v, int uv, int vu) { to[en] = v, cap[en] = uv, pre[en] = head[u], head[u] = en++;...
/tmp/cc4C0cCV.o: in function `main': a.cc:(.text+0x689): relocation truncated to fit: R_X86_64_PC32 against symbol `lp' defined in .bss section in /tmp/cc4C0cCV.o a.cc:(.text+0x6ad): relocation truncated to fit: R_X86_64_PC32 against symbol `rp' defined in .bss section in /tmp/cc4C0cCV.o a.cc:(.text+0x6c4): relocation ...
s178467070
p03928
C++
// In the name of God #include <iostream> #include <algorithm> #include <fstream> #include <vector> #include <deque> #include <assert.h> #include <queue> #include <stack> #include <set> #include <map> #include <stdio.h> #include <string.h> #include <utility> #include <math.h> #include <bitset> #include <iomanip> usin...
/tmp/ccLyzVIo.o: in function `main': a.cc:(.text+0x689): relocation truncated to fit: R_X86_64_PC32 against symbol `lp' defined in .bss section in /tmp/ccLyzVIo.o a.cc:(.text+0x6ad): relocation truncated to fit: R_X86_64_PC32 against symbol `rp' defined in .bss section in /tmp/ccLyzVIo.o a.cc:(.text+0x6c4): relocation ...
s562336103
p03928
C++
// In the name of God #include <iostream> #include <algorithm> #include <fstream> #include <vector> #include <deque> #include <assert.h> #include <queue> #include <stack> #include <set> #include <map> #include <stdio.h> #include <string.h> #include <utility> #include <math.h> #include <bitset> #include <iomanip> usin...
/tmp/cc0sv8Fz.o: in function `main': a.cc:(.text+0x689): relocation truncated to fit: R_X86_64_PC32 against symbol `lp' defined in .bss section in /tmp/cc0sv8Fz.o a.cc:(.text+0x6ad): relocation truncated to fit: R_X86_64_PC32 against symbol `rp' defined in .bss section in /tmp/cc0sv8Fz.o a.cc:(.text+0x6c4): relocation ...
s278442295
p03929
C++
#pragma GCC optimize("O3") #pragma GCC target("sse4"); #include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <cassert> #include <functional> #include <algorithm> #include <string> #include <vector> #include <set> #include <map> #include <queue> #include <stack> using namespace std; using ll...
a.cc:2:27: error: '#pragma GCC target' string is badly formed 2 | #pragma GCC target("sse4"); | ^ a.cc:2:27: error: '#pragma GCC target' string is badly formed
s993537272
p03929
C++
#include<iostream> #include<cstdio> #include<cmath> using namespace std; int n,f,s[14][8],t,h,ans; int main() { scanf("%d%d",&n,&f); for(int i=1;i<=11;i++) for(int j=1;j<=7;j++) { t++; s[i][j]=t; } for(int i=1;i<=11;i++) for(int j=1;j<=7-3+1;j++) { t=0; for(int k=0;k<3;...
a.cc: In function 'int main()': a.cc:26:27: error: expected primary-expression before ')' token 26 | for(int i=1;i<=n-3+1;i+=) | ^
s905886400
p03929
C++
#include<bits/stdc++.h> using namespace std; int n,k,ans,p; int map[12][6]={ {4,2,0,9,7},{1,10,8,6,4},{9,7,5,3,1}, {6,4,2,0,9},{3,1,10,8,6}, {0,9,7,5,3},{8,6,4,2,0}, {5,3,1,10,8},{2,0,9,7,5}, {10,8,6,4,2},{7,5,3,1,10}}; int main(){ scanf("%d%d",&n,&k);n-=2; p=n%11;n/=11;ans=n*5; for(int ...
a.cc: In function 'int main()': a.cc:15:8: error: reference to 'map' is ambiguous 15 | if(map[i][j]==k)ans++; | ^~~ In file included from /usr/include/c++/14/map:63, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152, from a.cc:1: /usr/include/c++/14/bits/s...
s870751743
p03929
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<cstring> using namespace std; int ca[12][6]={{4,2,0,9,7},{1,10,8,6,4},{9,7,5,3,1},{6,4,2,0,9},{3,1,10,8,6},{0,9,7,5,3},{8,6,4,2,0},{5,3,1,10,8},{2,0,9,7,5},{10,8,6,4,2},{7,5,3,1,10}}; int main(){ scanf("%d%d",&n,&k); n-=2,p=n%11,n/=11...
a.cc: In function 'int main()': a.cc:9:19: error: 'n' was not declared in this scope; did you mean 'yn'? 9 | scanf("%d%d",&n,&k); | ^ | yn a.cc:9:22: error: 'k' was not declared in this scope 9 | scanf("%d%d",&n,&k); | ^ a.cc:10:...
s549510129
p03929
C++
[1 input]: 7 7 [1 output]: 2 [2 input]: 6 0 [2 output]: 2 [3 input]: 18 10 [3 output]: 7 [4 input]: 45 [4 output]: 7 7 [5 input]: 2 [5 output]: 6 0 [6 input]: 2 [6 output]: 18 10 [7 input]: 7 [7 output]: 45
a.cc:1:1: error: expected unqualified-id before '[' token 1 | [1 input]: | ^