submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s076398175
p03937
C++
#include <iostream> using namespace std; int H, W; char field[8][8]; bool solve(int x, int y) { if (x >= H-1 && y >= W-1) return true; if (field[x+1][y] == '.' && field[x][y+1] == '.') { return false; } else if (field[x+1][y] == '#' && field[x][y+1] == '#') { return false; } else { if (field[x+1]...
a.cc: In function 'int main()': a.cc:24:3: error: 'assert' was not declared in this scope 24 | assert(false); | ^~~~~~ a.cc:2:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 1 | #include <iostream> +++ |+#include <cassert> 2 | using name...
s001771890
p03937
C++
#ifndef __clang__ #pragma GCC optimize ("-O3") #endif #ifdef ONLINE_JUDGE #define NDEBUG 1 #endif #define _GLIBCXX_USE_CXX11_ABI 0 #include <stdio.h> #include <bits/stdc++.h> #define DESTRUCT2(p, a, b) \ auto a = get<0>(p); \ auto b = get<1>(p); #define DESTRUCT3(p, ...
a.cc: In function 'int main(int, char**)': a.cc:233:2: error: jump to label 'fail' 233 | fail: | ^~~~ a.cc:219:21: note: from here 219 | if(!A[0][0]) goto fail; | ^~~~ a.cc:220:7: note: crosses initialization of 'int e' 220 | int e=1; | ^
s461210186
p03937
C++
#include <iostream> #include <set> #include <vector> #include <string> #include <algorithm> #include <cmath> using namespace std; #define IN(n) int n;cin>>n #define IN_(n,n_) int n,n_;cin>>n>>n_; #define OUT(n) cout << n << endl #define OUT_(n,n_) cout << n << " " << n_ << endl #define v_(a,n,n_) vector<vector<a>>(n,...
a.cc: In function 'int main()': a.cc:50:26: error: expected ';' before '}' token 50 | f = false | ^ | ; 51 | } | ~
s755118953
p03937
C++
#include<iostream> #include<string> #include<cstring> using namespace std; int main() { int num1=0,num2=0; char test1[8][8]; cin>>num1>>num2; for(int i=0;i<num1:i++){ for(int q=0;q<num2;q++){ cin>>test1[i][q]; } } for(int w=0;w<num1-1;...
a.cc: In function 'int main()': a.cc:11:21: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions] 11 | for(int i=0;i<num1:i++){ | ^ a.cc:11:27: error: found ':' in nested-name-specifier, expected '::' 11 | ...
s611400989
p03937
C++
// AGC007A.cpp : コンソール アプリケーションのエントリ ポイントを定義します。 // #include "stdafx.h" #include<iostream> #include<vector> #include<string> #include<cstdio> #include<cmath> using namespace std; typedef long long ll; int h, w; char a[9][9]; bool judge() { int fx = 0; int fy = 0; a[fy][fx] = '.'; while (!(fx == w - 1 && fy == h ...
a.cc:4:10: fatal error: stdafx.h: No such file or directory 4 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s072676072
p03937
C++
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); // 1行、2つ(複数)数字 String[] ss0 = br.readLine().trim().split(" ", 0); int H = I...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.BufferedReader; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.InputStreamReader; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available wit...
s274368782
p03937
C++
using System; class A { string[] Rs(){ return Console.ReadLine().Split(' '); } public void run(){ string[] HW = Rs(); int H = int.Parse(HW[0]), W = int.Parse(HW[1]); int[,] A = new int[H,W]; for(int i=0;i<H;i++){ string inp = Console.ReadLine(); for(in...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:4:5: error: 'string' does not name a type 4 | string[] Rs(){ | ^~~~~~ a.cc:7:11: error: expected ':' before 'void' 7 | public void run(){ | ^~~~~ | : ...
s967494145
p03937
C++
#include <string> #include <queue> #include <stack> #include <vector> #include <sstream> #include <algorithm> #include <deque> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <list> #include <cstdio> #include <iostream> #include <cmath> #include <climits> #include <bitset> #incl...
In file included from /usr/include/c++/14/cassert:44, from a.cc:21: a.cc: In function 'int main()': a.cc:60:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 60 | assert(res == "Possible"); | ~~~~^~~~~~~~~~~~~
s861142176
p03937
C++
#include <iostream> #include <string> using namespace std; int main(){ int h,w; cin>>h>>w; vector<string> s(h); for(int i=0;i<h;i++)cin>>s[i]; int cnt=0; for(int i=0;i<h;i++){ for(int j=0;j<w;j++){ if(s[i][j]=='#')cnt++; } } if(cnt==h+w)cout<<"Possible"<<endl; else cout<<"Impossible"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:2: error: 'vector' was not declared in this scope 7 | vector<string> s(h); | ^~~~~~ 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> 2 | #incl...
s749087009
p03937
C++
#include <utility> #include <map> #include <array> #include <functional> #include <cstdio> #include <vector> #include <iterator> template<typename T> struct ScanfSpecifier{}; #define DEF(T,V) template<> struct ScanfSpecifier<T>{static constexpr const char* value = V;}; DEF(char*,"%s")DEF(int,"%d")DEF(double,"%lf")DEF(f...
a.cc: In function 'int main()': a.cc:108:5: error: 'memset' was not declared in this scope 108 | memset(grid, '.', sizeof(grid)); | ^~~~~~ a.cc:101:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 100 | #include <algorithm> +++ |+#include <c...
s543744222
p03937
C++
4 5 ##... .##.. ..##. ...##
a.cc:2:1: error: stray '##' in program 2 | ##... | ^~ a.cc:3:2: error: stray '##' in program 3 | .##.. | ^~ a.cc:4:3: error: stray '##' in program 4 | ..##. | ^~ a.cc:5:4: error: stray '##' in program 5 | ...## | ^~ a.cc:1:1: error: expected unqualified-id before numeric co...
s346164614
p03937
C++
#include <bits/stdc++.h> using namespace std; #define FORE(i, a) for (auto i = a.begin(); i != a.end(); ++i) #define REPU(i, a, b) for (int i = (a); i < (b); ++i) #define REPD(i, a, b) for (int i = (a); i > (b); --i) #define MEM(a, x) memset(a, x, sizeof(a)) #define ALL(a) a.begin(), a.end() #define UNIQUE(a) a.erase(...
a.cc: In function 'int main(int, char**)': a.cc:45:45: error: invalid types 'int[int]' for array subscript 45 | REPU(i, 0, w) REPU(j, 0, h) cin >> w[i][j]; | ^
s040184357
p03938
C++
#include<bits/stdc++.h> using namespace std; using ll = long long; #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)...
a.cc: In function 'int main()': a.cc:145:25: error: expected primary-expression before '<<' token 145 | rep(i,n)cout << a[i] << << " " << endl; | ^~ a.cc:146:25: error: expected primary-expression before '<<' token 146 | rep(i,n)cout << b[i] << << " " << endl;} | ...
s767993043
p03938
C++
#include <bits/stdc++.h> #define INF 2000000000000000000 #define ll long long #define pll pair<ll, ll> using namespace std; bool debug = true; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll N; cin >> N; vector<ll> temp_P(N); for (ll i = 0; i < N; ++i) { cin >> temp_P.at(i); } vector...
a.cc: In function 'int main()': a.cc:19:9: error: no matching function for call to 'std::vector<long long int>::at(std::vector<long long int>&)' 19 | P.at(temp_P) = i + 1; | ~~~~^~~~~~~~ In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:64, ...
s923631726
p03938
C++
n = int(input()) p = list(map(int, input().split())) a = list(range(20000, (n + 1) * 20000, 20000)) b = a[::-1] for i in range(len(p)): a[p[i] - 1] -= n - i for i in a: print(i, end=" ") print() for i in b: print(i, end=" ") print()
a.cc:1:1: error: 'n' does not name a type 1 | n = int(input()) | ^
s505362764
p03938
C++
#include<iostream> #include<bits/stdc++.h> using namespace std; int main() { long long i, j=0, k, n, m, p=0; cin >> n; for(i=0; i<n; i++) { cin >> arr[i]; } sort(arr, arr+n); for(i=0; i<n; i++) { cout << arr[i] << " "; } cout << endl; for(i=n-1; i>=0; i--)...
a.cc: In function 'int main()': a.cc:10:16: error: 'arr' was not declared in this scope 10 | cin >> arr[i]; | ^~~ a.cc:12:10: error: 'arr' was not declared in this scope 12 | sort(arr, arr+n); | ^~~ a.cc:20:27: error: expected primary-expression before '<<' token ...
s485459078
p03938
C++
#include <bits/stdc++.h> using namespace std; #define fastio ios_base::sync_with_stdio(false);cin.tie(NULL) #define ll long long #define inf 1e18 #define pi acos(-1.0) #define mod 998244353 ll n,k,a[20005],b[20005],p[20005],i,j,index,m; int main(void) { fastio; cin >> n; for(i=0;i<n;i++)cin >> p[i]; ...
a.cc:10:39: error: 'long long int index' redeclared as different kind of entity 10 | ll n,k,a[20005],b[20005],p[20005],i,j,index,m; | ^~~~~ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from /usr/inc...
s549459557
p03938
Java
import java.util.*; public class Main { static void solve() { int n = ni(); int[] a = new int[n], b = new int[n]; for(int i=0;i<n;i++) { a[i] = 30000 * i + 1; } for(int i=0;i<n;i++) { b[i] = n - i; } for(int i=0;i<n;i++) { int p = ni()-1; a[p] += i; } for(int i=0;i<n;i++) out.print(a[i] ...
Main.java:536: error: cannot find symbol static InputStream is; ^ symbol: class InputStream location: class Main Main.java:537: error: cannot find symbol static PrintWriter out; ^ symbol: class PrintWriter location: class Main Main.java:530: error: cannot find symbol is = INPUT.isEmpty()...
s163333574
p03938
C++
#pragma GCC optimize(2) #include<bits/stdc++.h> #define ll long long #define maxn 1000005 #define inf 1e9 #define pb push_back #define rep(i,a,b) for(int i=a;i<=b;i++) #define per(i,a,b) for(int i=a;i>=b;i--) using namespace std; inline int read() { int x=0,w=1; char c=getchar(); while(c<'0'||c>'9') {if(c=='-') w=-1...
a.cc:22:9: error: expected initializer before 'n' 22 | n=read(); rep(i,1,n) p[i]=read(); | ^ a.cc:7:20: error: expected unqualified-id before 'for' 7 | #define rep(i,a,b) for(int i=a;i<=b;i++) | ^~~ a.cc:22:19: note: in expansion of macro 'rep' 22 | n=rea...
s023104026
p03938
C++
#include <bits/stdc++.h> #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 FORR(i, m, n) for (int i = (m); i >= (n); --i) #define equals(a, b) (fabs((a) - (b)) < EPS) using namespace std; typedef long long ll; t...
a.cc: In function 'int main()': a.cc:40:5: error: 'used' was not declared in this scope 40 | used[p[i]] = true; | ^~~~
s548337091
p03938
C++
///Bismillahir Rahmanir Rahim #include<bits/stdc++.h> #define int long long #define fi first #define si second #define mp ...
a.cc:34:2: error: ISO C++ forbids declaration of 'solve' with no type [-fpermissive] 34 | solve() | ^~~~~ a.cc: In function 'int solve()': a.cc:90:1: warning: no return statement in function returning non-void [-Wreturn-type] 90 | } | ^ a.cc: At global scope: a.cc:91:2: warning: ISO C++ forbids decl...
s745396067
p03938
C++
~/workspace/atcoder master ❯ cd "/Users/ryochansq/workspace/atcoder/" && g++ main.cpp -o main && "/Users/ryochansq/workspace/atcoder/"main 5 3 -30 -10 10 20 50 40 ~/workspace/atcoder master 8s ❯ cd "/Users/ryochansq/workspace/atcoder/" && g++ main.cpp -o main && "/Users/ryochansq/workspace/atcoder/"main 3 2 10 20 30 ...
a.cc:3:1: error: extended character ❯ is not valid in an identifier 3 | ❯ cd "/Users/ryochansq/workspace/atcoder/" && g++ main.cpp -o main && "/Users/ryochansq/workspace/atcoder/"main | ^ a.cc:9:1: error: extended character ❯ is not valid in an identifier 9 | ❯ cd "/Users/ryochansq/workspace/atcoder/" && ...
s528638699
p03938
C++
// #define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define int long long #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define rep(i, n) for (int i = 0; i < n; ++i) #define REP(i, n) for (int i = 0; i < n; ++i) #define range(i,a,b) ((a)<=(i) && (i)<(b)) #define debu...
a.cc: In function 'int main()': a.cc:48:30: error: 'r' was not declared in this scope 48 | b[i]=30000*(n-(i+1))+r[i]; | ^
s896826818
p03938
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n ; cin >> n ; int p[20010]; for(int i=1;i<=n;i++) cin >> p[i]; for(int i=1;i<=n;i++) a[i]=1+30000*(i-1),b[i]=1+30000*(n-i); for(int i=1;i<=n;i++){ a[p[i]] += i; } for(int i=1;i<=n;i++) cout<<a[i]<<" "; cout<...
a.cc: In function 'int main()': a.cc:16:17: error: 'a' was not declared in this scope 16 | a[i]=1+30000*(i-1),b[i]=1+30000*(n-i); | ^ a.cc:16:36: error: 'b' was not declared in this scope 16 | a[i]=1+30000*(i-1),b[i]=1+30000*(n-i); | ...
s214953198
p03938
C++
#include<iostream> #include<vector> #include<algorithm> #include<string> #include<iomanip> #include<set> #include<queue> using namespace std; int main() { int n; cin >> n; vector<int>p(n); for(int i=0;i<n;i++) { cin>>p[i]; p[i]—; } vector<int> a(n); vector<int> b(n); for(int i=0;i<n;i++)a[i]=i+1; for(int i=0;i<n;i...
a.cc:19:5: error: extended character — is not valid in an identifier 19 | p[i]—; | ^ a.cc: In function 'int main()': a.cc:19:5: error: expected ';' before '\U00002014' 19 | p[i]—; | ^ | ; a.cc:19:4: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_T...
s473222567
p03938
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i,n) for(ll i=0;i<(ll)(n);i++) signed main(){ ll n,m=0,x,A=0,B=0,m;cin>>n; vector<ll> s(n),a(n),b(n); rep(i,n){ cin>>x; s[x-1]=i; } rep(i,n){ if(A+B>=s[i]){ A++; B=s[i]-...
a.cc: In function 'int main()': a.cc:7:24: error: redeclaration of 'll m' 7 | ll n,m=0,x,A=0,B=0,m;cin>>n; | ^ a.cc:7:10: note: 'll m' previously declared here 7 | ll n,m=0,x,A=0,B=0,m;cin>>n; | ^
s849350786
p03938
C++
3 2 3 1
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 | ^
s497418959
p03938
C++
3 2 3 1
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 | ^
s816291206
p03938
C
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> v(n), a(n), b(n); for (int i = 0; i < n; i++) { cin >> v[i]; v[i]--; if (i == 0) { a[v[i]] = 1; b[v[i]] = 1000000000; } else { ...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s054238577
p03938
C++
#include<cstdio> #define MN 20005 int n,a[MN],i; int main(){ scanf("%d",&n); for(i=0,x;i<n;i++)scanf("%d",&x),a[x]=i+1; for(i=1;i<=n;i++)printf("%d%c",a[i]+i*MN,i<n?' ':'\n'); for(i=1;i<=n;i++)printf("%d ",(n-i+1)*MN); return 0; }
a.cc: In function 'int main()': a.cc:6:11: error: 'x' was not declared in this scope 6 | for(i=0,x;i<n;i++)scanf("%d",&x),a[x]=i+1; | ^
s953324761
p03938
C++
#include <bits/stdc++.h> using namespace std; #define int long long signed main(){ int n;cin>>n; vector<int>p(n),a(n),b(n); for(auto&& w:p)cin>>w; int d=30000; for(int i=0;i<n;i++)a[i]=d*(i+1);b[i]=d*(n-i)+p[i]; for(int i=0;i<n-1;i++)cout<<a[i]<<" "; cout<<a[n-1]<<endl; for(int i=0;i<n-1;i++)cout<<b[i]<<" "; ...
a.cc: In function 'int main()': a.cc:10:44: error: 'i' was not declared in this scope 10 | for(int i=0;i<n;i++)a[i]=d*(i+1);b[i]=d*(n-i)+p[i]; | ^
s447204023
p03938
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <tuple> #include <queue> #include <cmath> #include <cfloat> #include <set> #include <map> // statics using namespace std; using int64 = int_fast64_t; using PAIR = pair<int64, int64>; constexpr int INF = 1 << 30; constexpr int64 LINF ...
a.cc:14:15: error: 'int_fast64_t' does not name a type 14 | using int64 = int_fast64_t; | ^~~~~~~~~~~~ a.cc:15:19: error: 'int64' was not declared in this scope 15 | using PAIR = pair<int64, int64>; | ^~~~~ a.cc:15:26: error: 'int64' was not declared in this scope 15...
s354402821
p03938
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <tuple> #include <queue> #include <cmath> #include <cfloat> #include <set> #include <map> // statics using namespace std; using int64 = int_fast64_t; using PAIR = pair<int64, int64>; constexpr int INF = 1 << 30; constexpr int64 LINF ...
a.cc:14:15: error: 'int_fast64_t' does not name a type 14 | using int64 = int_fast64_t; | ^~~~~~~~~~~~ a.cc:15:19: error: 'int64' was not declared in this scope 15 | using PAIR = pair<int64, int64>; | ^~~~~ a.cc:15:26: error: 'int64' was not declared in this scope 15...
s368610454
p03938
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <tuple> #include <queue> #include <cmath> #include <cfloat> #include <set> #include <map> // statics using namespace std; using int64 = int_fast64_t; using PAIR = pair<int64, int64>; constexpr int INF = 1 << 30; constexpr int64 LINF ...
a.cc:14:15: error: 'int_fast64_t' does not name a type 14 | using int64 = int_fast64_t; | ^~~~~~~~~~~~ a.cc:15:19: error: 'int64' was not declared in this scope 15 | using PAIR = pair<int64, int64>; | ^~~~~ a.cc:15:26: error: 'int64' was not declared in this scope 15...
s936994377
p03938
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll,ll> P; #define MOD 1000000007 int main(){ ll n; cin>>n; ll p[n],a[n],b[n]; for(int i=0;i<n;i++){ cin>>p[i]; a[p[i]-1]=i+1; b[p[i]-1]=n*2-1-(i*2); } for(int i=0;i<n;i++) cout<<a[i]<<" "; cout<<endl; for(int i=0...
a.cc: In function 'int main()': a.cc:17:22: error: expected ')' before 'cout' 17 | for(int i=0;i<n;i++ cout<<b[i]<<" "; | ~ ^~~~~ | )
s225140584
p03938
C++
#include<bits/stdc++h> using namespace std; typedef long long ll; typedef pair<ll,ll> P; #define MOD 1000000007 int main(){ ll n; cin>>n; ll p[n],a[n],b[n]; for(int i=0;i<n;i++){ cin>>p[i]; a[p[i]-1]=i+1; b[p[i]-1]=n*2-1-(i*2); } for(int i=0;i<n;i++) cout<<a[i]<<" "; cout<<endl; for(int i=0;...
a.cc:1:9: fatal error: bits/stdc++h: No such file or directory 1 | #include<bits/stdc++h> | ^~~~~~~~~~~~~~ compilation terminated.
s054111270
p03938
C++
#include<cstdio> using namespace std; int main(){ int n,p[20001],a; scanf("%d"&n); for(int i=0;i<n;i++){ scanf("%d",a); p[a]=i; } for(int i=1;i<=n;i++) printf("%d ",n*i); printf("\n"); for(int i=1;i<=n;i++) printf("%d ",n*i+p[a]); printf("\n"); }
a.cc: In function 'int main()': a.cc:5:13: error: invalid operands of types 'const char [3]' and 'int' to binary 'operator&' 5 | scanf("%d"&n); | ~~~~^~ | | | | | int | const char [3]
s692531720
p03938
C++
ERROR: type should be string, got "https://beta.atcoder.jp/contests/agc007/submissions/3515368#define _USE_MATH_DEFINES \n#include <iostream>\n#include <fstream>\n#include <cstdio>\n#include <cmath>\n#include <cstdlib>\n#include <cstring>\n#include <cassert>\n#include <string>\n#include <vector>\n#include <utility>\n#include <complex>\n#include <set>\n#include <map>\n#include <queue>\n#include <stack>\n#include <deque>\n#include <tuple>\n#include <bitset>\n#include <limits>\n#include <algorithm>\n#include <array>\n#include <random>\n#include <complex>\n#include <regex>\nusing namespace std;\ntypedef long double ld;\ntypedef long long ll;\ntypedef vector<int> vint;\ntypedef vector<ll> vll;\ntypedef pair<int, int> pii;\ntypedef pair<ll, ll> pll;\ntypedef pair<double, double> pdd;\n#define quickIO() {cin.tie(0); cout.sync_with_stdio(false);}\n#define rep(i,n) for(ll i=0; i<(ll)n; i++)\n#define mp(a,b) make_pair(a,b)\n#define pb push_back\n#define fcout cout << fixed << setprecision(10) \nconst ll inf = 1e18;\nconst ll mod = 1e9 +7;\n \nld sqrtld(ld x){\n ld left = 0, right = x;\n rep(i, 100){\n ld mid = (left + right)/2;\n if (mid*mid <= x) left =mid;\n else right = mid;\n }\n return left;\n}\n\nll gcd(ll a, ll b){\n if(b>a){\n ll c =b; b=a; a=c;\n }\n ll d = a%b;\n if(d==0){\n return b;\n }else if(d==1){\n return 1;\n }else{\n gcd(b,d);\n }\n}\n\n\nll cul(ll n){\n return (n-1)*n/2;\n}\n\n\nint a[20010];\nint main (){\n int n; cin >> n;\n rep(i,n){\n int p=0;\n cin >> p;\n a[p] +=i;\n }\n\n for(int i=1; i<=n; i++){\n cout << 25000 * 1 +a[i] << \" \" ;\n }\n cout << endl;\n for(int i=n; i>0; i--){\n cout << 25000 * i << \" \" ;\n }\n cout << endl;\n return 0;\n}\n\n"
a.cc:1:1: error: 'https' does not name a type 1 | https://beta.atcoder.jp/contests/agc007/submissions/3515368#define _USE_MATH_DEFINES | ^~~~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, ...
s197844227
p03938
C++
#include <bits/stdc++.h> #define rep(i,n) for(long long int (i)=0;(i)<(int)(n);(i)++) #define rrep(i,a,b) for(long long int i=(a);i<(b);i++) #define rrrep(i,a,b) for(long long int i=(a);i>=(b);i--) #define all(v) (v).begin(), (v).end() #define pb(q) push_back(q) #define Abs(a,b) max(a,b)-min(a,b) #define YES(condition...
a.cc: In function 'int main()': a.cc:65:15: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 65 | cout<0; | ~~~~^~ | | | | | int | std::ostream {aka std::basic_ostream<char>} a...
s374538488
p03938
C++
#include <iostream> #include <vector> #define inf 1e9 using namespace std; // range-add, range-min query struct SegTree{ int size; vector<int> seg, delay; SegTree(){} SegTree(int size){ this->size = size; seg.resize(1<<(size+1)); delay.resize(1<<(size+1)); } void init() { for(int i = 0; i < (1<<(s...
a.cc: In function 'int main()': a.cc:94:37: error: reference to 'rank' is ambiguous 94 | for(int i = 1; i <= n; i++) rank[p[i]] = i; | ^~~~ In file included from /usr/include/c++/14/bits/move.h:37, from /usr/include/c++/14/bits/exception_ptr.h:41, ...
s055987623
p03938
C++
using namespace std; typedef long long ll; ll n, p[21000], a; int main(void){ // Your code here! cin >> n; for (ll i = 0; i < n; i++) { cin >> a; p[a] = i; } for (ll i = 1; i <= n; i++) { cout << i * n + p[i] << ' '; } cout << endl; for (ll i = n; i > 0; i--) { ...
a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | cin >> n; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:12:9: error: 'c...
s135651856
p03938
C++
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int n; int p[30005]={0},a[30005]={0},b[30005]={0}; int main() { //asdf scanf("%d",&n); for(int i=1;i<=n;i++)scanf("%d",&p[i]); a[i]=100000; for(int i=2;i<=n;i++)a[i]=a[i-1]+30000; for(int i=1;i<=n;i++)b[n-i+1]=a[i]; fo...
a.cc: In function 'int main()': a.cc:13:11: error: 'i' was not declared in this scope 13 | a[i]=100000; | ^
s304820969
p03938
C++
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int n; int p[30005]={0},a[30005]={0},b[30005]={0}; int main() { scanf("%d",&n); for(int i=1;i<=n;i++)scanf("%d",&p[i]); a[i]=100000; for(int i=2;i<=n;i++)a[i]=a[i-1]+30000; for(int i=1;i<=n;i++)b[n-i+1]=a[i]; for(int i...
a.cc: In function 'int main()': a.cc:12:11: error: 'i' was not declared in this scope 12 | a[i]=100000; | ^
s997996384
p03938
C++
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int n; int p[30005]={0},a[30005]={0},b[30005]={0}; int main() { scanf("%d",&n); for(int i=1;i<=n;i++)scanf("%d",&p[i]); a[i]=100000; for(int i=2;i<=n;i++)a[i]=a[i-1]+30000; for(int i=1;i<=n;i++)b[n-i+1]=a[i]; for(int i...
a.cc: In function 'int main()': a.cc:12:11: error: 'i' was not declared in this scope 12 | a[i]=100000; | ^
s107544870
p03938
C++
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int n; int p[30005]={0},a[30005]={0},b[30005]={0}; int main() { if (0){} scanf("%d",&n); for(int i=1;i<=n;i++)scanf("%d",&p[i]); a[i]=100000; for(int i=2;i<=n;i++)a[i]=a[i-1]+30000; for(int i=1;i<=n;i++)b[n-i+1]=a[i]; ...
a.cc: In function 'int main()': a.cc:13:11: error: 'i' was not declared in this scope 13 | a[i]=100000; | ^
s525983462
p03938
C++
vector<bool> gen_sosuu(vector<bool> sosuu){ int size = sosuu.size(); REP(i,size){ sosuu[i] = true; } sosuu[0] = false; sosuu[1] = false; sosuu[2] = true; FOR(i,2,sqrt(size)+1){ if(sosuu[i] == false) continue; for(int j = 2; i*j<size;j++){ sosuu[i*j] =false; } } return sosuu; } ...
a.cc:3:1: error: 'vector' does not name a type 3 | vector<bool> gen_sosuu(vector<bool> sosuu){ | ^~~~~~ a.cc: In function 'int main()': a.cc:23:3: error: 'cin' was not declared in this scope 23 | cin >>n; | ^~~ a.cc:24:7: error: 'i' was not declared in this scope 24 | REP(i,n){ | ...
s863621939
p03938
C++
#include <bits/stdc++.h> using namespace std; typedef pair<int,int> pii; typedef long long int ll; #define INF 1 << 30 #define REP(i,n) for(ll i=0; i<(int)(n); i++) #define FOR(i,k,n) for(ll i=(k);i<(int)(n);i++) vector<bool> gen_sosuu(vector<bool> sosuu){ int size = sosuu.size(); REP(i,size){ sosuu[i] = t...
a.cc: In function 'int main()': a.cc:38:5: error: 'p' was not declared in this scope 38 | p[x] = i+1; | ^ a.cc:42:7: error: 'i' was not declared in this scope 42 | DOR(i,1,n+1) cout << 30000*(n-i) + p[i] << " "; | ^ a.cc:42:3: error: 'DOR' was not declared in this scope; did you mean '...
s163413924
p03938
C++
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <set> #include <bitset> #include <cmath> #include <string> #define FI first #define SE second #define PF push_front #define PB push_back #define PPF pop_front #define PPB pop_back #define MA make_pair #define ll long long #define PA pa...
a.cc:66:1: error: extended character   is not valid in an identifier 66 |   | ^ a.cc:66:1: error: '\U00003000' does not name a type 66 |   | ^~
s710895889
p03938
C++
#include <iostream> using namespace std; int N; int A[20010].B[20010]; int main(){ cin >> N; for(int i=1;i<=N;i++){ cin >> A[i]; B[A[i]] = i; } for(int i=1;i<=N;i++){ if(i!=N) cout << 30000*i << " "; else cout << 30000*i << endl; } for(int i=1;i<=N;i++){ if(i!=N) cout << 30000*(N-i) + B[i] <<" "; el...
a.cc:5:13: error: expected initializer before '.' token 5 | int A[20010].B[20010]; | ^ a.cc: In function 'int main()': a.cc:10:24: error: 'A' was not declared in this scope 10 | cin >> A[i]; | ^ a.cc:11:17: error: 'B' was not declared in this scope ...
s760510684
p03938
C++
#include <bits/stdc++.h> //#include <math.h> using namespace std; #define INF 1.1e9 #define LINF 1.1e18 #define FOR(i,a,b) for (int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define ALL(v) (v).begin(),(v).end() #define pb push_back #define pf push_front #define fi first #define se second #define BIT(x,n) bitset<n>(...
a.cc: In function 'int main()': a.cc:37:43: error: overloaded function with no contextual type information 37 | REP(i,n) cout<<a[i]<<(i==n-1?endl:' '); | ^~~ a.cc:38:43: error: overloaded function with no contextual type information 38 | REP(i,n) cou...
s907407097
p03938
C++
#include <iostream> #include <vector> #include <string> #include <cmath> #include <algorithm> #include <utility> #include <queue> #include <set> #include <map> #define inf 1000000007 #define ll long long #define PA pair<int,int> #define PPAP pair<int,PA> #define MP make_pair #define PB push_back using namespace st...
a.cc: In function 'int main()': a.cc:31:20: error: no match for 'operator-' (operand types are 'std::vector<int>' and 'int') 31 | b[p-i] = 33000*i; | ~^~ | | | | | int | std::vector<int> In file included f...
s722770973
p03938
C++
#include<bits\stdc++.h> using namespace std; const int maxn=20005; //int s[maxn]; int n; struct node { long long id,num,aa,bb; }s[maxn]; bool cmp1(node x,node y) { return x.num<y.num; } bool cmp2(node x,node y) { return x.id<y.id; } int main() { int n; scanf("%d",&n); for(int i=1;i<=n;i++) ...
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s832862163
p03938
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define Rep(i, N) for(int i = 0; i < N; i++) typedef pair<int, int> Pi; #define fi first #define se second const int INF = 1 << 28; signed main() { int N; Pi P[20005]; cin >> N; Rep(i, N) { cin >> P[i].fi; P[i].se = i; } sort(P, ...
a.cc: In function 'int main()': a.cc:41:32: error: 'LLINF' was not declared in this scope; did you mean 'INF'? 41 | Rep(i, N - 1) cout << A[i] + LLINF << " "; cout << A[N - 1] + LLINF << endl; | ^~~~~ | INF a.cc:41:65: error: 'LLINF' was not...
s658910399
p03938
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<int, int>; const ll MOD = 1000000007; int main(){ int N; cin >> N; vector<int> p(N); for(int i=0;i<N;i++){ cin >> p[i]; } vector<int> a(N), b(N); for(int i=0;i<N;i++){ a[i] = 30000 * (i+1);...
a.cc: In function 'int main()': a.cc:20:25: error: 'n' was not declared in this scope 20 | b[i] = 30000 * (n-i); | ^
s320493682
p03938
Java
import java.util.*; public class pB { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int p[] = new int [N]; for (int i = 0; i < N; i++) { p[i] = sc.nextInt() - 1; } int r[] = new int[N]; for (int i = 0; i < N; i++) { r[p[i]] = i + 1; }...
Main.java:2: error: class pB is public, should be declared in a file named pB.java public class pB { ^ 1 error
s623618700
p03938
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int p[] = new int [N]; for (int i = 0; i < N; i++) { p[i] = sc.nextInt() - 1; } int r[] = new int[N]; for (int i = 0; i < N; i++) { r[p[i]] = i + 1; ...
Main.java:36: error: reached end of file while parsing } ^ 1 error
s798571779
p03938
Java
import java.util.*; public class pB { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int p[] = new int [N]; for (int i = 0; i < N; i++) { p[i] = sc.nextInt() - 1; } int r[] = new int[N]; for (int i = 0; i < N; i++) { r[p[i]] = i + 1; }...
Main.java:2: error: class pB is public, should be declared in a file named pB.java public class pB { ^ 1 error
s349124777
p03938
C++
#include <cstdio> #include <iostream> #include <cmath> #include <cstring> #include <sstream> #include <algorithm> #include <cstdlib> #include <map> #include <queue> #include <utility> #include <vector> #include <set> #include <memory.h> #include <iomanip> #include <bitset> #include <list> #include <stack> using name...
a.cc: In function 'int main()': a.cc:45:5: error: 'cour' was not declared in this scope 45 | cour << endl; | ^~~~
s853834536
p03938
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; const int d = 20100; int main(){ vector<pair<int,int> > v; int N; cin>>N; for(int i=0;i<N;i++){ int p; cin>>p; p--; v.push_back(make_pair(p,i)); } sort(ALL(v)); vector<int> a(N),b(N); for(int i=0;i<N;i++){ a[i] = v[i].seco...
a.cc: In function 'int main()': a.cc:19:14: error: 'ALL' was not declared in this scope 19 | sort(ALL(v)); | ^~~
s968684412
p03938
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; const int d = 20100; int main(){ vector<pair<int,int> > v; int N; cin>>N; for(int i=0;i<N;i++){ int p; cin>>p; p--; v.push_back(make_pair(p,i)); } sort(ALL(v)); vector<int> a,b; for(int i=0;i<N;i++){ a[i] = v[i].second; ...
a.cc: In function 'int main()': a.cc:19:14: error: 'ALL' was not declared in this scope 19 | sort(ALL(v)); | ^~~
s743752762
p03938
C++
#include<iostream> #include<vector> using namespace std; const int d = 20100; int main(){ vector<pair<int,int> > v; int N; cin>>N; for(int i=0;i<N;i++){ int p; cin>>p; p--; v.push_back(make_pair(p,i)); } sort(ALL(v)); vector<int> a,b; for(int i=0;i<N;i++){ a[i] = v[i].second; b[i] = 0; a[i] += ...
a.cc: In function 'int main()': a.cc:18:14: error: 'ALL' was not declared in this scope 18 | sort(ALL(v)); | ^~~ a.cc:18:9: error: 'sort' was not declared in this scope; did you mean 'short'? 18 | sort(ALL(v)); | ^~~~ | short
s122128061
p03938
C++
#include<iostream> using namespace std; const int d = 20100; int main(){ vector<pair<int,int> > v; int N; cin>>N; for(int i=0;i<N;i++){ int p; cin>>p; p--; v.push_back(make_pair(p,i)); } sort(ALL(v)); vector<int> a,b; for(int i=0;i<N;i++){ a[i] = v[i].second; b[i] = 0; a[i] += d*i; b[i] += -d...
a.cc: In function 'int main()': a.cc:8:9: error: 'vector' was not declared in this scope 8 | vector<pair<int,int> > v; | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 1 | #include<iostream> +++ |+#include <vec...
s768597385
p03938
C++
#define DEB #include<bits/stdc++.h> #define REP(i,m) for(int i=0;i<(m);++i) #define REPN(i,m,in) for(int i=(in);i<(m);++i) #define ALL(t) (t).begin(),(t).end() #define CLR(a) memset((a),0,sizeof(a)) #define pb push_back #define mp make_pair #define fr first #define sc second using namespace std; #ifdef DEB #defin...
a.cc: In function 'int main()': a.cc:84:5: error: expected '}' at end of input 84 | } | ^ a.cc:59:11: note: to match this '{' 59 | int main(){ | ^
s050953169
p03938
C++
#include <bits/stdc++.h> using namespace std; #define N_PRIME 1000000007 #define ll int64_t int main(void){ int N; cin >> N; vector<int> p; for(int i = 0 ;i < N ; i++ ){ int temp; cin >> temp; temp--; p.push_back(temp); } int a[N]; int b[N]; fo...
a.cc: In function 'int main()': a.cc:41:27: error: expected ';' before numeric constant 41 | sub = sub * 10 00 ; | ^ ~~ | ;
s289513159
p03938
C++
#include "bits/stdc++.h" using namespace std; //諸機能 #pragma region MACRO #define putans(x) std::cerr << "[ answer ]: " ; cout << (x) << endl #define dputans(x) std::cerr << "[ answer ]: "; cout << setprecision(40) << (double)(x) << endl #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define RREP(i,n,a) for(int i...
a.cc:63:28: error: macro "dbg" passed 2 arguments, but takes just 1 63 | dbg(k, plus); | ^ a.cc:31:9: note: macro "dbg" defined here 31 | #define dbg(var0) {} | ^~~ a.cc: In function 'int main()': a.cc:63:17: error: 'dbg' was not declared in this scop...
s208529778
p03938
C++
#include <iostream> using namespace std; int n; int p[20000]; int a[20000],b[20000]; void input(){ int x; cin>>n; for(int i=0;i<na;i++){ cin>>x; p[x-1]=i; } } void solve(){ for(int i=0;i<n;i++){ a[i]=(i+1)*30000; b[i]=999999999-(a[i]-p[i]); } } int main() { input(); solve(); for(int i=0;i<n-1;i++)...
a.cc: In function 'void input()': a.cc:11:23: error: 'na' was not declared in this scope; did you mean 'n'? 11 | for(int i=0;i<na;i++){ | ^~ | n
s630098171
p03938
C++
69 ll diff = cur - (a[i] + b[i]); 70 if(diff < 0){ 71 a[i] -= diff; 72 } 73 else {
a.cc:2:2: error: expected unqualified-id before numeric constant 2 | 69 ll diff = cur - (a[i] + b[i]); | ^~ a.cc:3:2: error: expected unqualified-id before numeric constant 3 | 70 if(diff < 0){ | ^~ a.cc:6:2: error: expected unqualified-id before numeric constant 6 | 73 ...
s451523386
p03939
C++
include<bits/stdc++.h> using namespace std; double d,x,ans; int n; int main(){ scanf("%d%lf%lf",&n,&x,&d); while(n!=0){ ans+=x+n*d-d/2; x=(n+1.0)/n*x+5*d/(2*n); d=(n+2.0)/n*d; --n; } printf("%.10lf\n",ans); return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include<bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:9: error: 'scanf' was not declared in this scope 6 | scanf("%d%lf%lf",&n,&x,&d); | ^~~~~ a.cc:13:9: error: 'printf' was not declared in this scope 13 | ...
s651212785
p03939
C++
1#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e5 + 5; inline int gi() { char c = getchar(); while (c < '0' || c > '9') c = getchar(); int sum = 0; while ('0' <= c && c <= '9') sum = sum * 10 + c - 48, c = getchar(); return sum; } int n; int main() { double d, x; n = g...
a.cc:1:2: error: stray '#' in program 1 | 1#include <bits/stdc++.h> | ^ a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1#include <bits/stdc++.h> | ^ a.cc: In function 'int gi()': a.cc:9:18: error: 'getchar' was not declared in this scope 9 | char c = getchar(); ...
s375417582
p03939
C++
1#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e5 + 5; inline int gi() { char c = getchar(); while (c < '0' || c > '9') c = getchar(); int sum = 0; while ('0' <= c && c <= '9') sum = sum * 10 + c - 48, c = getchar(); return sum; } int n; int main() { double d, x; n = g...
a.cc:1:2: error: stray '#' in program 1 | 1#include <bits/stdc++.h> | ^ a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1#include <bits/stdc++.h> | ^ a.cc: In function 'int gi()': a.cc:9:18: error: 'getchar' was not declared in this scope 9 | char c = getchar(); ...
s268615549
p03939
C++
#include<iostream> #include<algorithm> #include<vector> #include<string> #include<set> #include<queue> #include<stack> #include<bitset> #include<functional> #include<map> #include<iomanip> #include<limits> #include<unordered_set> #include<cmath> #include <numeric> #include <array> #include <complex> double M_PI = 3.14...
In file included from /usr/include/c++/14/cmath:47, from a.cc:14: a.cc:18:8: error: expected unqualified-id before numeric constant 18 | double M_PI = 3.1415926535897932384626; | ^~~~
s173716483
p03939
C++
#include<bits/stdc++.h> using namespace std; int main() { freopen("1.in","r",stdin); int n;double d,x; cin>>n>>d>>x; double ans=0; for(;n;--n) { ans+=d+(n-0.5)*x; d=((2*n+2)*d+5*x)/(2*n); x=(2*n+4)*x/(2*n); } printf("%.9f\n",ans);
a.cc: In function 'int main()': a.cc:16:26: error: expected '}' at end of input 16 | printf("%.9f\n",ans); | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s928443169
p03939
C++
#include<bits/stdc++.h> using namespace std; int n; double d,x; int main(){ scanf("%d%d%d",&n,&d,&x); double ans=0; for(;n;--n){ ans+=d+(n-0.5)*x; d=(((n+1)<<1)*d+(x<<1)+(x<<2))/(n<<1); x=((n+2)<<1))*x/(n<<1); } printf("%.9f\n",ans); }
a.cc: In function 'int main()': a.cc:10:35: error: invalid operands of types 'double' and 'int' to binary 'operator<<' 10 | d=(((n+1)<<1)*d+(x<<1)+(x<<2))/(n<<1); | ~^~~ | | | | | in...
s513358875
p03939
C++
#include<bits/stdc++.h> using namespace std; int n; double d,x; int main(){ scanf("%d%d%d",&n,&d,&x); double ans=0; for(;n;--n){ ans+=d+(n-0.5)*x; d=(((n+1)<<1)*d+(x<<1)+(x<<2))/(n<<1); x=((n+2)<<1))*x/(n<<1); } printf("%.9f\n",ans); }
a.cc: In function 'int main()': a.cc:10:35: error: invalid operands of types 'double' and 'int' to binary 'operator<<' 10 | d=(((n+1)<<1)*d+(x<<1)+(x<<2))/(n<<1); | ~^~~ | | | | | in...
s705772827
p03939
C++
Quick and Efficient EDB to PST tool from EdbMails The days of worrying over corrupted Exchange Server databases are long over. EdbMails Exchange Server Recovery tool is here to fix all your EDB issues and retrieve every last bit of data from it. This is designed for quick, efficient and accurate recovery of EDB after...
a.cc:1:1: error: 'Quick' does not name a type 1 | Quick and Efficient EDB to PST tool from EdbMails | ^~~~~
s651513168
p03939
C++
#include <bits/stdc++.h> #define mod 1000000007 #define pb push_back #define ll long long using namespace std; double solve(ll num, double d1, double dif){ if(num == 1) return d1; else{ ll nnum = num-1; double nd1 = (num+1) * d1 / num + 3 * dif / (2 * num); double ndif = (num+2) * dif / num; return ex + solve...
a.cc: In function 'double solve(long long int, double, double)': a.cc:12:24: error: 'ex' was not declared in this scope; did you mean 'exp'? 12 | return ex + solve(nnum, nd1,ndif); | ^~ | exp
s039538454
p03939
C++
#include <iostream> #include <cstring> #include <string> #include <algorithm> #include <cstdlib> #include <cstdio> #include <map> #include <set> #include <cmath> #include <vector> #include <ctime> #include <Queue> #include <sstream> #include <utility> #include <bitset> #include <stack> using namespace std; #define MP...
a.cc:12:10: fatal error: Queue: No such file or directory 12 | #include <Queue> | ^~~~~~~ compilation terminated.
s678489344
p03939
C++
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
a.cc: In function 'void solve()': a.cc:33:24: error: invalid types 'll {aka long long int}[int]' for array subscript 33 | _P("%.12lf\n",T[2*N]*F[N]); | ^ a.cc:6:30: note: in definition of macro '_P' 6 | #define _P(...) (void)printf(__VA_ARGS__) | ...
s552620539
p03940
C++
v#include <iostream> #include <string> #include <vector> #include <queue> #include <deque> #include <stack> #include <set> #include <map> #include <unordered_map> #include <unordered_set> #include <cstring> #include <cmath> #include <cstdlib> #include <algorithm> #include <random> #include <iomanip> #include <functiona...
a.cc:1:2: error: stray '#' in program 1 | v#include <iostream> | ^ a.cc:1:1: error: 'v' does not name a type 1 | v#include <iostream> | ^ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:2: /usr/include/...
s346734956
p03940
C++
Name Khoda, Besmellah Rahmane Rahim, In The Name Of God; //#include<bits/stweight++.h> #include<iostream> #include <vector> #include <algorithm> #include <cmath> #include <set> #include <queue> #include <deque> #include <map> #include <stack> #include<bitset> #include<list> #include<cassert> #include<numeric> #include...
a.cc:1:2: error: 'Name' does not name a type 1 | Name Khoda, Besmellah Rahmane Rahim, In The Name Of God; | ^~~~
s793063826
p03940
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; } #define all(x) (x).begin(),(x).end() #define fi first #define ...
a.cc: In function 'int main()': a.cc:43:74: error: expected primary-expression before '/' token 43 | chmin(dp[it-A.begin()],dp[i-1]+max((A[it-A.begin()]-A[i])*2,T));*/ | ^ a.cc:44:5: error: expected primary-expression before '}' t...
s954509715
p03940
C++
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <queue> #include <map> #include <string.h> #include <math.h> #include <stdio.h> #include <deque> #include <bits/stdc++.h> //#include "testlib.h" using namespace std; #define ll long long #define pii pair<int,int> #define qi ios::sync_wit...
a.cc:88:6: error: redefinition of 'bool debug' 88 | bool debug=true; | ^~~~~ a.cc:18:6: note: 'bool debug' previously defined here 18 | bool debug=true; | ^~~~~ a.cc:96:43: error: redefinition of 'template<class T1, class T2> std::ostream& operator<<(std::ostream&, std::pair<_T1, _T2>)' 9...
s690513520
p03940
C++
// Code by H~$~C #include <bits/stdc++.h> using namespace std; static const int Maxn = 100005; #define int long long int n; long long T, E; long long a[Maxn]; long long dp[Maxn]; // dp[i] = min { dp[j] + a[i] - a[j] + max(T, 2 * (a[i] - a[j + 1]) } // dpt[i] = min { dpt[j] + max(T, 2 * (a[i] - a[j + 1])) } // dp[i] ...
a.cc: In function 'int main()': a.cc:107:36: error: 'L' was not declared in this scope 107 | if ((a[i] - a[mid]) * 2 > T) L = mid; | ^ a.cc:108:12: error: 'R' was not declared in this scope 108 | else R = mid; | ^
s954793126
p03940
C++
// Code by H~$~C #include <bits/stdc++.h> using namespace std; static const int Maxn = 100005; #define int long long int n; long long T, E; long long a[Maxn]; long long dp[Maxn]; // dp[i] = min { dp[j] + a[i] - a[j] + max(T, 2 * (a[i] - a[j + 1]) } // dpt[i] = min { dpt[j] + max(T, 2 * (a[i] - a[j + 1])) } // dp[i] ...
a.cc: In function 'int main()': a.cc:107:36: error: 'L' was not declared in this scope 107 | if ((a[i] - a[mid]) * 2 > T) L = mid; | ^ a.cc:108:12: error: 'R' was not declared in this scope 108 | else R = mid; | ^ a.cc:110:15: error: 'L' was not ...
s853012626
p03940
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; ll read(){ ll a=0,b=getchar(),c=1; while(!isdigit(b))c=b=='-'?-1:1,b=getchar(); while(isdigit(b))a=a*10+b-'0',b=getchar(); return a*c; } ll n,t,e,x,ab,a[200005],dp[200005]; int main(){ n=read(),e=read(),t=read(); for(int i=1;i<=n;i++) a[i]=read(...
a.cc: In function 'int main()': a.cc:17:24: error: 's' was not declared in this scope 17 | while((s[i]-s[ab+1])*2>t) | ^ a.cc:20:41: error: 's' was not declared in this scope 20 | if(ab)dp[i]=min(dp[i],2*s[i]+x); | ...
s109218259
p03940
C++
#include<bits/stdc++.h> #define int long long using namespace std; const int maxn=1e6+10; pair<long long int,int>seg[4*maxn]; pair<long long int,int>seg2[4*maxn]; int a[maxn]; long long int dp[2][maxn]; int n; int e; int d; void update(int id,int l,int r,int l2,int r2,long long int val){ if(l>=r2||r<=l2){ return; } i...
a.cc:2:13: error: 'long long long' is too long for GCC 2 | #define int long long | ^~~~ a.cc:5:16: note: in expansion of macro 'int' 5 | pair<long long int,int>seg[4*maxn]; | ^~~ a.cc:2:18: error: 'long long long' is too long for GCC 2 | #define int long long | ...
s506449694
p03940
C++
#include<bits/stdc++.h> using namespace std; using ll=long long; const ll INF=1e18; int main(){ int n; cin>>n; ll t,e; cin>>e>>t; vector<ll> x(n+1); for(int i=1;i<=n;i++) cin>>x[i]; vector<ll> dp(n+1); multiset<ll> As; multiset<ll> Bs; vector<ll> A(n); vector<ll> B(n); ...
a.cc:43:2: error: stray '#' in program 43 | }#include<bits/stdc++.h> | ^ a.cc:43:3: error: 'include' does not name a type 43 | }#include<bits/stdc++.h> | ^~~~~~~ a.cc:47:10: error: redefinition of 'const ll INF' 47 | const ll INF=1e18; | ^~~ a.cc:5:10: note: 'const ll INF' previou...
s097296480
p03940
C++
#include <bits/stdc++.h> using namespace std; long long maxn=(1ll<<63-1); long long a[10001],dp[10001]={0}; long long n,e,t,k=0; int main() { memset(dp,0x3f3f3f3f,sizeof(dp)); cin>>n>>e>>t; for(int i=1;i<=n;i++) scanf("%d",&a[i]); for(int i=1;i<=n;i++) { while(t<=2*(a[i]-a[k+1])) ...
a.cc:24:2: error: stray '#' in program 24 | }#include<bits/stdc++.h> | ^ a.cc:24:3: error: 'include' does not name a type 24 | }#include<bits/stdc++.h> | ^~~~~~~ a.cc:27:11: error: conflicting declaration 'long long int a [10005]' 27 | long long a[10005],dp[1005]; | ^ a.cc:4:11: ...
s210815583
p03940
C++
#include<bits/stdc++.h> long long n,E,T,t,a[100005],f[100005],M=1LL<<60;int main(){scanf("%d%d%d",&n,&E,&T);for(int i=1;i<=n;i++)scanf("%d",&a[i]);for(int i=1;i<=n;i++){for (;T<=2*(a[i]-a[t+1]);t++)M=__min(M,f[t]-2*a[t+1]);f[i]=__min(f[t]+T,M+2*a[i]);}printf("%lld",E+f[n]);}
a.cc: In function 'int main()': a.cc:2:177: error: '__min' was not declared in this scope; did you mean '__sin'? 2 | long long n,E,T,t,a[100005],f[100005],M=1LL<<60;int main(){scanf("%d%d%d",&n,&E,&T);for(int i=1;i<=n;i++)scanf("%d",&a[i]);for(int i=1;i<=n;i++){for (;T<=2*(a[i]-a[t+1]);t++)M=__min(M,f[t]-2*a[t+1]);...
s363727182
p03940
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ ll n, e, t; cin>>n>>e>>t; if(n > 2004) return; ll a[n]; for(int i = 0; i < n; i++) cin>>a[i]; ll dp[n+1]; dp[n] = 0; for(int i = n-1; i >= 0; i--){ dp[i] = dp[i+1] + t; for(int j = i+1; j < n; j++){ dp[i] = min(dp[i], dp[j+1] +...
a.cc: In function 'int main()': a.cc:7:22: error: return-statement with no value, in function returning 'int' [-fpermissive] 7 | if(n > 2004) return; | ^~~~~~
s810769784
p03940
C++
#include<bits/stdc++.h> using namespace std; template<typename t>void chkmin(t&a,t b){if(a>b)a=b;} typedef long long ll; const int maxn=1e5+10; int n,t,e,x[maxn],end=0; ll dp[maxn],val=1e18; int main(){ cin>>n>>e>>t; for(int i=1;i<=n;++i){ dp[i]=1e18; cin>>x[i]; while(end<i&&2*(x[i]-x[end+1])>=t) chkmin(v...
a.cc: In function 'int main()': a.cc:16:23: error: reference to 'end' is ambiguous 16 | while(end<i&&2*(x[i]-x[end+1])>=t) | ^~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166, from a.cc:1: /usr/include/c++/14/valarray:1265:5:...
s902804088
p03940
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for (int i = (a); i < (b); i++) #define RFOR(i,b,a) for (int i = (b)-1; i >= (a); i--) #define ITER(it,a) for (__typeof(a.begin()) it = a.begin(); it != a.end(); it++) #define FILL(a,value) memset(a, value, sizeof(a)) #define SZ(a) (int)a.size() #define...
a.cc: In function 'll findDp(int)': a.cc:49:27: error: no matching function for call to 'min(ll&, int)' 49 | dp2 += min(dpRMQ[opt - 1] , 0); | ~~~^~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-g...
s791148456
p03940
C++
#include<iostream> #include<string> #include<ctime> #include<algorithm> #include<set> #include<vector> #include<queue> #include<cstdio> #include<map> #include<string.h> using namespace std; long long x[100008],dp[100008];long long t,e; void update(long long i,long long j) { dp[i]=min(dp[i],dp[j]+max(t,2*(x[i]-x[j+1])...
a.cc: In function 'int main()': a.cc:30:41: error: no matching function for call to 'max(long long int, int)' 30 | update(i,j);update(i,max(j-1,0));update(i,j+1); | ~~~^~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/in...
s656330203
p03940
C++
#include <iostream> #include <cstring> #include <string> #include <algorithm> #include <cstdlib> #include <cstdio> #include <map> #include <set> #include <cmath> #include <vector> #include <ctime> #include <Queue> #include <sstream> #include <utility> #include <bitset> #include <stack> using namespace std; #define MP...
a.cc:12:10: fatal error: Queue: No such file or directory 12 | #include <Queue> | ^~~~~~~ compilation terminated.
s497002513
p03940
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int n, e, t; int x[100005]; ll f[100005]; ll tr[100005 << 2][2]; void Update(int L, int R, int p, int x, int l, int r, int rt) { if(L <= l && r <=R) { tr[rt] } } int main() { scanf("%d%d%d", &n, &e, &t); for(int i = 1; i <= n; i++) { scanf("%...
a.cc: In function 'void Update(int, int, int, int, int, int, int)': a.cc:12:23: error: expected ';' before '}' token 12 | tr[rt] | ^ | ; 13 | } | ~
s729421791
p03940
C++
#include <bits/stdc++.h> #define maxn 100010 #define cmin(_a, _b) (_a > (_b) ? _a = (_b) : 0) int a[maxn], q[maxn]; long long f[maxn]; int main() { int n,m,T; scanf("%d%d%d",&n,&m,&T); for (int i=1;i<=n;++i)scanf("%d",&a[i]); int p = 1, h = 0, t = 0; long long fp = 1234567891234567ll; for (int i = ...
a.cc: In function 'int main()': a.cc:17:24: error: 'head' was not declared in this scope; did you mean 'read'? 17 | while (head < tail && (a[i] - a[q[head + 1]]) * 2 > T) ++head; | ^~~~ | read a.cc:17:31: error: 'tail' was not declared in this...
s931043282
p03940
C++
#include <bits/stdc++.h> #define SZ(x) ((int) (x).size()) using namespace std; typedef long long i64; const int64_t LINF = 1LL << 62; int main() { #ifdef LOCAL_RUN freopen("task.in", "r", stdin); freopen("task.out", "w", stdout); //freopen("task.err", "w", stderr); #endif // ONLINE_JUDGE ios:...
a.cc: In function 'int main()': a.cc:46:23: error: no matching function for call to 'max(int64_t&, long long int)' 46 | time = max(prevSteady, 2LL * X[i]) + cval - pval; | ~~~^~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /u...
s640467408
p03940
C++
#include <bits/stdc++.h> #define SZ(x) ((int) (x).size()) using namespace std; typedef long long i64; int main() { #ifdef LOCAL_RUN freopen("task.in", "r", stdin); freopen("task.out", "w", stdout); //freopen("task.err", "w", stderr); #endif // ONLINE_JUDGE ios::sync_with_stdio(false); cin....
a.cc: In function 'int main()': a.cc:28:24: error: no matching function for call to 'min(__gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type, long long int)' 28 | dp[i] = min((int64_t) dp[i], dp[j] + X[j + 1] - X[j] + | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
s939732942
p03940
C++
#include <bits/stdc++.h> #define SZ(x) ((int) (x).size()) using namespace std; typedef long long i64; int main() { #ifdef LOCAL_RUN freopen("task.in", "r", stdin); freopen("task.out", "w", stdout); //freopen("task.err", "w", stderr); #endif // ONLINE_JUDGE ios::sync_with_stdio(false); cin....
a.cc: In function 'int main()': a.cc:28:24: error: no matching function for call to 'min(__gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type&, long long int)' 28 | dp[i] = min(dp[i], dp[j] + X[j + 1] - X[j] + | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 29 | ...
s865331820
p03940
C++
#include <bits/stdc++.h> #define SZ(x) ((int) (x).size()) using namespace std; typedef long long i64; int main() { #ifdef LOCAL_RUN freopen("task.in", "r", stdin); freopen("task.out", "w", stdout); //freopen("task.err", "w", stderr); #endif // ONLINE_JUDGE ios::sync_with_stdio(false); cin....
a.cc: In function 'int main()': a.cc:29:50: error: no matching function for call to 'max(int64_t, long long int)' 29 | 3LL * (X[i] - X[j + 1]) + max((int64_t) 0, (int64_t) T - 2LL * (X[i] - X[j + 1]))); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...