submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s912103247
p03673
C++
#include<iostream> using namespace std; int main() { int n,ba=100001,fr=99999; int a[200000];int b[200001];cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; b[100000] = a[0]; for (int i = 1; i < n; i++) { if (i % 2 == n % 2) { b[ba] = a[i];ba++;}else {b[fr] = a[i];fr--;}} for (int i = fr + 1; i < ba - 1; i++) ...
a.cc:9:38: error: extended character   is not valid in an identifier 9 | if (i % 2 == n % 2) { b[ba] = a[i];ba++;}else {b[fr] = a[i];fr--;}} | ^ a.cc: In function 'int main()': a.cc:9:38: error: '\U000000a0b' was not declared in this scope 9 | ...
s813962295
p03673
C++
#include<iostream> using namespace std; int main() { int n,ba=100001,fr=99999;   int a[200001]; int b[200001];   cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; //   b[100000] = a[0]; for (int i = 1; i < n; i++) { if (i % 2 == n % 2) {   b[ba] = a[i]; ba++; } else { b[fr] = a[i]; fr--; }...
a.cc:5:1: error: extended character   is not valid in an identifier 5 |   | ^ a.cc:8:1: error: extended character   is not valid in an identifier 8 |   | ^ a.cc:12:1: error: extended character   is not valid in an identifier 12 |   | ^ a.cc:16:1: error: extended character   is not valid in ...
s820174552
p03673
C++
#include<iostream> using namespace std; int main() { int n,ba=100001,fr=99999;   int a[200001]; int b[200001];   cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; //   b[100000] = a[0]; for (int i = 1; i < n; i++) { if (i % 2 == n % 2) {   b[ba] = a[i]; ba++; } else { b[fr] = a[i]; fr--; }...
a.cc:5:1: error: extended character   is not valid in an identifier 5 |   | ^ a.cc:8:1: error: extended character   is not valid in an identifier 8 |   | ^ a.cc:12:1: error: extended character   is not valid in an identifier 12 |   | ^ a.cc:16:1: error: extended character   is not valid in ...
s162255549
p03673
C++
#include <iostream> #include <array> int main(){ std::array <int,200000> a; int n; std::cin>>n; for (int i;i<n;i++){ std::cin>>a.at(i); } bool flag = true; while(flag){ flag = true; n -=2; for(int i,i<n/2;i++){ if(a.at(i)!=a.at(i+n/2)){ flag=false; } } } std::cout<<n<<s...
a.cc: In function 'int main()': a.cc:15:16: error: expected ';' before '<' token 15 | for(int i,i<n/2;i++){ | ^ | ; a.cc:15:16: error: expected primary-expression before '<' token
s166379316
p03673
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in) ; int n=sc.nextInt(); int a[]=new int[n]; int i,j; for(i=0;i<n;i++){ a[i]=sc.nextInt(); } int b[],c[]; ...
Main.java:23: error: variable c might not have been initialized System.out.print(c[i]+" "); ^ 1 error
s696427527
p03673
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in) ; int n=sc.nextInt(); int a[]=new int[n]; int i,j; for(i=0;i<n;i++){ a[i]=sc.nextInt(); } int b[],c[]; ...
Main.java:13: error: not a statement b[]=new int[i]; ^ Main.java:13: error: ';' expected b[]=new int[i]; ^ Main.java:13: error: not a statement b[]=new int[i]; ^ Main.java:14: error: not a statement c[]=new int[i]; ^ Main.j...
s311878780
p03673
Java
int N=sc.nextInt(); int[]a=new int[N]; for(int i=0;i<N;i++){ a[i]=sc.nextInt(); } Deque<Integer> ad=new ArrayDeque<Integer>(); for(int i=0;i<N;i++){ if(i%2==N%2){ ad.offerLast(a[i]); }else{ ad.offerFirst(a[i]); } } for(Integer num : ad){ System.out.print(num+" "); } System...
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. int N=sc.nextInt(); ^ (use --enable-preview to enable unnamed classes) Main.java:3: error: class, interface, enum, or record expected for(int i=0;i<N;i++){ ^ Main.java:3: error: class, interface, enum, or record expected for(...
s965411204
p03673
C++
main(){ int N; list<int> nums; scanf("%d",&N); int reverse = 0;//反転フラグ for(int i = 0;i < N;i++){ int num; scanf("%d",&num); if(reverse){ nums.push_front(num); }else{ nums.push_back(num); } reverse = !reverse; } //出力 ...
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:3:5: error: 'list' was not declared in this scope 3 | list<int> nums; | ^~~~ a.cc:3:10: error: expected primary-expression before 'int' 3 | li...
s552624169
p03673
C++
#include <cctype> #include <cmath> #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define REP(i, n) for(LL i = 0;i ...
a.cc: In function 'int main()': a.cc:59:22: error: expected '}' at end of input 59 | cout << endl; | ^ a.cc:35:11: note: to match this '{' 35 | int main(){ | ^
s853761458
p03673
C++
#include<iostream> using namespace std; int main(void){ int n,temp; int a[200000]; int b[200000]; int c[200000]; cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; for (int i = 0; i < n; i++) { b[i] = a[i]; for (int d = 0, int e = i; d < e; i++, e--) { temp = b[d]; b[d] = b[e]; b[e] = temp; ...
a.cc: In function 'int main()': a.cc:16:33: error: expected unqualified-id before 'int' 16 | for (int d = 0, int e = i; d < e; i++, e--) | ^~~ a.cc:16:32: error: expected ';' before 'int' 16 | for (int d = 0, int e = i; d < e; i++, e--) |...
s019261259
p03673
C
#include <iostream> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ using namespace std; int main(int argc, char** argv) { long long n; cin>>n; long long flag=n; long long a[n]={0},b[n]={0}; int t=1,count=0; while(n--){ cin>>a[t]; b[t]=a[t]; if(t>=2){ int tem...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s871490749
p03673
C++
#include <cctype> #include <cmath> #include <algorithm> #include <bitset> #include <complex> #include <deque> #include <exception> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define REP(i, n) for(LL i = 0;i ...
a.cc: In function 'int main()': a.cc:39:15: error: class template argument deduction failed: 39 | deque b; | ^ a.cc:39:15: error: no matching function for call to 'deque()' In file included from /usr/include/c++/14/deque:66, from a.cc:6: /usr/include/c++/14/bits/stl_deque...
s784733574
p03673
C++
#include <iostream> #include <vector> #define MAX_NUM 1000000000 using namespace std; int n; int a[MAX_NUM]; int b[MAX_NUM]; int main() { cin >> n; for (int i = 0; i < n; ++i) { cin >> a[i]; } for (int i = 0; i < n; ++i) { b[i] = a[i]; for (int j = 0; j < n / 2; ++j) { ...
/tmp/ccGRkiuL.o: in function `main': a.cc:(.text+0x96): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccGRkiuL.o a.cc:(.text+0xb6): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccGRkiuL.o a.cc:(.text+0xd9): relocation trunc...
s930256142
p03673
C
#include <stdio.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char** argv) { long long n=0; int t=1; long long flag=n; long long a[n]={0}; scanf("%d",&n); while(n--){ scanf("%d",&a[t]); if(t>=2){ int temp1=t; if(t%2==0){ int i=...
main.c: In function 'main': main.c:10:17: error: variable-sized object may not be initialized except with an empty initializer 10 | long long a[n]={0}; | ^
s193522694
p03673
C
#include <stdio.h> int main(void) { int n, a[100000], b[100000], i, j = 0; scanf("%d", &n); for (i = 0;i < n;i++) { scanf("%d", &a[i]); } for (i = n - 1;i >= 1;i -= 2) { b[j] = a[i]; j++; } for (i = 0;i < n - 1;i + = 2) { b[j] = a[i]; } for (i = 0; i < n - 1; i++) { printf("%d ", b[i]); } pr...
main.c: In function 'main': main.c:18:34: error: expected expression before '=' token 18 | for (i = 0;i < n - 1;i + = 2) { | ^
s954915219
p03673
C++
#include <iostream> using namespace std; int main() { int n; int a[200000]; int b[200000]; int i,k; cin>>n; for(i=1;i<=n;i++){ cin>>a[i]; } for(i=1;i<=n;i++){ b[i]=a[i]; for(k=0;k<(j/2);k++){ b[1+k]=b[i-k]; } } for(i=1;i<=n;i++){ cout<<b[i]<<...
a.cc: In function 'int main()': a.cc:17:19: error: 'j' was not declared in this scope 17 | for(k=0;k<(j/2);k++){ | ^
s272998563
p03673
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); int n, tmp; cin >> n; vector<int> b; for (int i = 0; i < n; ++i){ cin >> tmp; b.push_back(tmp); reverse(b.begin(), *b[i]); } co...
a.cc: In function 'int main()': a.cc:17:28: error: invalid type argument of unary '*' (have '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}) 17 | reverse(b.begin(), *b[i]);
s175515550
p03673
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); int n, tmp; cin >> n; vector<int> b; for (int i = 0; i < n; ++i){ cin >> tmp; b.push_back(tmp); reverse(b.begin(), b[i]); } cou...
a.cc: In function 'int main()': a.cc:17:16: error: no matching function for call to 'reverse(std::vector<int>::iterator, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)' 17 | reverse(b.begin(), b[i]); | ~~~~~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorit...
s846449833
p03673
C
#include <stdio.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char** argv) { long n=0; scanf("%d",&n); long flag=n; long a[n]={0}; int t=1; while(n--){ scanf("%d",&a[t]); if(t>=2){ int temp1=t; if(t%2==0){ int i=1; while(i...
main.c: In function 'main': main.c:9:13: error: variable-sized object may not be initialized except with an empty initializer 9 | long a[n]={0}; | ^
s913472041
p03673
C++
#include <iostream> #include <vector> using namespace std; int n; vector<int> a; vector<int> b; void operation(int i) { b.push_back(a[i]); reverse(b.begin(), b.end()); return; } int main() { cin >> n; for (int i = 0; i < n; ++i) { int tmp; cin >> tmp; a.push_back(tmp); ...
a.cc: In function 'void operation(int)': a.cc:12:5: error: 'reverse' was not declared in this scope 12 | reverse(b.begin(), b.end()); | ^~~~~~~
s527947841
p03673
C++
#include<iostream> #include<string> #include<algorithm> #include<cstring> using namespace std; int main() { int n, c = 1, flag = 1, i; char e; string line; cin >> n; while (n--) { cin >> e; line += e; reverse(line.begin(), line.end()); } for (i = 0; i != line.length(); i++) { if (i) cout << ' '; co...
a.cc: In function 'int main()': a.cc:23:8: error: unable to find numeric literal operator 'operator""\U0000ff1b' 23 | return 0; | ^~~ a.cc:23:11: error: expected ';' before '}' token 23 | return 0; | ^ | ; 24 | } | ~
s231433521
p03673
C++
#include <algorithm> #include <iostream> using namespace std; long long int n,b,c; long long int a[200001]; int main(){ b=n/2; c=(n+1)/2 cin>>n; for(int z=0;z<n;z++){ cin>>a[z]>>" "; } if(n%2=1){ for(int i=0;i<c;i++){ a[i+1]=a[n+2-2*(i+1)]; } for(int j=n;j>c;j--){ a[j]=a[-n-1+2*j]; } } if(n%2=0){ for(int i=0;i<b;i...
a.cc: In function 'int main()': a.cc:9:10: error: expected ';' before 'cin' 9 | c=(n+1)/2 | ^ | ; 10 | cin>>n; | ~~~ a.cc:12:10: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'const ch...
s334324512
p03673
C++
#include <algorithm> #include <iostream> using namespace std; long long int n,b,c; long long int a[200001]; int main(){ b=n/2; c=(n+1)/2; cin>>n; for(int z=0;z<n;z++){ cin>>a[z]; } if(n%2=1){ for(int i=1;i<=c;i++){ a[i]=a[n+2-2*i]; } for(int j=n;j>c;j--){ a[j]=a[-n-1+2*j]; } } if(n%2=0){ for(int i=1;i<=b;i++){ a[i...
a.cc: In function 'int main()': a.cc:14:5: error: lvalue required as left operand of assignment 14 | if(n%2=1){ | ~^~ a.cc:22:5: error: lvalue required as left operand of assignment 22 | if(n%2=0){ | ~^~
s016844194
p03673
C++
#include <algorithm> #include <iostream> using namespace std; long long int n,b,c; long long int a[200001]; int main(){ b=n/2; c=(n+1)/2 cin>>n; for(int z=0;z<n;z++){ cin>>a[z]>>" "; } if(n%2=1){ for(int i=1;i<=c;i++){ a[i]=a[n+2-2*i]; } for(int j=n;j>c;j--){ a[j]=a[-n-1+2*j]; } } if(n%2=0){ for(int i=1;i<=b;i++){ ...
a.cc: In function 'int main()': a.cc:9:10: error: expected ';' before 'cin' 9 | c=(n+1)/2 | ^ | ; 10 | cin>>n; | ~~~ a.cc:12:10: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'const ch...
s952561833
p03673
C++
#include <iostream> #include <vector> #include <cstdio> #include <stdio.h> using namespace std; int main(void){ //input int n;scanf("%d",&n); vector<int> v; for(int i=0; i<n ; i++){ int tmp;scanf("%d",&tmp); v.push_back(tmp); reverse(begin(v),end(v)); } //output for(int i=0; i<n ; i++){ ...
a.cc: In function 'int main()': a.cc:16:5: error: 'reverse' was not declared in this scope 16 | reverse(begin(v),end(v)); | ^~~~~~~
s250041929
p03673
C++
#include <iostream> //#include <string> #include <vector> using namespace std; int main() { int n; vector<int> v; cin >> n; for(int i=0; i<n; i++) { int a; cin >> a; v.push_back(a); } vector<int> v2; for(int i=0; ...
a.cc: In function 'int main()': a.cc:21:7: error: 'reverse' was not declared in this scope 21 | reverse(v2.begin(),v2.end()); | ^~~~~~~
s533974716
p03673
C++
#include <iostream> #include <vector> #include <cstdio> #include <stdio.h> using namespace std; int main(void){ //input int n;scanf("%d",&n); vector<int> v; for(int i=0; i<n ; i++){ int tmp;scanf("%d",&tmp); v.push_back(tmp); reverse(begin(v),end(v)); } //output for(int i=0; i<n ; i++){ ...
a.cc: In function 'int main()': a.cc:16:5: error: 'reverse' was not declared in this scope 16 | reverse(begin(v),end(v)); | ^~~~~~~
s129243592
p03673
C++
#include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; vector<int> a(n); vector<int> b; for (int i = 0; i < n; ++i) { cin >> a[i]; } for (int i = 0; i < n; ++i) { b.push_back(a[i]); reverse(b.begin(), b.end()); } for (int i = 0; i < n; ++i) { cout << ...
a.cc: In function 'int main()': a.cc:15:5: error: 'reverse' was not declared in this scope 15 | reverse(b.begin(), b.end()); | ^~~~~~~
s877593182
p03673
C++
#include <iostream> #include <string> #include <vector> using namespace std; int main(){ int n; vector<long long> odds, evens, out_v; cin >> n; for (int i=1;i<=n;i++) { long a; cin >> a; if (i%2==1) { odds.push_back(a); } else { evens.push_back(a); } } if (n % 2==1) { r...
a.cc: In function 'int main()': a.cc:21:5: error: 'reverse' was not declared in this scope; did you mean 'evens'? 21 | reverse(odds.begin(), odds.end()); | ^~~~~~~ | evens a.cc:28:5: error: 'reverse' was not declared in this scope; did you mean 'evens'? 28 | reverse(evens.begin(), even...
s521768153
p03673
C++
#include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; vector<int> a(n); vector<int> b; for (int i = 0; i < n; ++i) { cin >> a[i]; } for (int i = 0; i < n; ++i) { b.push_back(a[i]); std::reverse(b.begin(), b.end()); } for (int i = 0; i < n; ++i) { cou...
a.cc: In function 'int main()': a.cc:15:10: error: 'reverse' is not a member of 'std' 15 | std::reverse(b.begin(), b.end()); | ^~~~~~~
s114809029
p03673
C++
#include <iostream> #include <vector> #include <cstdio> using namespace std; int main(void){ //input int n;scanf("%d",&n); vector<int> v; for(int i=0; i<n ; i++){ int tmp;scanf("%d",&tmp); v.push_back(tmp); reverse(begin(v),end(v)); } //output for(int i=0; i<n ; i++){ cout << v[i] <<...
a.cc: In function 'int main()': a.cc:15:5: error: 'reverse' was not declared in this scope 15 | reverse(begin(v),end(v)); | ^~~~~~~
s296657665
p03673
C++
#include <bits/stdc++.h> using namespace std; #define MAXN 200002 int main() { int n; cin>>n; int a[MAXN]; int x; for(int i=1;i<=n;++i) cin>>a[i]; for(int i=n;i>0;i-=2) { cout<<a[i]<<' '; x = i+2; } for(x;x<n;x+=2) { cout<<a[x]<<' '; } return...
a.cc:25:2: error: stray '#' in program 25 | }#include <bits/stdc++.h> | ^ a.cc:25:3: error: 'include' does not name a type 25 | }#include <bits/stdc++.h> | ^~~~~~~ a.cc:30:5: error: redefinition of 'int main()' 30 | int main() | ^~~~ a.cc:6:5: note: 'int main()' previously defined here...
s512164810
p03673
C++
#include <iostream> using namespace std; int main(void){ int n; int i, j; cin >> n ; int *a = new int[n]; int *b = new int[n]; int *bf_b = new int[n]; //操作2前の数列b for(i=0; i < n; i++){ cin >> a[i]; } for(i=0; i<n; i++){ bf_b[i] = a[i]; for(j=0; j<i; j++){ b[j] = bf_b[i - j -1]; } for(j=0; j <i...
a.cc: In function 'int main()': a.cc:28:29: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'char') 28 | cin >> b[i] >> ' '; | ~~~~~~~~~~~ ^~ ~~~ | | | | ...
s827387047
p03673
C++
#include <iostream> #include <fstream> #include <cstdio> #include <cassert> #include <complex> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <cstdlib> #include <cstring> #include <iomanip> #include <numeric> #include <sstream> #include <ctime> #include <cctype> #include <set> #inclu...
a.cc:24:10: fatal error: _mingw.h: No such file or directory 24 | #include <_mingw.h> | ^~~~~~~~~~ compilation terminated.
s151284236
p03673
C++
//all possible// #include<iostream> using namespace std; int a,b,c,n,i,j,k,l,m; int main() { deque <int> v; cin>>n; for(i=0;i<n;i++) { cin>>a; v.push_front(a); reverse(v.begin(),v.end()); } reverse(v.begin(),v.end()); for(i=0;i<v.size();i++) { cout<<v[i]<<" "; } }
a.cc: In function 'int main()': a.cc:7:9: error: 'deque' was not declared in this scope 7 | deque <int> v; | ^~~~~ a.cc:3:1: note: 'std::deque' is defined in header '<deque>'; this is probably fixable by adding '#include <deque>' 2 | #include<iostream> +++ |+#include <deque> 3 | usin...
s049817358
p03673
C++
/* 長さ n の数列 a1,…,an が与えられます。 空の数列 b に対して、以下の操作を n 回行うことを考えます。 i 回目には 数列の i 番目の要素 ai を b の末尾に追加する。 b を逆向きに並び替える。 この操作をしてできる数列 b を求めて下さい。 制約 1≤n≤2×10^5 0≤ai≤109 n,ai は整数である。 */ #include<stdio.h> int *returning(int input[10000],int n) { int ret[10000]; int i; for ( i = 0; i < n; i++) { ret[i] = input[n - i - 1]; ...
a.cc: In function 'int* returning(int*, int)': a.cc:23:16: warning: address of local variable 'ret' returned [-Wreturn-local-addr] 23 | return ret; | ^~~ a.cc:17:13: note: declared here 17 | int ret[10000]; | ^~~ a.cc: In function 'int main()': a.cc:39:21: er...
s842866433
p03673
C++
#include <iostream> #include <vector> using namespace std; int main(){ int n; vector<int> nums; vector<int> b; cin >> n; for(int i=0;i<n;i++){ int tmp; cin >> tmp; nums.push_back(tmp); } for(int i=0;i<n;i++){ b.push_back(nums[i]); reverse(b.begin(), b.end()); } for(int i=0;i<n-1...
a.cc: In function 'int main()': a.cc:18:5: error: 'reverse' was not declared in this scope 18 | reverse(b.begin(), b.end()); | ^~~~~~~
s719220880
p03673
C++
#include <iostream> #include <vector> using namespace std; int main(){ int n; vector<int> nums; vector<int> b; cin >> n; for(int i=0;i<n;i++){ int tmp; cin >> tmp; nums.push_back(tmp); } for(int i=0;i<n;i++){ b.push_back(nums[i]); reverse(b.begin(), b.end()); } for(int i=0;i<n-1...
a.cc: In function 'int main()': a.cc:18:5: error: 'reverse' was not declared in this scope 18 | reverse(b.begin(), b.end()); | ^~~~~~~
s545383952
p03673
Java
for(int i=0;i<n;i++){ System.out.print(queue.poll()); System.out.print(" "); }
Main.java:1: error: class, interface, enum, or record expected for(int i=0;i<n;i++){ ^ Main.java:1: error: class, interface, enum, or record expected for(int i=0;i<n;i++){ ^ Main.java:1: error: class, interface, enum, or record expected for(int i=0;i<n;i++){ ^ Main.java:3: error: class, inte...
s478935930
p03673
C++
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; int ara[n+10]; for(int i=0;i<n;i++) cin>>ara[i]; bool flag=1; for(int i=n-1;I>0;i-=2) { if(flag){ cout<<ara[i]; flag=0; } else cout<<' ' <<ara[i]; } flag=1; for(int i=0;I<n;i+=2) { if(flag){ cout<<ara[i]; flag=0; } else cout<<' ' <<ara[i]; } }
a.cc: In function 'int main()': a.cc:10:15: error: 'I' was not declared in this scope 10 | for(int i=n-1;I>0;i-=2) { | ^ a.cc:18:13: error: 'I' was not declared in this scope 18 | for(int i=0;I<n;i+=2) { | ^
s240110727
p03673
C++
#include <iostream> #include <vector> using namespace std; int main(int argc, const char * argv[]) { long long n; long long x; vector<long long> a, b; cin >> n; for (int i = 0; i < n; i++) { cin >> x; a.push_back(x); } for (int i = 0; i < n; i++) { b.p...
a.cc: In function 'int main(int, const char**)': a.cc:19:9: error: 'reverse' was not declared in this scope 19 | reverse(b.begin(), b.end()); | ^~~~~~~
s185039735
p03673
C++
/* Rohan Balot NSIT, New Delhi, India */ #include <algorithm> #include <bitset> #include <functional> #include <iostream> #include <iomanip> #include <limits> #include <map> #include <numeric> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <queue> #include <ut...
a.cc: In function 'void __answer()': a.cc:113:9: error: 'list' was not declared in this scope 113 | list<int> l; | ^~~~ a.cc:28:1: note: 'std::list' is defined in header '<list>'; this is probably fixable by adding '#include <list>' 27 | #include <ctime> +++ |+#include <list> 28 | using ...
s601394021
p03674
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(ll i=0;i<n;i++) #define repl(i,l,r) for(ll i=(l);i<(r);i++) #define per(i,n) for(ll i=n-1;i>=0;i--) #define perl(i,r,l) for(ll i=r-1;i>=l;i--) #define fi first #define se second #define pb push_back #define ins insert #define all(x) (x).begin(),(x).end()...
a.cc: In function 'int main()': a.cc:235:3: error: no match for 'operator%=' (operand types are 'mint' {aka 'Fp<1000000007>'} and 'const ll' {aka 'const long long int'}) 235 | cb%=MOD; | ~~^~~~~
s369652806
p03674
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(ll i=0;i<n;i++) #define repl(i,l,r) for(ll i=(l);i<(r);i++) #define per(i,n) for(ll i=n-1;i>=0;i--) #define perl(i,r,l) for(ll i=r-1;i>=l;i--) #define fi first #define se second #define pb push_back #define ins insert #define all(x) (x).begin(),(x).end()...
a.cc: In function 'int main()': a.cc:221:8: error: no match for 'operator==' (operand types are 'll' {aka 'long long int'} and 'mint' {aka 'Fp<1000000007>'}) 221 | if(a[i]==ca){ | ~~~~^~~~ | | | | | mint {aka Fp<1000000007>} | ll {aka long long int} In file included from...
s621984759
p03674
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(ll i=0;i<n;i++) #define repl(i,l,r) for(ll i=(l);i<(r);i++) #define per(i,n) for(ll i=n-1;i>=0;i--) #define perl(i,r,l) for(ll i=r-1;i>=l;i--) #define fi first #define se second #define pb push_back #define ins insert #define all(x) (x).begin(),(x).end()...
a.cc: In function 'int main()': a.cc:151:1: error: 'mint' was not declared in this scope; did you mean 'uint'? 151 | mint ca = 0,r = 0,l = 1000000; | ^~~~ | uint a.cc:155:15: error: 'ca' was not declared in this scope; did you mean 'a'? 155 | if(b[a[i]]==2)ca = a[i];} | ^~ | ...
s288173174
p03674
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(ll i=0;i<n;i++) #define repl(i,l,r) for(ll i=(l);i<(r);i++) #define per(i,n) for(ll i=n-1;i>=0;i--) #define perl(i,r,l) for(ll i=r-1;i>=l;i--) #define fi first #define se second #define pb push_back #define ins insert #define all(x) (x).begin(),(x).end()...
a.cc:170:21: error: expected declaration before '}' token 170 | cout << ca << endl;}} | ^
s443530382
p03674
C++
// {{{ by unolight #include <bits/stdc++.h> #include <unistd.h> #pragma GCC diagnostic ignored "-Wunused-result" #define SZ(x) ((int)(x).size()) #define ALL(x) begin(x),end(x) #define RALL(x) rbegin(x),rend(x) #define REP(i,n) for ( int i=0; i<int(n); i++ ) #define REP1(i,a,b) for ( int i=(a); i<=int(b); i++ ) #define ...
a.cc: In function 'int main()': a.cc:162:9: error: 'k' was not declared in this scope 162 | k=a[i]; | ^ a.cc:163:9: error: 'l' was not declared in this scope 163 | l=used[a[i]]; | ^
s362035661
p03674
C++
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; using ll = long long; #define pp pair<int,int> #define rep(i,n) for(int (i)=0;(i)<(n);(i)++) #define ld long double #define al(a) (a).begin(),(a).end() #define mk make_pair #define check cout<<"?"<<endl; ll MOD=1000000007; ll mod=998244353; int inf...
a.cc: In function 'int main()': a.cc:22:21: error: 'd' was not declared in this scope 22 | scanf("%d",&d); | ^
s181720039
p03674
C++
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; using ll = long long; #define pp pair<int,int> #define rep(i,n) for(int (i)=0;(i)<(n);(i)++) #define ld long double #define al(a) (a).begin(),(a).end() #define mk make_pair #define check cout<<"?"<<endl; ll MOD=1000000007; ll mod=998244353; int inf...
a.cc: In function 'int main()': a.cc:38:9: error: 'print' was not declared in this scope; did you mean 'rint'? 38 | print("%d",(c-d+MOD)%MOD); | ^~~~~ | rint
s377293683
p03674
C++
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; using ll = long long; #define pp pair<int,int> #define rep(i,n) for(int (i)=0;(i)<(n);(i)++) #define ld long double #define al(a) (a).begin(),(a).end() #define mk make_pair #define check cout<<"?"<<endl; ll MOD=1000000007; ll mod=998244353; int inf...
a.cc: In function 'int main()': a.cc:22:21: error: 'd' was not declared in this scope 22 | scanf("%d",&d); | ^ a.cc:38:9: error: 'print' was not declared in this scope; did you mean 'rint'? 38 | print("%d",(c-d+MOD)%MOD); | ^~~~~ | rint
s703561494
p03674
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; // https://freestylewiki.xyz/fswiki/wiki.cgi?page=AtCoder+Beginner+Contest+066 ll mod = 1000000007; ll factorial[100002]; ll mod_factorial[100002]; ll pow(ll factor, ll q) { if (q == 1) { return factor % mod; } if (q % 2 == 0) { ll sub...
a.cc: In function 'int main()': a.cc:74:15: error: 'n' was not declared in this scope 74 | cout << n << endl; | ^ a.cc:76:16: error: 'n' was not declared in this scope 76 | if (i == n + 1) { | ^
s801016203
p03674
C++
#include<iostream> #include<vector> #include<utility> using namespace std; const int MAX = 10000000; const int MOD = 1000000007; long long fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++){ fac[i...
a.cc: In function 'int main()': a.cc:47:5: error: expected ',' or ';' before 'while' 47 | while(c<0){ | ^~~~~
s624887007
p03674
C++
#include<iostream> #include<vector> #include<utility> using namespace std; const int MAX = 10000000; const int MOD = 1000000007; long long fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++){ fac[i...
a.cc:24:15: error: 'll' was not declared in this scope 24 | long long COM(ll n, ll k){ | ^~ a.cc:24:21: error: 'll' was not declared in this scope 24 | long long COM(ll n, ll k){ | ^~ a.cc:24:25: error: expression list treated as compound expression in initializer [-f...
s062324069
p03674
C++
#include <bits/stdc++.h> #define SIZE 300005 #define MOD 1000000007LL #define EPS 1e-10 #define INF 1<<29 #define LLINF 1LL<<60 #define REP(i,n) for(int i=0;i<n;i++) #define FOR(i,a,b) for(int i=a;i<=b;i++) #define DOWN(i,b,a) for(int i=b;i>=a;i--) #define SET(a,c) memset(a,c,sizeof a) #define BIT(i,j) ((i)>>(j))&1 #de...
a.cc: In function 'int main()': a.cc:62:29: error: too few arguments to function 'll modcomb(ll, ll)' 62 | ans = (ans - modcomb(N-diff), k-1) + MOD) % MOD; | ~~~~~~~^~~~~~~~ a.cc:30:4: note: declared here 30 | ll modcomb(ll n, ll k){ | ^~~~~~~
s131953656
p03674
C++
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdlib> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <set> #include <string> #include <utility> #include <vector> #define REP(i, n) for(int i = 0; i < (n); ++i) typedef long long ll; const ll MOD...
a.cc: In function 'll comb(int, int)': a.cc:50:24: error: 'reuturn' was not declared in this scope 50 | if(a < 0 || b < 0) reuturn 0; | ^~~~~~~
s699471698
p03674
Java
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.InputStream; import java.util.*; public class Main { static int mod=1_000_000_007; static...
Main.java:110: error: <identifier> expected out.close(); ^ Main.java:142: error: class, interface, enum, or record expected } ^ 2 errors
s541117362
p03674
C++
#include <bits/stdc++.h> #define REP(i, n) for(ll i = 0; i < (ll)n; i++) #define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++) #define ALL(obj) (obj).begin(), (obj).end() #define INF (1ll << 60) #define sz(x) int(x.size()) using namespace std; typedef long long ll; typedef double db; typedef string str; typedef pair<ll,...
a.cc: In function 'int main()': a.cc:78:5: error: expected primary-expression before '<<' token 78 | << endl; | ^~
s808798742
p03674
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; typedef long long ll; const int mod = 1000000007; const int MAX_N = 100005; ll fact[MAX_N]; // 階乗 ll ifact[MAX_N]; // 階乗の逆元 // x^nを求める繰り返し二乗法(累乗の高速化) // フェルマーの小定理より、逆元を計算するときに用いる。 ll mod_pow(ll x, int n){ if(n == 0) ...
a.cc: In function 'int main()': a.cc:82:5: error: expected ',' or ';' before 'for' 82 | for(int i = 1; i <= n+1; ++i){ // 数字をi個取る | ^~~ a.cc:82:20: error: 'i' was not declared in this scope 82 | for(int i = 1; i <= n+1; ++i){ // 数字をi個取る | ^
s328376544
p03674
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<n;i++) #define REPP(i,n) for(int i=1;i<=n;i++) long long inf=(long long)1E17; #define i_7 (long long)(1E9+7) long mod(long a){ long long c=a%i_7; if(c>=0)return c; return c+i_7; } using namespace std; //typedef long long ll; long long po(long a, long ...
a.cc:29:1: error: expected ',' or ';' before 'long' 29 | long long inv[SIZE+1];//各iの逆元を格納する配列。 | ^~~~ a.cc: In function 'void invinit()': a.cc:34:5: error: 'inv' was not declared in this scope; did you mean 'int'? 34 | inv[1]=1; | ^~~ | int
s835719181
p03674
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<n;i++) #define REPP(i,n) for(int i=1;i<=n;i++) long long inf=(long long)1E17; #define i_7 (long long)(1E9+7) long mod(long a){ long long c=a%i_7; if(c>=0)return c; return c+i_7; } //using namespace std; //typedef long long ll; long long po(long a, lon...
a.cc:29:15: error: 'SIZE' was not declared in this scope 29 | long long inv[SIZE+1];//各iの逆元を格納する配列。 | ^~~~ a.cc:30:15: error: 'SIZE' was not declared in this scope 30 | long long kai[SIZE+1];//i!のmodを格納する配列。 | ^~~~ a.cc:31:18: error: 'SIZE' was not declared in this scope ...
s279130987
p03674
C++
#include<iostream> #include<map> #include<vector> using namespace std; const int MAX=210000; const long long MOD=1000000007; typedef long long ll; ll fac[MAX],finv[MAX],inv[MAX]; ll mod_pow(ll x, ll n){ //べき乗 ll ans=1; while(n!=0){ if(n&1) ans=ans*x%MOD; x=x*x%MOD; n=n>>1; } r...
a.cc:74:1: error: expected declaration before '}' token 74 | } | ^
s662195327
p03674
C++
#include <bits/stdc++.h> #define int long long #define rep(i,n) for(int i=0;i<n;i++) using namespace std; #define MOD 1000000007 //int kaijo(int n){ //int ans=1; //for(int i=2;i<=n;i++){ // ans*=i; // ans%=MOD; //} //return ans; //} int modpow(int a,int b){ if(b==0)return 1; if(b%2)return modpow(a,b-1)*a%MOD; ...
a.cc: In function 'int main()': a.cc:39:35: error: expected ';' before '}' token 39 | v.push_back({a,i}) | ^ | ; 40 | } | ~
s374425906
p03674
C++
#include <bits/stdc++.h> #define int long long #define rep(i,n) for(int i=0;i<n;i++) using namespace std; #define MOD 1000000007 //int kaijo(int n){ //int ans=1; //for(int i=2;i<=n;i++){ // ans*=i; // ans%=MOD; //} //return ans; //} int modpow(int a,int b){ if(b==0)return 1; if(b%2)return modpow(a,b-1)*a%MOD; ...
a.cc: In function 'int main()': a.cc:49:33: error: 'i' was not declared in this scope 49 | cout<<(comb(n+1,i)-comb1(s,i-1)+MOD)%MOD; | ^ a.cc:49:36: error: 'comb1' was not declared in this scope; did you mean 'comb'? 49 | cout<<(comb(n+1,i)-com...
s991836100
p03674
C++
#include <bits/stdc++.h> #define int long long #define rep(i,n) for(int i=0;i<n;i++) using namespace std; #define MOD 1000000007 //int kaijo(int n){ //int ans=1; //for(int i=2;i<=n;i++){ // ans*=i; // ans%=MOD; //} /return ans; //} int modpow(int a,int b){ if(b==0)return 1; if(b%2)return modpow(a,b-1)*a%MOD; r...
a.cc:12:9: error: expected unqualified-id before '/' token 12 | /return ans; | ^
s041060168
p03674
C++
#include <bits/stdc++.h> #define int long long #define rep(i,n) for(int i=0;i<n;i++) using namespace std; #define MOD 1000000007 int kaijo(int n){ int ans=1; for(int i=2;i<=n;i++){ ans*=i; ans%=MOD; } return ans; } int modpow(int a,int b){ if(b==0)return 1; if(b%2)return modpow(a,b-1)*a%MOD; return modpow(a,...
a.cc: In function 'int main()': a.cc:38:20: error: 'i' was not declared in this scope 38 | if(i)C[n-(r-l)][0]=comb(n-(r-l),k-1); | ^ a.cc:47:2: error: expected '}' at end of input 47 | } | ^ a.cc:24:14: note: to match this '{' 24 | signed main(){ | ...
s673212350
p03674
C++
#include <bits/stdc++.h> #define int long long #define rep(i,n) for(int i=0;i<n;i++) using namespace std; #define MOD 1000000007 int kaijo(int n){ int ans=1; for(int i=2;i<=n;i++){ ans*=i; ans%=MOD; } return ans; } int modpow(int a,int b){ if(b==0)return 1; if(b%2)return modpow(a,b-1)*a%MOD; return modpow(a,...
a.cc: In function 'int main()': a.cc:38:49: error: 'k' was not declared in this scope 38 | if(i)C[n-(r-l)][0]=comb(n-(r-l),k-1); | ^ a.cc:39:29: error: 'k' was not declared in this scope 39 | if(n-(r-l)>=k-1)C[n+1][1]=0; |...
s183979301
p03674
C++
#include <bits/stdc++.h> //#define int long long #define rep(i,n) for(int i=0;i<n;i++) using namespace std; #define all(v) v.begin(),v.end() int kaijo(int n){ int ans=1; for(int i=2;i<=n;i++){ ans*=i; ans%=MOD; } return ans; } int modpow(int a,int b){ if(b==0)return 1; if(b%2)return modpow(a,b-1)*a%MOD; retu...
a.cc: In function 'int kaijo(int)': a.cc:10:22: error: 'MOD' was not declared in this scope 10 | ans%=MOD; | ^~~ a.cc: In function 'int modpow(int, int)': a.cc:16:39: error: 'MOD' was not declared in this scope 16 | if(b%2)return modpow(a,b-1)*a%MOD; | ...
s502611342
p03674
C++
#include<iostream> #include<cstdio> #include<vector> #include<queue> #include<map> #include<unordered_map> #include<stack> #include<string> #include<algorithm> #include<functional> #include<cstring> #include<utility> #include<bits/stdc++.h> #include<math.h> using namespace std; /**** Type Define ****/ typedef long lo...
a.cc: In function 'int main()': a.cc:252:70: error: found ':' in nested-name-specifier, expected '::' 252 | zenbu=((zenbu*invmod(k,mod))%mod*(n-k+2))%mod: | ^ | ...
s392659316
p03674
C++
#include<iostream> #include<cstdio> #include<vector> #include<queue> #include<map> #include<unordered_map> #include<stack> #include<string> #include<algorithm> #include<functional> #include<cstring> #include<utility> #include<bits/stdc++.h> #include<math.h> using namespace std; /**** Type Define ****/ typedef long lo...
a.cc: In function 'int main()': a.cc:227:78: error: expected ';' before ')' token 227 | zenbu=(zenbu%mod)*(((invmod(i,mod)%mod)*(n-i+2)%mod)%mod)%mod); | ^ | ...
s285881979
p03674
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; const ll MOD=1e9+7; ll factorial[200010]; ll inverse_factorial[200010]; ll add(ll x, ll y){return (x+y)%MOD;} ll mlt(ll x, ll y){return (x*y)%MOD;} ll sbt(ll x, ll y){return (MOD+(x-y)%MOD)%MOD;} ll power(int x, int n){ ll ...
a.cc: In function 'int main()': a.cc:53:15: error: 'a_' was not declared in this scope; did you mean 'a'? 53 | int p=table[a_][0], q=table[a_][1]; | ^~ | a a.cc:54:11: error: 'q' was not declared in this scope 54 | int l=n-q+p, m=q-p-1; | ^
s497776284
p03674
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; const ll MOD=1e9+7; ll factorial[200010]; ll inverse_factorial[200010]; ll add(ll x, ll y){return (x+y)%MOD;} ll mlt(ll x, ll y){return (x*y)%MOD;} ll sbt(ll x, ll y){return (MOD+(x-y)%MOD)%MOD;} ll power(int x, int n){ ll ...
a.cc: In function 'int main()': a.cc:46:18: error: 'N' was not declared in this scope 46 | for (int i=0;i<N+1;++i){ | ^ a.cc:53:15: error: 'a_' was not declared in this scope; did you mean 'a'? 53 | int p=table[a_][0], q=table[a_][1]; | ^~ | a a.c...
s056243570
p03674
C
#include<stdio.h> #define mod 1000000007 int n,i,a[100001],r,l,f[100001]={0}; long long mol(long long a,long long b){ if(b==1)return a; if(b%2==0){ long long t=mol(a,b/2); return (t*t)%mod; } return (a*mol(a,b-1))%mod; } long long div(long long a,long long b){ return (a*(mol(b,mod-2)))%mod; } lon...
main.c:25:14: error: initializer element is not constant 25 | long long nn=kaijo(n+1); | ^~~~~ main.c:26:16: error: initializer element is not constant 26 | long long nnlr=kaijo(-r+l+n); | ^~~~~ main.c: In function 'ncm': main.c:31:28: error: expected ';' before 'long' 3...
s105580196
p03674
C++
#include <cstdio> #include <algorithm> #include <iostream> #include <functional> #include <vector> #include <queue> #include <map> #include <stack> using namespace std; typedef long long ll; #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 ...
/tmp/ccECHb4k.o: in function `main': a.cc:(.text+0x276): relocation truncated to fit: R_X86_64_PC32 against symbol `dups' defined in .bss section in /tmp/ccECHb4k.o a.cc:(.text+0x298): relocation truncated to fit: R_X86_64_PC32 against symbol `dups' defined in .bss section in /tmp/ccECHb4k.o a.cc:(.text+0x2af): relocat...
s952499604
p03674
C++
#include "bits/stdc++.h" using namespace std; /* macro */ #define rep(i,a,b) for(int i=a;i<b;i++) #define revrep(i,a,b) for(int i = a; i > b; i--) #define int long long #define exist(s,e) ((s).find(e)!=(s).end()) #define all(v) (v).begin(), (v).end() #define each(s,itr) for(auto (itr) = s.begin(); (itr) != s.end(); (...
a.cc: In function 'int main()': a.cc:154:71: error: expected ')' before ';' token 154 | print(((bf.nCr(n + 1, i) - bf.nCr(l + r, i - 1) + mod) % mod); | ~ ^ | ...
s251219315
p03674
C++
#include <iostream> #include <vector> #include <unordered_map> #include <algorithm> #include <map> #include <cmath> long long mod(long long a, long long b) { return a - long long(std::floor(double(a) / b)) * b; } long long power_func(long long a, long long b, long long p) { if (b == 0) return 1; if (b ...
a.cc: In function 'long long int mod(long long int, long long int)': a.cc:12:16: error: expected primary-expression before 'long' 12 | return a - long long(std::floor(double(a) / b)) * b; | ^~~~ a.cc:12:15: error: expected ';' before 'long' 12 | return a - long long(std::floor(double(...
s070065923
p03674
C++
#include <iostream> #include <vector> #include <unordered_map> #include <algorithm> #include <map> long long mod(long long a, long long b) { return a - std::floor(a / b) * b; } long long power_func(long long a, long long b, long long p) { if (b == 0) return 1; if (b % 2 == 0){ long long d = pow...
a.cc: In function 'long long int mod(long long int, long long int)': a.cc:11:21: error: 'floor' is not a member of 'std' 11 | return a - std::floor(a / b) * b; | ^~~~~
s221575121
p03674
C++
#include "bits/stdc++.h" // {{{ #undef DEBUG using namespace std; #define outl(x) cout << (x) << '\n' #define rep(i,n) for(int i=0; i < (int)(n); ++i) #define ten(p) ((long long)(1e##p)) #define FILL(a,v) memset((a), (v), sizeof(a)) #ifdef DEBUG #define debug(...) fprintf(stderr, __VA_ARGS__) #define sh...
a.cc:127:15: error: redefinition of 'constexpr const long long int ydk::MX' 127 | constexpr int MX = 3 * ten(5) + 10; | ^~ a.cc:25:15: note: 'constexpr const long long int ydk::MX' previously defined here 25 | constexpr int MX = 3 * ten(5) + 10; | ^~ a.cc:129:15: error: rede...
s830025027
p03674
C++
#include <bits/stdc++.h> using namespace std; #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++) #define itrfor(itr,A) for(auto itr = A.begin(); itr !=A.end();itr++) typedef int64_t llong; char moji[26]={'a','b','c','d','e','f','g','h','...
a.cc: In function 'int main()': a.cc:59:23: error: assigning to an array from an initializer list 59 | if(doub==0) subcom={}; | ~~~~~~^~~
s465230922
p03674
C++
#include <bits/stdc++.h> #include <boost/multiprecision/cpp_int.hpp> using namespace std; using namespace boost::multiprecision; // Define using ll = long long; using ull = unsigned long long; using ld = long double; using int128 = __int128; using cint = cpp_int; const ll MOD = 1e9 + 7; const ll INF = LONG_MAX; const ...
a.cc:2:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory 2 | #include <boost/multiprecision/cpp_int.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s089520760
p03674
C++
#include "pch.h" #include <iostream> #include <string> #include <algorithm> #include <cmath> #include <math.h> #include <vector> #include <stack> #include <queue> #include <map> #include <set> #include <limits.h> using namespace std; #define INF LLONG_MAX/3 #define inf INT_MAX/3 #define MOD 1000000007 #define rep(i,n...
a.cc:1:10: fatal error: pch.h: No such file or directory 1 | #include "pch.h" | ^~~~~~~ compilation terminated.
s129116444
p03674
C++
32 525 5453 40919 237336 1107568 4272048 13884156 38567100 92561040 193536720 354817320 573166440 818809200 37158313 166803103 166803103 37158313 818809200 573166440 354817320 193536720 92561040 38567100 13884156 4272048 1107568 237336 40920 5456 528 33 1
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 32 | ^~
s193134305
p03674
C++
for(int i=1;i<=n;i++){ if(i == 1){ cout << n-1 << endl; }else{ tmp = ncrgyaku(n,i); l = left+right >= i-1 ? ncrgyaku(left+right,i-1): 0; cout << (tmp - l + 2*MOD) % MOD << endl; } } return 0; }
a.cc:2:3: error: expected unqualified-id before 'for' 2 | for(int i=1;i<=n;i++){ | ^~~ a.cc:2:15: error: 'i' does not name a type 2 | for(int i=1;i<=n;i++){ | ^ a.cc:2:20: error: 'i' does not name a type 2 | for(int i=1;i<=n;i++){ | ^ a.cc:12:3: err...
s183987192
p03674
C++
[Window Title] This is an unregistered copy [Main Instruction] Hello! Thanks for trying out Sublime Text. This is an unregistered evaluation version, and although the trial is untimed, a license must be purchased for continued use. Would you like to purchase a license now? [Purchase] [取消]
a.cc:1:1: error: expected unqualified-id before '[' token 1 | [Window Title] | ^
s223391803
p03674
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MD = 1000000007; const int MAXN = 1e5 + 10; ll fact[MAXN + 1]; ll invfact[MAXN + 1]; // binary exp ll mod_pow(ll x, ll tn){ if(tn == 0) return 1; ll res = mod_pow(x*x %MD, tn/2); if(tn &1) res = res*x %MD; // n is odd return res; ...
a.cc: In function 'll comb(int, int)': a.cc:32:60: error: invalid operands of types 'double' and 'const ll' {aka 'const long long int'} to binary 'operator%' 32 | return ((fact[tn]*invfact[r] %MD)*invfact[tn-r] + 1e9+7) %MD; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~ | ...
s771344232
p03674
C
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MD = 1000000007; const int MAXN = 1e5 + 10; ll fact[MAXN + 1]; ll invfact[MAXN + 1]; // binary exp ll mod_pow(ll x, ll tn){ if(tn == 0) return 1; ll res = mod_pow(x*x %MD, tn/2); if(tn &1) res = res*x %MD; // n is odd return res; ...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s129647600
p03674
C++
#include<bits/stdc++.h> typedef long long ll; using namespace std; int INF = 1LL << 30; int MOD = 1e9+7; ll powmod(ll x,ll n){ if(n == 0)return 1; if(n & 1)return x * powmod(x,n-1) % MOD; else return powmod(x*x % MOD, k/2); } ll divmod(ll a,ll b){ return ((a%MOD) * (powmod(b,MOD-2)%MOD)) % MOD; } mai...
a.cc: In function 'll powmod(ll, ll)': a.cc:9:38: error: 'k' was not declared in this scope 9 | else return powmod(x*x % MOD, k/2); | ^ a.cc: At global scope: a.cc:14:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 14 | main(){ ...
s206026232
p03674
C++
#include<bits/stdc++.h> typedef long long ll; using namespace std; int INF = 1LL << 30; int MOD = 1e9+7; ll powmod(ll x,ll n){ if(n == 0)return 1; if(n & 1)return x * powmod(x,n-1) % MOD; eles return powmod(x*x % MOD, k/2); } ll divmod(ll a,ll b){ return ((a%MOD) * (powmod(b,MOD-2)%MOD)) % MOD; } mai...
a.cc: In function 'll powmod(ll, ll)': a.cc:9:5: error: 'eles' was not declared in this scope 9 | eles return powmod(x*x % MOD, k/2); | ^~~~ a.cc: At global scope: a.cc:14:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 14 | main(){ | ^~~~ a.cc: In function '...
s314434277
p03674
C++
/// referenced: https://beta.atcoder.jp/contests/abc066/submissions/2252964 #include <bits/stdc++.h> using namespace std; constexpr int64_t MOD = 1000000007; int64_t Power(int64_t base, int64_t exp) { int64_t x = 1; while (exp) { if (exp % 2) { x = x * base % MOD; } base = base * base % MOD; ...
a.cc: In function 'int main()': a.cc:50:42: error: 'inv' was not declared in this scope; did you mean 'Inv'? 50 | for(int64_t i=0;i<=n+1;i++) InvFact[i]=inv(Factorial[i]); | ^~~ | Inv
s354560761
p03674
C++
#include <iostream> #include <string> #include <algorithm> #include <iomanip> #include <vector> #include <map> #include <cmath> #include <queue> #include <utility> #include <functional> #include <deque> #include <cctype> #include <stack> #include <bitset> #include <set> using ll = long long; using namespace std; type...
a.cc:60:24: error: expected ';' at end of member declaration 60 | int64_t inv(int64_t x) consym6jh,mjt{ | ^ | ; a.cc:60:26: error: 'consym6jh' does not name a type 60 | int64_t inv(int64_t x) consym6jh,mjt{ | ^~~~~~~~~ a...
s860477740
p03674
C++
#include <iostream> #include <cmath> #include <vector> #include <bitset> #include <algorithm> #include <stack> #include <queue> #include <map> #include <climits> #include <set> #include <map> #include <iomanip> #include <cassert> #include <functional> #include <string> using namespace std; typedef pair<int, int> P; #...
a.cc: In function 'int main()': a.cc:61:9: error: 'memset' was not declared in this scope 61 | memset(check, -1, sizeof check); | ^~~~~~ a.cc:15:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 14 | #include <functional> +++ |+#inc...
s374249032
p03674
C++
#include <iostream> #include <cmath> #include <vector> #include <bitset> #include <algorithm> #include <stack> #include <queue> #include <map> #include <climits> #include <set> #include <map> #include <iomanip> #include <cassert> #include <functional> using namespace std; typedef pair<int, int> P; #define FOR(i, a, b...
a.cc: In function 'int main()': a.cc:60:9: error: 'memset' was not declared in this scope 60 | memset(check, -1, sizeof check); | ^~~~~~ a.cc:15:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 14 | #include <functional> +++ |+#inc...
s423383647
p03674
C++
ll fact[100002], factInv[100002]; //フェルマーの小定理 ll power(ll x) { ll res = 1, n = MOD - 2; while(n > 0) { if (n & 1) res = (res * x) % MOD; x = (x * x) % MOD; n >>= 1; } return res; } void factrial() { fact[0] = factInv[0] = 1; repl(i, 1, 100002) { fact[i] = (fact[i...
a.cc:1:1: error: 'll' does not name a type 1 | ll fact[100002], factInv[100002]; | ^~ a.cc:3:1: error: 'll' does not name a type 3 | ll power(ll x) { | ^~ a.cc: In function 'void factrial()': a.cc:14:5: error: 'fact' was not declared in this scope 14 | fact[0] = factInv[0] = 1; | ^~...
s328050713
p03674
C++
#include <iostream> #include <vector> using namespace std; int NN[100002]; long long int dp[2][100002]; long long int dpse[2][100002]; const int MOD = 1000000007; long long int kaizyo(long long int n) { // n! if (n == 1 || n == 0) return (long long int)1; else return (long long int)((n * kaizyo(n - 1)) % MOD); }...
a.cc: In function 'int main()': a.cc:60:9: error: 'memset' was not declared in this scope 60 | memset(NN, 0, sizeof(NN)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <vector> +++ |+#include <cstri...
s333554329
p03674
C++
#include <iostream> #include <vector> using namespace std; int NN[100002]; long long int dp[2][100002]; long long int dplong[2][100002]; long long int dpse[2][100002]; long long int dpselong[2][100002]; int main() { int n = 0; cin >> n; vector<int> a(n+2); a[0] = -1; for (int i = 1; i <= n+1; i++) { cin >> a[...
a.cc: In function 'int main()': a.cc:22:9: error: 'memset' was not declared in this scope 22 | memset(NN, 0, sizeof(NN)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <vector> +++ |+#include <cstri...
s989577461
p03674
C++
#include <iostream> #include <algorithm> #include <cstring> #include <cstdio> #include <vector> #include <cstdlib> #include <iomanip> #include <cmath> #include <ctime> #include <map> #include <set> #include <queue> #include <stack> using namespace std; #define lowbit(x) (x&(-x)) #define max(x,y) (x>y?x:y) #define min(x...
a.cc:19:13: error: expected unqualified-id before numeric constant 19 | #define MOD 1000000007 | ^~~~~~~~~~ a.cc:30:28: note: in expansion of macro 'MOD' 30 | const int maxn = 1e5 + 10, MOD = 1e9 + 7; | ^~~
s360389742
p03674
C
#include <stdio.h> int fact(int a){ int x = 1,y; if(a ==0){ return(x);} else { for (int y =1; y <= a; y++){ x = x*y; } } return(x); } int combi(int n,int r){ int ncr; if(r <= 0){ return 1;} else{ ncr = fact(n)/(fact(r)*fact(n-r)) retu...
main.c: In function 'combi': main.c:21:42: error: expected ';' before 'return' 21 | ncr = fact(n)/(fact(r)*fact(n-r)) | ^ | ; 22 | return(ncr); | ~~~~~~
s917948453
p03674
C++
#include <iostream> #include <fstream> #include <cstdio> #include <cassert> #include <complex> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <cstdlib> #include <cstring> #include <iomanip> #include <numeric> #include <sstream> #include <ctime> #include <cctype> #include <set> #inclu...
a.cc: In function 'int main()': a.cc:25:12: error: expected primary-expression before 'long' 25 | #define ll long long | ^~~~ a.cc:48:22: note: in expansion of macro 'll' 48 | fact[0]=rfact[0]=ll(1); | ^~
s200944215
p03674
C++
#include <iostream> #include <fstream> #include <cstdio> #include <cassert> #include <complex> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <cstdlib> #include <cstring> #include <iomanip> #include <numeric> #include <sstream> #include <ctime> #include <cctype> #include <set> #inclu...
a.cc:37:1: error: extended character   is not valid in an identifier 37 |   | ^ a.cc:61:1: error: extended character   is not valid in an identifier 61 |   | ^ a.cc:37:1: error: '\U000000a0' does not name a type 37 |   | ^
s089878425
p03674
C++
#include <iostream> #include <fstream> #include <cstdio> #include <cassert> #include <complex> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <cstdlib> #include <cstring> #include <iomanip> #include <numeric> #include <sstream> #include <ctime> #include <cctype> #include <set> #inclu...
a.cc:37:1: error: extended character   is not valid in an identifier 37 |   | ^ a.cc:61:1: error: extended character   is not valid in an identifier 61 |   | ^ a.cc:37:1: error: '\U000000a0' does not name a type 37 |   | ^
s837609107
p03674
C++
#include <iostream> #include <fstream> #include <cstdio> #include <cassert> #include <complex> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <cstdlib> #include <cstring> #include <iomanip> #include <numeric> #include <sstream> #include <ctime> #include <cctype> #include <set> #inclu...
a.cc:37:1: error: extended character   is not valid in an identifier 37 |   | ^ a.cc:61:1: error: extended character   is not valid in an identifier 61 |   | ^ a.cc:37:1: error: '\U000000a0' does not name a type 37 |   | ^