submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s600098737
p03745
C++
#include <bits/stdc++.h> using namespace std; typedef long long int; signed main() { int N; cin >> N; vector<int> a(N), b(N - 1); for (int i = 0; i < N; i++) cin >> a[i]; for (int i = 0; i < N - 1; i++) b[i] = a[i + 1] - a[i]; int ans = 1; for (int i = 0; i < N - 2; i++) { if (b[i] * b[i + 1...
a.cc:3:19: error: declaration does not declare anything [-fpermissive] 3 | typedef long long int; | ^~~
s059591442
p03745
C++
9 1 2 1 2 1 2 1 2 1#include <iostream> #include <vector> #include <math.h> #include <cmath> #include <algorithm> #include <numeric> #include <string> #include <cstring> #include <regex> #include <bits/stdc++.h> using namespace std; using ll = long long; using dbl = double; using pii = pair<int, int>; using pl4 = pair...
a.cc:2:18: error: stray '#' in program 2 | 1 2 1 2 1 2 1 2 1#include <iostream> | ^ a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 9 | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/vector:62, ...
s028345375
p03745
C++
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> A(N+3); for(int i=0;i<N;i++){cin >> A[i];} int count=0; for(int i=0;i<N;i++){
a.cc: In function 'int main()': a.cc:10:24: error: expected '}' at end of input 10 | for(int i=0;i<N;i++){ | ~^ a.cc:10:24: error: expected '}' at end of input a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s181727614
p03745
C++
#include<bits/stdc++.h> using namespace std; #define rp(i,n) for(int i=0;i<n;i++) #define rep(i,m,n) for(int i=m;i<=n;i++) #define lrp(i,n) for(long long i=0;i<n;i++) #define lrep(i,m,n) for(long long i=m;i<=n;i++) #define sort(a) sort(a.begin(),a.end()) #define reverse(a) reverse(a.begin(),a.end()) #define pb push_ba...
a.cc: In function 'int main()': a.cc:36:34: error: expected primary-expression before '>' token 36 | while(i<n-1&&a.at(i)=>a.at(i+1)){ | ^
s397311972
p03745
C++
#include <bits/stdc++.h> using namespace std; long long int N, L, T; long long int X[100010]; long long int W[100010], Y[100010], Z[100010],S[100010], U[100010]; long long int A[100010], B[100010]; long long int a=0, b=0; long long int pmod(long long int x, long long int a){ if (x%a<0) return x%a+a; else return x%...
a.cc: In function 'int main()': a.cc:103:3: error: expected ',' or ';' before 'long' 103 | long long int g=c-f%c | ^~~~ a.cc:109:27: error: 'i' was not declared in this scope 109 | for (long long int i=0; i<N; i++){ | ^ a.cc:119:23: error: 'u' was not declared in this sco...
s283495646
p03745
C++
5 6 1 3 1 4 2 3 1 5 3 5 2 4
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 5 6 | ^
s160756633
p03745
C
#include <iostream> using namespace std; int n, a[100000], b[100000]; int main() { int n; scanf("%d",&n); for(int i = 0;i < n; i++) cin>>a[i]; int x, y; for(int i = 0;i < n; i++) { b[i+1] = 0x3f3f3f3f; if(i>=1 && a[i-1]>a[i]) x = i; else b[i+1] = b[x]+1; if(...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s005371403
p03745
C++
#include <bits/stdc++.h> using namespace std; #define forx(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long ll; int main() { int n,ans=0,f=0; cin >> n; vector<int>a(n); rep(i, n) cin >> a[i]; rep(i,n-1){ if(f==0){ if (a[...
a.cc: In function 'int main()': a.cc:16:25: error: invalid types 'int[int]' for array subscript 16 | if (a[i] < f[i + 1]) | ^ a.cc:18:29: error: invalid types 'int[int]' for array subscript 18 | else if(a[i] < f[i + 1]) | ^ a....
s254675538
p03745
C++
#include <bits/stdc++.h> using namespace std; #define forx(i, a, b) for (int i = (a); i < (b); i++) #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long ll; int main() { int n,ans=0,f=0; cin >> n; vector<int>a(n); rep(i, n) cin >> a[i]; rep(i,1,n-1){ if(f==0){ if (...
a.cc:14:16: error: macro "rep" passed 3 arguments, but takes just 2 14 | rep(i,1,n-1){ | ^ a.cc:4:9: note: macro "rep" defined here 4 | #define rep(i, n) for (int i = 0; i < (n); i++) | ^~~ a.cc: In function 'int main()': a.cc:14:5: error: 'rep' was not declared in this sco...
s314905383
p03745
C++
#include<iostream> #include<string.h> #include<algorithm> #include<vector> #include<cmath> #define ll long long #define r(i,n) for(ll i=0;i<n;i++) #define rp(i,a,b) for(ll i=a;i<b;i++) #define ret return #define elif else if #define p(x) cout<<x<<endl; ll inf=100001; using namespace std; int main(){ while(1){ ll n;...
a.cc: In function 'int main()': a.cc:17:12: error: conflicting declaration 'long long int a' 17 | ll a=0,s=0,ct=0; | ^ a.cc:16:24: note: previous declaration as 'long long int a [n]' 16 | ll n;cin>>n;ll a[n];r(i,n)cin>>a[i]; | ^ a.cc:19:34: error: inco...
s640507619
p03745
C++
#include <iostream> using namespace std; int a[100005]; #define rep(i,n) for(int (i)=0; (i)<(n); (i)++) #define CONST_RETURN(a) do{cout << (a) << endl; return 0; }while(0) int main(){ int n; cin >> n; if(n==1) CONST_RETURN(1); rep(i,n) cin >> a[i]; int ans = 1,mode = 0; int mode = 0; rep(i,n-1){ if(m...
a.cc: In function 'int main()': a.cc:13:7: error: redeclaration of 'int mode' 13 | int mode = 0; | ^~~~ a.cc:12:15: note: 'int mode' previously declared here 12 | int ans = 1,mode = 0; | ^~~~
s731098427
p03745
C++
n = int(input()) a = list(map(int,input().split())) i = int(0) ans = int(0) f = True while i+1 < n: if a[i] < a[i+1] : while a[i] <= a[i+1] : if i+1 >= n-1: f=False break i += 1 if f : ans += 1 elif a[i] == a[i+1] ...
a.cc:1:1: error: 'n' does not name a type 1 | n = int(input()) | ^
s119883114
p03745
C
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> #define ll long long const int maxn=100010; int a[maxn]; int main(){ int i,j,k,n,m; scanf("%d",&n); for(i=1;i<=n;i++) scanf("%d",&a[i]); int flag=0,ans=1; for(i=2;i<=n;i++){ if(flag==1 && a[i]>=a[i-1])continue; if(flag==-1 && a[i]<=a[i-...
main.c:7:5: error: variably modified 'a' at file scope 7 | int a[maxn]; | ^
s168074865
p03745
C++
#include <iostream> using namespace std; int main() { int n; cin >> n; vector<int> a(n); for (auto &e : a) { cin >> e; } vector<int> d(n - 1); for (int i = 0; i < n - 1; i++) { d[i] = a[i + 1] - a[i]; } int m = 1; for (int i = 0; i < n - 2; i++) { if (d[i + 1] == 0) { d[i + 1] = d[i]; } else if (d...
a.cc: In function 'int main()': a.cc:7:9: error: 'vector' was not declared in this scope 7 | vector<int> a(n); | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 1 | #include <iostream> +++ |+#include <vector> ...
s502153599
p03745
C++
#include <iostream> #include <algorithm> #include <string> #include <queue> #include <vector> #include <set> #include <bitset> #include <cmath> #define FOR(i,a,b) for(int i=a;i<b;i++) #define ROF(i,a,b) for(int i=b-1;i>=a;i--) #define FI first #define SE second #define MA(i,j) make_pair(i,j) #define PA pair<int,int> #d...
a.cc: In function 'int main()': a.cc:34:6: error: 'i' was not declared in this scope 34 | if(i<=2){ | ^
s009633607
p03745
Java
import java.util.Scanner; public class AMain { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] a = new int[n]; for(int i=0; i<n; i++){ a[i] = sc.nextInt(); } sc.close(); long ans = 1; ...
Main.java:3: error: class AMain is public, should be declared in a file named AMain.java public class AMain { ^ 1 error
s933705136
p03745
C++
#include <bits/stdc++.h> const int N=3050,mo=1e9+7; using namespace std; inline int gi(){ char ch=getchar();int x=0,q=0; while(ch<'0' || ch>'9') ch=='-'?q=1:0,ch=getchar(); while(ch>='0' && ch<='9') x=x*10+ch-'0',ch=getchar(); return q?(-x):x; } int f[N][N][2]; void dp(ll &x,ll y){ x+=y; if (x>=mo) x-=mo; r...
a.cc:11:6: error: variable or field 'dp' declared void 11 | void dp(ll &x,ll y){ | ^~ a.cc:11:9: error: 'll' was not declared in this scope 11 | void dp(ll &x,ll y){ | ^~ a.cc:11:13: error: 'x' was not declared in this scope 11 | void dp(ll &x,ll y){ | ^ a.cc:11:15: e...
s519768042
p03745
C
//set many funcs template #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int min(int a,int b){if(a<b){return a;}return b;} int ...
main.c:14:5: warning: conflicting types for built-in function 'round'; expected 'double(double)' [-Wbuiltin-declaration-mismatch] 14 | int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} | ^~~~~ main.c:6:1: note: 'round' is declared in header '<math.h>' 5 | #include<stdbool.h> +++ |+...
s125555005
p03745
C++
#include<cstdio> #include<iostream> #include<cmath> #include<algorithm> #include<string> #include<cstring> #include<cctype> #include<queue> #include<stack> #include<map> #include<set> #include<iomanip> #include<sstream> #include<cstdlib> #include<ctime> #include<list> #include<deque> #include<bitset> #include<fstream> ...
a.cc: In function 'int main()': a.cc:64:25: error: expected unqualified-id before ')' token 64 | for(int ) | ^ a.cc:64:24: error: expected ';' before ')' token 64 | for(int ) | ^~ | ; a.cc:64:25...
s211399407
p03745
C++
gfdgasdg
a.cc:1:1: error: 'gfdgasdg' does not name a type 1 | gfdgasdg | ^~~~~~~~
s999499782
p03745
C++
#include <iostream> using namespace std; int n,a[100005],ans=1,dir; int main(){ ios::sync_with_stdio(false); cin.tie(0); cin>>n; st=n+1; for(int i=1;i<=n;i++){ cin>>a[i]; if(st==n+1 && i>1 && a[i]!=a[i-1])st=i; } dir=(a[st-1]<a[st]); for(int i=st+1;i<=n;i++){ if(a[i-1]==a[i])continue; if((a[i-1]<a[i])!=...
a.cc: In function 'int main()': a.cc:8:9: error: 'st' was not declared in this scope; did you mean 'std'? 8 | st=n+1; | ^~ | std
s127287044
p03745
C++
bfrwb
a.cc:1:1: error: 'bfrwb' does not name a type 1 | bfrwb | ^~~~~
s769709678
p03745
Java
import java.util.Scanner; public class SortedArrays { public static void main(String[] args) { try (Scanner scanner = new Scanner(System.in)) { int n = scanner.nextInt(); int inputNum = scanner.nextInt(); int cnt = 1; State state = State.NONE; for (int i = 1; i < n; i++) { int beforeNum = inputNu...
Main.java:3: error: class SortedArrays is public, should be declared in a file named SortedArrays.java public class SortedArrays { ^ 1 error
s341446908
p03745
C
#include <stdio.h> 2 #include <stdlib.h> 3 4 int main(){ 5 int N; 6 scanf("%d",&N); 7 int i; 8 int A[N]; 9 for (i=0;i<N;i++){ 10 scanf("%d",&A[N]); 11 } 12 int ans = 0; 13 int state = 0;//0 none 1 up -1 down 14 int temp = 0; 15 for (i=1;i<N;i++){ 16 switch(state){ 1...
main.c:2:3: error: expected identifier or '(' before numeric constant 2 | 2 #include <stdlib.h> | ^ main.c:2:5: error: stray '#' in program 2 | 2 #include <stdlib.h> | ^
s331344111
p03745
C++
#include <cstdio> #include <cstring> #include <iostream> using namespace std; #define DEBUG(X) cerr<<__LINE__<<" "<<#X<<": "<<X<<endl; #define sci(x) int x;scanf("%d",&x); #define scii(x, y) int x,y;scanf("%d%d",&x,&y); #define REP(i,y) for(int i=0;i<(int)(y);i++) #define REPP(i,y) for(int i=1;i<=(int)(y);i++) #define ...
a.cc:11:9: error: macro names must be identifiers 11 | #define %d %lld | ^
s461602560
p03745
C++
#include <iostream> #include <vector> using namespace std; int compare(int a, int b) { if (a == b) return 0; else if (a > b) return -1; else return 1; }; void main() { int N; vector<int> a; cin >> N; int temp; for (int i = 0; i < N; i++) { cin >> temp; a.push_back(temp); } int sub_num = 0; int h...
a.cc:15:1: error: '::main' must return 'int' 15 | void main() | ^~~~
s442600694
p03745
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; if(n<=2) cout<<1<<endl; else{ vector<int> a(2), v(n); for(int i=0; i<n; i++) cin>>v[i]; a[0]=v[0]; a[1]=v[1]; int i=2, sgn=0; if(a[0]<a[1]) sgn=1; else if(a[0]>a[1]) sgn=-1; while(i<n){ int ts=0; if(a[a.size()-1]<v[i...
a.cc: In function 'int main()': a.cc:34:41: error: 'ans' was not declared in this scope; did you mean 'abs'? 34 | ans++; | ^~~ | abs a.cc:35:48: warning: ignoring return value of 'bool ...
s191444021
p03745
Java
public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String arrayLength = sc.nextLine(); String array = sc.nextLine(); Integer[] intArray = returnIntegerArray(array); Boolean isPlus = null; int answer = 1; for (int i = 1; i < intArray.length; i++) { if (...
Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s201631601
p03745
Java
Scanner sc = new Scanner(System.in); String arrayLength = sc.nextLine(); String array = sc.nextLine(); Integer[] intArray = returnIntegerArray(array); Boolean isPlus = null; int answer = 1; for (int i = 1; i < intArray.length; i++) { if ((isPlus == null || isPlus) && intArray[i] > intArray[i + 1]) { ...
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. Scanner sc = new Scanner(System.in); ^ (use --enable-preview to enable unnamed classes) Main.java:9: error: class, interface, enum, or record expected for (int i = 1; i < intArray.length; i++) { ^ Main.java:9: error: class,...
s693907125
p03745
Java
import java.util.Scanner; public class ASortedArray { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String arrayLength = sc.nextLine(); String array = sc.nextLine(); Integer[] intArray = returnIntegerArray(array); Boolean isPlus = null; int answer = 1; for (int i = 1; ...
Main.java:3: error: class ASortedArray is public, should be declared in a file named ASortedArray.java public class ASortedArray { ^ 1 error
s390584055
p03745
Java
package grandContest013; import java.util.Scanner; public class ASortedArray { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String arrayLength = sc.nextLine(); String array = sc.nextLine(); Integer[] intArray = returnIntegerArray(array); Boolean isPlus = null; int answ...
Main.java:5: error: class ASortedArray is public, should be declared in a file named ASortedArray.java public class ASortedArray { ^ 1 error
s162410173
p03745
Java
public static void main(String[] args) { Scanner sc = new Scanner(System.in); String arrayLength = sc.nextLine(); String array = sc.nextLine(); Integer[] intArray = returnIntegerArray(array); Boolean isPlus = null; int answer = 1; for (int i = 1; i < intArray.length; i++) { if ((isPlus == null || is...
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) { ^ (use --enable-preview to enable unnamed classes) 1 error
s899079654
p03745
Java
import java.io.*; import java.util.*; public class P1 { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); PrintWriter out = new PrintWriter(System.out); int n = sc.nextInt(); int [] arr = new int[n]; for (int i = 0; i < n; i++) ...
Main.java:4: error: class P1 is public, should be declared in a file named P1.java public class P1 { ^ 1 error
s202500529
p03745
C++
//#include <bits/stdc++.h> #include <iostream> #include <vector> using namespace std; int main(void){ int N,T,L; int X[100000] = {}; int W[100000] = {}; int i; cin >> N >> L >> T; //cout << N << L << T << endl; for(i=0;i<N;i++){ cin >> X[i] >> W[i]; //cout << X[i] << W[i] <<...
a.cc: In function 'int main()': a.cc:51:5: error: 'sort' was not declared in this scope; did you mean 'short'? 51 | sort(v.begin(), v.end()); | ^~~~ | short a.cc:52:38: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)' 52 | vec...
s417573763
p03745
C++
#include<bits/stdc++.h> using namespace std; int n,a[100001],cnt,f; int s(int i){ for(int j=i+1;j<n-1;j++) if(a[j]<a[j+1]){f=2;cnt++;return i;} } int b(int i){ for(int j=i+1;j<n-1;j++) if(a[j]>a[j+1]){f=0;cnt++;return i;} } int main(){ cin>>n; for(int i=0;i<n;i++)cin>>a[i]; for(int i=0;...
a.cc: In function 'int main()': a.cc:19:3: error: expected '}' before 'else' 19 | else if(a[i]<a[i+1]){f=2;i=b(i);} | ^~~~ a.cc:18:18: note: to match this '{' 18 | if(a[i]>a[i+1]){f=1;i=s(i); | ^ a.cc: In function 'int s(int)': a.cc:7:1: warning: control reaches end of non-void ...
s560383430
p03745
C++
#include<iostream> #include<vector> #include<utility> #include<math.h> using namespace std; typedef long long ll; typedef vector<ll> vi; typedef vector<vi> vvi; typedef vector<pair<int, int> > vp; #define pb push_back #define mod 1000000007 #define inf 999999999 #define rep(i, n) for(int i = 0; i < (n); i++) #define...
a.cc:21:6: error: 'n' was not declared in this scope; did you mean 'yn'? 21 | ll a[n]; | ^ | yn a.cc: In function 'int main()': a.cc:28:12: error: 'a' was not declared in this scope 28 | cin >> a[i]; | ^ a.cc:37:8: error: 'a' was not declared in this scope 37 | if...
s191157623
p03745
C++
7 1 2 3 2 1 999999999 1000000000
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 7 | ^
s804675435
p03745
C++
#include <iostream> using namespace std; int main() { int count = 1; int x = 0; bool p = false; bool q = false; int n; cin >> n; int a[100000]; int b[100000]; for (int i = 0; i < n; i++) { cin >> a[i]; } for (int i = 1; i < n; i++) { b[i] = a[i] - a[i - 1]; } for (int i = 1; i < n; i++) {...
a.cc: In function 'int main()': a.cc:45:2: error: expected '}' at end of input 45 | } | ^ a.cc:5:12: note: to match this '{' 5 | int main() { | ^
s599881379
p03745
C++
#include <iostream> using namespace std; int main() { int count = 1; int x = 0; bool p = false; bool q = false; int n; cin >> n; int a[100000]; int b[100000]; for (int i = 0; i < n; i++) { cin >> a[i]; } for (int i = 1; i < n; i++) { b[i] = a[i] - a[i - 1]; } for (int i = 1; i < n; i++) {...
a.cc: In function 'int main()': a.cc:45:2: error: expected '}' at end of input 45 | } | ^ a.cc:5:12: note: to match this '{' 5 | int main() { | ^
s952993857
p03745
C++
#include<iostream> #include<vector> using namespace std; int main(void){ int N,tmp,f,a=0; vector<int> v; cin>>N; for(int i=0;i<N;i++){ cin>>tmp; v.push_back(tmp); } f=v[1]-v[0]; for(int i=2;i<v.size();i++){ if(v[i][i-1]!=f){ a++; f=v[i]-v[i-1]; } } cout<<a<<endl; return 0; }
a.cc: In function 'int main()': a.cc:16:10: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}[int]' for array subscript 16 | if(v[i][i-1]!=f){ | ^
s226514810
p03745
C++
#include <iostream> #define MAX_N 100000 using namespace std; int main(void){ int n, j; int a[MAX_N]; int cnt=0; cin >> n; for (int i=0; i<n; i++){ cin >> a[i]; } for (int i=0; i<n; i++){ if (a[i] != a[i+1]){ j = i; break; } } if (a[j] < a[j+1]){ for (int i=j; i<n; i++){ ...
a.cc: In function 'int main()': a.cc:40:13: error: 'k' was not declared in this scope 40 | i=k; | ^ a.cc: At global scope: a.cc:45:3: error: 'cout' does not name a type 45 | cout << cnt + 1 << endl; | ^~~~ a.cc:47:3: error: expected unqualified-id before 'return' 47 | re...
s327620265
p03745
C++
#include<iostream> #include<vector> using namespace std; int main(void){ int N,tmp,f,a=0; vector<int> v; cin>>N; for(int i=0;i<N;i++){ cin>>tmp; v.push(tmp); } f=v[1]-v[0]; if(f==0)a++; for(int i=2;i<v.size();i++){ if((v[i]-v[i-1]>0&&f<0)||(v[i]-v[i-1]<0&&f>0))a++; else if(v[i]-v[i-1]==0)a++; } cout<<...
a.cc: In function 'int main()': a.cc:12:4: error: 'class std::vector<int>' has no member named 'push' 12 | v.push(tmp); | ^~~~
s055024157
p03745
C++
#include<bits/stdc++.h> #include<unordered_map> /* *▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ * ▀▀ ▀▀▀▀▀▀ ▀ ▀▀▀▀▀▀ ▀ ▀ * ▀ ▀ ▀ ▀ ▀ ▀ ▀ * ▀ ▀ ▀ ▀ ▀ ▀ ▀ ▀ ▀ ▀ * ▀ ▀▀▀▀ ▀ ▀ ▀ ▀ ▀ *▀ ▀ ▀ ▀ ...
a.cc: In function 'int main()': a.cc:20:12: error: expected primary-expression before 'long' 20 | #define ll long int | ^~~~ a.cc:22:37: note: in expansion of macro 'll' 22 | #define loopi(i,intial,n) for(ll i=ll(intial);i<n;i++) | ^~ a.cc:57:4: note: in...
s845057249
p03745
Java
public class Main{ public static void main(){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int arr[] = new int[n]; for(int i=0; i<n; i++){ arr[i] = sc.nextInt(); } int count =0; int prev = arr[0]; bool flag = true; int i=1; while(i<n){ if(arr[i] > prev){ flag = true...
Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:13: error: cannot find symbol ...
s374177168
p03745
C++
read = lambda: map(int, input().split()) n = int(input()) a = list(read()) cnt = 1 f = 0 for i in range(1, n): if a[i] > a[i - 1] and f == -1: f = 0 cnt += 1 elif a[i] < a[i - 1] and f == 1: f = 0 cnt += 1 elif a[i] > a[i - 1]: f = 1 elif a[i] < a[i - 1]: ...
a.cc:1:1: error: 'read' does not name a type 1 | read = lambda: map(int, input().split()) | ^~~~
s195361670
p03745
Java
import java.util.Scanner; public class A{ public static void main(String[] args){ Scanner s = new Scanner(System.in); int n, result; n = s.nextInt(); result = devideArray(n); System.out.println(result); } public static int devideArray(int n){ Scanner s = new Scanner(System.in); ...
Main.java:3: error: class A is public, should be declared in a file named A.java public class A{ ^ 1 error
s258087308
p03745
Java
import java.io.PrintWriter; import java.util.Scanner; /** * Created by shoya on 2017/04/15. */ public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); PrintWriter pw = new PrintWriter(System.out); int n = sc.nextInt(); int ans = 0; ...
Main.java:43: error: reached end of file while parsing } ^ 1 error
s523869254
p03745
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; scanf("%d",&n); long long nt a[n]; for(int i=0;i<n;++i){ scanf("%d",&a[i]); } int res=1; for(int i=1;i<n-1;){ if(a[i]-a[i-1] < 0 && a[i+1]-a[i]>0 || a[i]-a[i-1] > 0 && a[i+1]-a[i] < 0){ ++res; i+=2; } else ++i; } printf("%d",res);...
a.cc: In function 'int main()': a.cc:6:22: error: expected initializer before 'a' 6 | long long nt a[n]; | ^ a.cc:8:29: error: 'a' was not declared in this scope 8 | scanf("%d",&a[i]); | ^ a.cc:12:20: error: 'a' was not declare...
s205345779
p03745
C++
#include <iostream> #include <cstdio> #include <vector> #include <cmath> #include <cstring> #include <numeric> #include <algorithm> #include <functional> #include <array> #include <map> #include <queue> #include <limits.h> #include <set> #include <stack> #include <random> #include <time.h> #include <complex> #include <...
a.cc:20:10: fatal error: intrin.h: No such file or directory 20 | #include <intrin.h> | ^~~~~~~~~~ compilation terminated.
s449511006
p03745
C++
#include <iostream> #include <vector> #include <algorithm> #define ll long long using namespace std; typedef vector<int> VI; int main() { ios::sync_with_stdio(0); ll int n; cin >> n; ll VI A(n); for (auto& x : A) cin >> x; if (n <= 2) { cout << 1; return 0; } ll int sol = 1; ll int i = 1; while (i < n &...
a.cc: In function 'int main()': a.cc:11:15: error: expected initializer before 'A' 11 | ll VI A(n); | ^ a.cc:12:24: error: 'A' was not declared in this scope 12 | for (auto& x : A) cin >> x; | ^ a.cc:19:25: error: 'A' was not declared in this scope ...
s271877181
p03746
C++
#include<bits/stdc++.h> #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #define rep(i, x) for(ll i = 0; i < x; i++) #define rep2(i, x) for(ll i = 1; i <= x; i++) #define all(a) (a).begin(),(a).end() using ll = long long; using ld = long double; using namespace std; const ll IN...
a.cc: In function 'int main()': a.cc:27:9: error: reference to 'visit' is ambiguous 27 | visit[a] = 1; visit[b] = 1; | ^~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80, from a.cc:1: /usr/include/c++/14/variant:1855:5: note: candidates are: 'temp...
s170530504
p03746
C++
#include <bits/stdc++.h> #define int long long #define ll long long using ull = unsigned long long; using namespace std; #define dump(x) \ if (dbg) { \ cerr << #x << " = " << (x) << endl; \ } #define overload4(_1, _2, _3, _4, name, ...) name #defi...
a.cc: In function 'void solve()': a.cc:430:10: error: ambiguous overload for 'operator<<' (operand types are 'IO' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'}) 430 | cout << ans.size() << endl; | ^~ ~~~~~~~~~~ | | | std::v...
s169908367
p03746
C++
#include <iostream> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <queue> #include <stack> #include <vector> #include <algorithm> #include <map> #include <unordered_map> #include <set> #include <deque> #include <array> #include <bitset> long long mod = 1e9 + 7; class Mint { pub...
a.cc: In function 'int main()': a.cc:251:33: error: found ':' in nested-name-specifier, expected '::' 251 | std::cout << ans.size() << std:endl; | ^ | ::
s771659704
p03746
C++
#include<bits/stdc++.h> #define rep(i, n) for(ll i = 0; i < (ll)(n); i++) template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; } #define all(x) (x).begin(),(x).end() #pragma GCC optimize("Ofast") usi...
a.cc: In function 'bool solve()': a.cc:48:12: error: expected ';' before '{' token 48 | if(isOK{ | ^ | ; a.cc:54:5: error: expected primary-expression before 'else' 54 | else v=u; | ^~~~ a.cc:53:6: error: expected ')' before 'else' 53 | } | ^ ...
s418244518
p03746
C++
// #pragma GCC target("avx2") #pragma GCC optimize("O3", "unroll-loops") // #include <bits/extc++.h> // using namespace __gnu_pbds; #include <bits/stdc++.h> using namespace std; #define int long long #define double long double // template <typename T> // using pbds_set = tree<T, null_type, less<T>, rb_tree_tag, t...
a.cc: In function 'int32_t main()': a.cc:60:24: error: 'u' was not declared in this scope 60 | while (m--) cin >> u >> v, adj[u].eb(v), adj[v].eb(u); | ^ a.cc:60:29: error: 'v' was not declared in this scope 60 | while (m--) cin >> u >> v, adj[u].eb(v), adj[v].eb(u); | ...
s214996618
p03746
C++
// #pragma GCC target("avx2") #pragma GCC optimize("O3", "unroll-loops") // #include <bits/extc++.h> // using namespace __gnu_pbds; #include <bits/stdc++.h> using namespace std; #define int long long #define double long double // template <typename T> // using pbds_set = tree<T, null_type, less<T>, rb_tree_tag, t...
a.cc: In function 'int32_t main()': a.cc:60:24: error: 'u' was not declared in this scope 60 | while (m--) cin >> u >> v, adj[u].eb(v), adj[v].eb(u); | ^ a.cc:60:29: error: 'v' was not declared in this scope 60 | while (m--) cin >> u >> v, adj[u].eb(v), adj[v].eb(u); | ...
s912412024
p03746
C++
12 18 3 5 4 12 9 11 1 10 2 5 6 10 8 11 1 3 4 10 2 4 3 7 2 10 3 12 3 9 1 7 2 3 2 11 10 11
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 12 18 | ^~
s608727381
p03746
C++
#include<bits/stdc++.h> using namespace std; int main(void) { long n, m; cin >> n >> m; vector<vector<int>> G(n); int s = 0; for(int i=0; i<m; i++) { int a,b; cin >> a >> b; a--, b--; G[a].push_back(b); G[b].push_back(a); s = a; } int ss = ...
a.cc: In function 'int main()': a.cc:49:1: error: duplicate label 'nxt' 49 | nxt: | ^~~
s374021108
p03746
C++
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #include <bits/stdc++.h> using namespace std; #define pb push_back const int MAXN = 1e5 + 10; int n, m; int u, v; int d[MAXN], dd[MAXN], par[MAXN]; vector <int> adj[MAXN]; voi...
In file included from /usr/include/c++/14/string:43, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52, from a.cc:4: /usr/include/c++/14/bits/allocator.h: In destructor 'std::_Vector_base<int, std::allocator<int> >::_Vector_...
s319999551
p03746
C++
#include <iostream> #include <cstdio> #include <string> #include <algorithm> #include <utility> #include <cmath> #include <vector> #include <queue> #include <set> #include <map> #define rep(i, n) for(int i = 0; i < n; i++) using namespace std; typedef long long ll; const ll mod = 1000000007; const int MAX_N = 100010; ...
a.cc: In function 'int main()': a.cc:50:17: error: 'all' was not declared in this scope; did you mean 'll'? 50 | reverse(all(ret)); | ^~~ | ll
s255843040
p03746
C++
#include <iostream> #include <cstdio> #include <string> #include <algorithm> #include <utility> #include <cmath> #include <vector> #include <queue> #include <set> #include <map> #define rep(i, n) for(int i = 0; i < n; i++) using namespace std; typedef long long ll; const ll mod = 1000000007; const int MAX_N = 100010; ...
a.cc: In function 'void dfs(int)': a.cc:24:18: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int') 24 | visited[v] = 1; | ^ In file included from /usr/include/c++/14/vector:72, from a.cc:7: /usr/include/c++/14/bits/vector.tcc:210:5: note: candi...
s048243100
p03746
C++
#include <iostream> #include <cstdio> #include <string> #include <algorithm> #include <utility> #include <cmath> #include <vector> #include <queue> #include <set> #include <map> #define rep(i, n) for(int i = 0; i < n; i++) using namespace std; typedef long long ll; const ll mod = 1000000007; const int MAX_N = 100010; ...
a.cc: In function 'void dfs(int)': a.cc:26:26: error: 'begin' was not declared in this scope; did you mean 'std::begin'? 26 | for(auto u : to[v]) { | ^ | std::begin In file included from /usr/include/c++/14/string:53, from /usr/in...
s107345377
p03746
C++
#include<iostream> #include<algorithm> #include<string> #include<vector> #include<cstring> using namespace std; int n,m; vector<int> sus[100050]; bool bio[100050]; vector<int>posjet; vector<int>sol; void input(){ cin>>n>>m; int br1,br2; for(int i=0;i<m;i++){ cin>>br1>>br2; sus[br1].push_back(br2); sus[br2]...
a.cc:91:2: error: stray '#' in program 91 | }#include<iostream> | ^ a.cc:91:3: error: 'include' does not name a type 91 | }#include<iostream> | ^~~~~~~ a.cc:99:5: error: redefinition of 'int n' 99 | int n,m; | ^ a.cc:9:5: note: 'int n' previously declared here 9 | int n,m; | ...
s904636895
p03746
C++
// i am so dumb....
/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
s216377112
p03746
C++
#include <bits/stdc++.h> using namespace std; struct edge{int from, to;}; int N, M; typedef vector<int> vi; vi G[N]; bool used[N]; int main(){ cin>>N>>M; for (int i=0;i<M;++i){ int a, b;cin >>a>>b; G[a].push_back(b);G[b].push_back(a); } int cnt=0; vector<edge> path; int pos=0; while(true){ ...
a.cc:6:6: error: size of array 'G' is not an integral constant-expression 6 | vi G[N]; | ^ a.cc:7:11: error: size of array 'used' is not an integral constant-expression 7 | bool used[N]; | ^
s866903419
p03746
C++
#include<bits/stdc++.h> #include<iostream> #include<cmath> #include<vector> #include<string> #include<queue> #include<set> #include<map> #include<algorithm> #include<functional> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int,int> pii; typedef pair<ll, ll> pll; typedef pair...
a.cc: In function 'int main()': a.cc:138:22: error: invalid initialization of reference of type 'vb&' {aka 'std::vector<bool>&'} from expression of type 'vvll' {aka 'std::vector<std::vector<long long int> >'} 138 | forward_search(dq, Path, cand, ans_num); | ^~~~ a.cc:92:40: note: in passi...
s994949070
p03746
C++
#include<iostream> #include<string> #include<cstdio> #include<vector> #include<cmath> #include<algorithm> #include<functional> #include<iomanip> #include<queue> #include<ciso646> #include<random> #include<map> #include<set> #include<complex> #include<bitset> #include<stack> #include<unordered_map> #include<utility> usi...
a.cc: In function 'void solve()': a.cc:88:17: error: 'endk' was not declared in this scope 88 | cout << endk; | ^~~~
s879505369
p03746
C++
#include <iostream> #include <vector> #include <deque> using namespace std; int main() { int n, m; vector<vector<int>> g(n+1); cin >> n >> m; for (int i = 0; i < m; i++) { int a, b; cin >> a >> b; g[a].push_back(b); g[b].push_back(a); } // dfs-like deque<int> ans; vector<bool> v(n+1, fal...
a.cc: In function 'int main()': a.cc:33:15: error: cannot convert 'std::deque<int>::empty' from type 'bool (std::deque<int>::)() const noexcept' to type 'bool' 33 | while (!ans.empty) { | ^~~~~ a.cc:33:15: error: in argument to unary ! 33 | while (!ans.empty) { | ~~~~^~~~~
s604830800
p03746
C++
#include<algorithm> #include<cstdio> #include<iostream> #include<cstring> #include<cmath> #include<map> #include<queue> #include<set> #include<sstream> #include<stack> #include<string> #include<vector> using namespace std; int n,m,f,r; vector<int> g[100100]; set<int> t; int out[300000]; bool find(int x){ for(int i=0...
a.cc: In function 'void fun(int, bool)': a.cc:31:33: error: 'a' was not declared in this scope 31 | a=g[x][i]; | ^
s525932766
p03746
C++
#include<algorithm> #include<cstdio> #include<iostream> #include<cstring> #include<cmath> #include<map> #include<queue> #include<set> #include<sstream> #include<stack> #include<string> #include<vector> using namespace std; int n,m; int f,r; vector<int> g[100100]; set<int> t; int out[300000]; bool find(int x){ for(in...
/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
s096756794
p03746
C++
#include<bits/stdc++.h> using namespace std; const int N = 1e5+3; vector<int> v[N]; bool vis[N]; list<int> L; int n,m; void dfs(int u, bool ok){ for(int i=0; i<v[u].size(); ++i){ if(!vis[v[u][i]]){ if(ok) L.push_front(v[u][i]); else L.push_back(v[u][i]); vis[v[u][i]] = true; dfs(e,ok); return; } }...
a.cc: In function 'void dfs(int, bool)': a.cc:14:29: error: 'e' was not declared in this scope 14 | dfs(e,ok); | ^
s930411634
p03746
C++
#include<bits/stdc++.h> using namespace std; const int N = 1e5+3; vector<int> v[N]; bool vis[N]; list<int> L; int n,m; void dfs(int u, bool ok){ for(int i=0; i<v[u].size(); ++i){ if(!vis[v[u][i]]){ if(ok) L.push_front(v[u][i]); else L.push_back(v[u][i]); vis[v[u][i]] = true; dfs(e,ok); return; } }...
a.cc: In function 'void dfs(int, bool)': a.cc:14:29: error: 'e' was not declared in this scope 14 | dfs(e,ok); | ^
s857846169
p03746
C++
#include<bits/stdc++.h> using namespace std; const int N = 1e5+3; vector<int> v[N]; bool vis[N]; list<int> L; int n,m; void dfs(int u, bool ok){ for(int i=0; i<v[u].size(); ++i){ if(!vis[v[u][i]]){ if(ok) L.push_front(v[u][i]); else L.push_back(v[u][i]); vis[v[u][i]] = true; dfs(e,ok); return; } }...
a.cc:38:2: error: stray '#' in program 38 | }#include<bits/stdc++.h> | ^ a.cc: In function 'void dfs(int, bool)': a.cc:14:29: error: 'e' was not declared in this scope 14 | dfs(e,ok); | ^ a.cc: At global scope: a.cc:38:3: error: 'include' does not n...
s208475357
p03746
C++
#include <iostream> #include <vector> #include <utility> #include <queue> using namespace std; vector<int> dfs(vector< vector<int> > &G, vector<bool> &visited, int v){ vector<int> ret; for(int i = 0; i < G[v].size(); ++i){ int v_ = G[v][i]; if(visited[v_]) continue; visited[v_] = true; ret = dfs(G,...
a.cc: In function 'int main()': a.cc:36:3: error: 'reverse' was not declared in this scope 36 | reverse(T.begin(), T.end()); | ^~~~~~~
s096644611
p03746
C++
4 2 3 1 4
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 4 | ^
s560142494
p03746
C++
#include<iostream> #include<cstdio> #include<set> #include<vector> using namespace std; int N, M; int A, B; set<int> adj[100010]; set<int> visited; int end[2]; int end_first[2]; vector<int> path_before; vector<int> path_after; int main(){ cin >> N >> M; for(int i = 0; i < M; i++){ cin >> A >> B; ...
a.cc: In function 'int main()': a.cc:27:20: error: reference to 'end' is ambiguous 27 | end_first[0] = end[0] = 1; | ^~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits...
s728688150
p03746
C++
#include <bits/stdc++.H> #define N 200010 using namespace std; inline int read() { int x=0,f=1; char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1; ch=getchar();} while(ch>='0'&&ch<='9'){x=x*10+ch-'0'; ch=getchar();} return x*f; } struct edge{int v,next;}vs[N]; int st[N],ee,n,m,A[N],B[N],vis[N]; inline void...
a.cc:1:10: fatal error: bits/stdc++.H: No such file or directory 1 | #include <bits/stdc++.H> | ^~~~~~~~~~~~~~~ compilation terminated.
s388512685
p03746
C++
7 8 1 2 2 3 3 4 4 5 5 6 6 7 3 5 2 6
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 7 8 | ^
s439689918
p03746
C++
#include<iostream> using namespace std; int next[10001],head[10001],to[10001],cnt; int a[10001],num,N=1; int book[10001]; void add(int u,int v) { cnt++; next[cnt]=head[u]; head[u]=cnt; to[cnt]=v; } int main() { int n,m; cin>>n>>m; for(int i=1;i<=m;i++) { int x,y; cin>>x>>y; add(x,y); add(y,x); } for...
a.cc: In function 'void add(int, int)': a.cc:9:9: error: reference to 'next' is ambiguous 9 | next[cnt]=head[u]; | ^~~~ In file included from /usr/include/c++/14/string:47, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_ba...
s903321590
p03746
C++
7 8 1 2 2 3 3 4 4 5 5 6 6 7 3 5 2 6
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 7 8 | ^
s722128879
p03746
C++
#include <iostream> #include <set> #include <vector> #define ALL(x) x.begin(), x.end() using namespace std; typedef vector<vector<int> > G; const int inf = 1e9; int n, m; G graph; vector<int> ans; int visited[100005]; void dfs(int u){ ans.push_back(u); visited[u] = 1; for(int i=0; i<graph[u].size(); i++)...
a.cc: In function 'int main()': a.cc:41:5: error: 'reverse' was not declared in this scope 41 | reverse(ALL(ans)); | ^~~~~~~
s151699612
p03746
C++
#pragma GCC optimize("O3") #include<bits/stdc++.h> #define rc(x) return cout<<x<<endl,0 #define pb push_back #define in insert #define er erase #define fr first #define sc second typedef long long ll; const long long llinf=LLONG_MAX; const int inf=LONG_MAX; const int nmax=1e5+5; const int mod=1e9+7; using namespace std...
a.cc:11:15: warning: overflow in conversion from 'long int' to 'int' changes value from '9223372036854775807' to '-1' [-Woverflow] 11 | const int inf=LONG_MAX; | ^~~~~~~~ a.cc: In function 'void dfs(int)': a.cc:19:20: error: 'ans' was not declared in this scope; did you mean 'abs'? 19 | ...
s953108759
p03746
C++
#include <bits/stdc++.h> using namespace std; //#define rep(i,n) REP(i,0,n) #define REP(i,s,e) for(int i=(s); i<(int)(e); i++) #define repr(i, n) REPR(i, n, 0) #define REPR(i, s, e) for(int i=(int)(s-1); i>=(int)(e); i--) #define pb push_back #define all(r) r.begin(),r.end() #define rall(r) r.rbegin(),r.rend() #d...
a.cc: In function 'int main()': a.cc:55:13: error: 'i' was not declared in this scope 55 | rep(i, m) { | ^ a.cc:55:9: error: 'rep' was not declared in this scope; did you mean 'repr'? 55 | rep(i, m) { | ^~~ | repr
s344095455
p03746
C++
#include "iostream" #include "climits" #include "list" #include "queue" #include "stack" #include "set" #include "functional" #include "algorithm" #include "math.h" #include "utility" #include "string" #include "map" #include "unordered_map" #include "iomanip" #include "random" using namespace std; const long long int...
a.cc: In function 'int main()': a.cc:100:30: error: expected primary-expression before ';' token 100 | cout << i << ; | ^
s828227964
p03746
C++
#include <iostream> #include <vector> #include <algorithm> #include <stack> int main(void) { int n, m; std::cin >> n >> m; std::vector<std::vector<int> > v(n); for (int i = 0; i < m; i++) { int a, b; std::cin >> a >> b; a--; b--; v[a].push_back(b); b[b].push_back(a); } std::stack<int> s; for (i...
a.cc: In function 'int main()': a.cc:21:18: error: invalid types 'int[int]' for array subscript 21 | b[b].push_back(a); | ^ a.cc:32:64: error: no match for 'operator[]' (operand types are 'std::vector<bool>::reference' and 'size_t' {aka 'long unsigned int'}) 32 | ...
s895785449
p03746
C++
/* * Author: vawait * Created Time: 六 4/22 11:59:08 2017 * File Name: a.cpp */ #include<cstdio> #include<iostream> #include<cstring> #include<cstdlib> #include<cmath> #include<algorithm> #include<string> #include<map> #include<set> #include<vector> #include<queue> #include<stack> using namespace std; #define rep...
a.cc: In function 'int main()': a.cc:68:12: error: expected '}' at end of input 68 | work(); | ^ a.cc:66:1: note: to match this '{' 66 | { | ^
s622382352
p03746
Java
import java.util.ArrayList; import java.util.Scanner; import javafx.util.Pair; class Node{ int id; ArrayList<Integer>side_id_list; public Node(int id){ this.id = id; this.side_id_list = new ArrayList<Integer>(); } } public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(Sys...
Main.java:5: error: package javafx.util does not exist import javafx.util.Pair; ^ Main.java:25: error: cannot find symbol ArrayList<Pair<Integer,Integer>>side_list = new ArrayList<>(); ^ symbol: class Pair location: class Main Main.java:36: error: cannot find symbol side_list.ad...
s000830731
p03746
C++
//#define ONLINE_JUDGE #pragma clang diagnostic warning "-Weverything" // {{{ Includes #ifndef ONLINE_JUDGE #pragma clang diagnostic warning "-Wall" #pragma clang diagnostic warning "-Wextra" #pragma clang diagnostic warning "-Wconversion" #pragma clang diagnostic ignored "-Wvla" #pragma clang diagnostic ignored "-Wvla...
a.cc: In function 'int main()': a.cc:236:9: error: could not convert 'std::cout' from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'outboth' 236 | solve(cout); | ^~~~ | | | std::ostream {aka std::basic_ostream<char>}
s322025545
p03746
C++
#include <bits/stdc++.h> using namespace std; #define K 600001 #define FOE(i, s, t) for (int i = s; i <= t; i++) vector<int> nxt[K]; int n; int dfs[K]; vector<int> ans1, ans2; void DFS(int u, int f){ if (f) ans2.push_back(u); else ans1.push_back(u); dfs[u] = 1; for (auto Z : nxt[u]) if (!dfs[Z]) {DFS(Z, f); re...
a.cc: In function 'int main()': a.cc:23:28: error: 'm' was not declared in this scope; did you mean 'tm'? 23 | scanf("%d%d", &n, &m); | ^ | tm
s405512391
p03746
C++
#include<bits/stdc++.h> #define rep(i,s,t) for(int i=s;i<=t;i++) #define per(i,s,t) for(int i=s;i>=t;i--) #define p_b push_back #define N 100010 using namespace std; int n,m; int s1[N],s2[N],n1,n2; bool vis[N]; vector<int> e[N]; void dfs(int u){ vis[u]=1; for(int i=0;i<e[u].size();i++) if(!vis[e[u][i]]){ dfs(e[...
a.cc:52:2: error: stray '#' in program 52 | }#include<bits/stdc++.h> | ^ a.cc:52:3: error: 'include' does not name a type 52 | }#include<bits/stdc++.h> | ^~~~~~~ a.cc:60:5: error: redefinition of 'int n' 60 | int n,m; | ^ a.cc:9:5: note: 'int n' previously declared here 9 | int n,m...
s214557533
p03746
C
#include <stdio.h> #include <string.h> #define MaxSize 100000 int neighbour[MaxSize][MaxSize]; char visited[MaxSize]; char nbCount[MaxSize]; int startPath[MaxSize]; int endPath[MaxSize]; int startPathLen = 0; int endPathLen = 0; void searchEnd(int end, int pathArr[], int * pLength) { char allNbSearched = 0; ch...
/tmp/cc3KCKww.o: in function `searchEnd': main.c:(.text+0x5a): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/cc3KCKww.o main.c:(.text+0x74): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/cc3KCKww.o main.c:(.text+...
s600460185
p03746
C++
#include <stdio.h> #include <string.h> #include <map> #include <vector> #include <list> #include <pair> using namespace std; int N,M; map<int,vector<int>> paths; list<int> output; int l,r; bool hasYouso(list<int> &a, int k); void chkLeft(void); void chkRight(void); void printOutput(void); void erasePath(int a,int ...
a.cc:6:10: fatal error: pair: No such file or directory 6 | #include <pair> | ^~~~~~ compilation terminated.
s772491651
p03746
C++
#include <bits/stdc++.h> using namespace std; #define pb push_back typedef long long ll; const ll INF = 1000000000000000000ll; const ll MOD = 1000000007ll; const double EPS = 1e-8; list<int> e[100005]; bool used[100005]; list<int> seq; int main(void) { ios_base::sync_with_stdio(false); cin.tie(0); ...
a.cc: In function 'int main()': a.cc:81:13: error: redeclaration of 'int cnt' 81 | int cnt = 0; | ^~~ a.cc:41:13: note: 'int cnt' previously declared here 41 | int cnt = 0; | ^~~
s794157552
p03746
C++
#include <bits/stdc++.h> using namespace std; #define pb push_back typedef long long ll; const ll INF = 1000000000000000000ll; const ll MOD = 1000000007ll; const double EPS = 1e-8; list<int> e[100005]; vector<int> used(n, 0); list<int> seq; int main(void) { //ios_base::sync_with_stdio(false); //cin.t...
a.cc:13:18: error: 'n' was not declared in this scope; did you mean 'yn'? 13 | vector<int> used(n, 0); | ^ | yn
s147042953
p03746
C++
#include <iostream> #include <vector> #include <set> using namespace std; int N,M; vector<int> mat[100000]; vector<int> ans; bool visited[100000]; void DFS(int v) { visited[v] = 1; for(int i = 0; i < mat[v].size(); i++){ int u = mat[v][i]; if(visited[u]==0){ ans.push_back(u+1); DFS(u); break; } } }...
a.cc: In function 'int main()': a.cc:37:9: error: 'reverse' was not declared in this scope 37 | reverse(ans.begin(), ans.end()); | ^~~~~~~
s919168472
p03746
C++
#include <iostream> #include <stdio.h> #include <string> #include <vector> #include <cmath> #include <algorithm> using namespace std; int k=0; bool back = false; void dfs(vector<vector<int> >&G, int N, int p, int s, vector<int>&visited, vector<int>&fpath, vector<int>&bpath) { visited[p] = 1; if(back == false){ ...
a.cc: In function 'void dfs(std::vector<std::vector<int> >&, int, int, int, std::vector<int>&, std::vector<int>&, std::vector<int>&)': a.cc:24:30: error: lvalue required as left operand of assignment 24 | if(visited[G[p][i]] == 0 && back = false){ a.cc:28:30: error: lvalue required as left operand of assignment ...
s099113353
p03746
C++
#include <iostream> #include <vector> #include <map> #include <set> #include <string> using namespace std; const int N = 1e5 + 5; int a[N]; vector<int> e[N]; int in[N]; bool b[N]; int s[N]; // step vector<int> asr; int pre[N]; int mx, ed2; bool dfs1(int cur, int ed) { b[cur] = true; asr.push_back(cur); if(cur == ed...
a.cc: In function 'int main()': a.cc:63:9: error: 'memset' was not declared in this scope 63 | memset(in, 0, sizeof(in)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <set> +++ |+#include <cstring>...
s864038612
p03746
C++
#include <iostream> #include <vector> #include <map> #include <set> using namespace std; const int N = 1e5 + 5; int a[N]; vector<int> e[N]; int in[N]; bool b[N]; int s[N]; // step vector<int> asr; int pre[N]; int mx, ed2; bool dfs1(int cur, int ed) { b[cur] = true; asr.push_back(cur); if(cur == ed) return true; ...
a.cc: In function 'int main()': a.cc:62:9: error: 'memset' was not declared in this scope 62 | memset(in, 0, sizeof(in)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <set> +++ |+#include <cstring>...
s522817479
p03746
C++
#include <iostream> #include <vector> #include <map> #include <set> using namespace std; const int N = 1e5 + 5; int a[N]; vector<int> e[N]; int in[N]; bool b[N]; int s[N]; // step vector<int> asr; int pre[N]; int mx, ed2; bool dfs1(int cur, int ed) { b[cur] = true; asr.push_back(cur); if(cur == ed) return true; ...
a.cc: In function 'int main()': a.cc:62:9: error: 'memset' was not declared in this scope 62 | memset(in, 0, sizeof(in)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <set> +++ |+#include <cstring>...
s344892608
p03746
C++
#include <iostream> #include <string> #include <map> #include <algorithm> #include <list> #include <vector> #include <set> #include <stdio.h> #include <queue> #include <stack> #include <deque> #include <math.h> #include <sstream> #include <stdlib.h> #include <functional> using namespace std; #define rep(i,n) for(int ...
a.cc: In function 'int main()': a.cc:191:22: error: expected ')' before ';' token 191 | a.push_back(s; | ~ ^ | )