submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s117353128
p03779
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { ll n;cin>>n; ll sm = 0; rep(i,100000) { sm+=i; if (s >= n) { cout << i; return 0; } } }
a.cc: In function 'int main()': a.cc:11:9: error: 's' was not declared in this scope 11 | if (s >= n) { | ^
s838840307
p03779
C++
#include <bits/stdc++.h> using namespace std; int main(){ int x; cin >> x; int dp[x+1]; for(int i=0;i<=x;i++) dp[i]=1e9+1; dp[0]=0; dp[1]=1; dp[2]=2; dp[3]=2; int t=3; for(int i=4;i<=x;i++){ if(dp[i-t]==t) t++; dp[i]=t; } cout << dp[n] << endl; }
a.cc: In function 'int main()': a.cc:18:16: error: 'n' was not declared in this scope 18 | cout << dp[n] << endl; | ^
s781648588
p03779
C++
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <ctime> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define REP(i,n) for (int i = 0; i < (n); ++i) #define SORT(a) sort((a).begin(),...
a.cc: In function 'int main()': a.cc:34:44: error: expected primary-expression before '<<' token 34 | cout << ceil((sqrt(8 * x + 1) - 1) / 2); << endl; | ^~
s589316114
p03779
C++
1
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1 | ^
s676883532
p03779
C++
#include <iostream> #include <vector> #include <numeric> typedef long long ll; const int INF = 1e9; const int MOD = 1e9+7; const ll LINF = 1e18; using namespace std; #define rep(i, a, b) for (int i = a; i < b; i++) #define rrep(i, a, b) for (int i = a; i <= b; i++) #define revrep(i, s) for (int i = s-1; i > 0; i--) ...
a.cc: In function 'long long int solve(long long int, std::vector<long int>, long long int, long long int)': a.cc:26:20: error: no matching function for call to 'min(<brace-enclosed initializer list>)' 26 | return std::min({solve(index + 1, divs, X, now + divs[index]), | ~~~~~~~~^~~~~~~~~~~~~~~~...
s819356408
p03779
C++
#include <iostream> #include <map> #include <vector> #include <numeric> typedef long long ll; const int INF = 1e9; const int MOD = 1e9+7; const ll LINF = 1e18; using namespace std; #define rep(i, a, b) for (int i = a; i < b; i++) #define rrep(i, a, b) for (int i = a; i <= b; i++) #define revrep(i, s) for (int i = s-...
a.cc: In function 'long long int solve(long long int, std::vector<long int>, long long int, long long int)': a.cc:27:15: error: no matching function for call to 'min(<brace-enclosed initializer list>)' 27 | return min({solve(index + 1, divs, X, now + divs[index]), | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~...
s417858687
p03779
C++
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; typedef unsigned long long int ull; typedef long double ldb; typedef long long int ll; #define for01(k,n) for (ll i=k; i<n; i++) #define for02(k,n) for (ll j=k; j<n; j++) #define for03(k,n) for (ll k...
a.cc: In function 'int main()': a.cc:122:2: error: expected '}' at end of input 122 | } | ^ a.cc:107:1: note: to match this '{' 107 | { | ^
s118025675
p03779
C++
#include<bits/stdc++.h> using namespace std; int main(){ long x; int i=0; cin >> x; while(x!=0){ i++; if(x>=2*i+1)y-=i; else if(x==i)x-=i; } cout << i; }
a.cc: In function 'int main()': a.cc:9:17: error: 'y' was not declared in this scope 9 | if(x>=2*i+1)y-=i; | ^
s532400995
p03779
C++
11
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 11 | ^~
s237560569
p03779
C++
#include <bits/stdc++.h> using namespace std; #define ll long long #define REP(i,n) for(long long i=0;i<n;++i) #define REPP(i,m,n) for(long long i=m;i<n;++i) #define rep(i,n) for(long long i = n-1;i>=0;--i) #define repp(i,n,m) for(long long i = n-1; i >= m; --i) #define ALL(N) (N.begin(),N.end()) #define de cout << "li...
a.cc: In function 'int main()': a.cc:19:19: error: expected ';' before 'int' 19 | int X;cin >> X | ^ | ; 20 | int ans = 0,cnt = 0; | ~~~ a.cc:21:11: error: 'N' was not declared in this scope 21 | REP(i,N){ | ^ a.c...
s364458275
p03779
C++
#include <bits/stdc++.h> using namespace std; #define ll long long #define REP(i,n) for(long long i=0;i<n;++i) #define REPP(i,m,n) for(long long i=m;i<n;++i) #define rep(i,n) for(long long i = n-1;i>=0;--i) #define repp(i,n,m) for(long long i = n-1; i >= m; --i) #define ALL(N) (N.begin(),N.end()) #define de cout << "li...
a.cc: In function 'int main()': a.cc:21:11: error: 'N' was not declared in this scope 21 | REP(i,N){ | ^ a.cc:4:38: note: in definition of macro 'REP' 4 | #define REP(i,n) for(long long i=0;i<n;++i) | ^
s516548649
p03779
C++
#include<bits/stdc++.h> using namespace std ; int main(){ intn , sum , x ; sum = 0 ; cin >> x ; for(int i=1; sum<x; i++){ sum += i ; n = i ; } cout << n << endl ; }
a.cc: In function 'int main()': a.cc:5:3: error: 'intn' was not declared in this scope; did you mean 'int'? 5 | intn , sum , x ; | ^~~~ | int a.cc:5:10: error: 'sum' was not declared in this scope 5 | intn , sum , x ; | ^~~ a.cc:5:16: error: 'x' was not declared in this scope ...
s403990130
p03779
C++
#include <iostream> #include <cmath> using namespace std; int main(){ long long int X; long long int A; cin >> X; A = X; X *= 2LL; long long int x = sqrt(X); x++; long long int ans = 0LL; while(x>=0){ if(x * (x+1) == X){ ans = x; break; }else if(x * (x+1) < X){ x++; l...
a.cc: In function 'int main()': a.cc:21:27: error: 'x' cannot be used as a function 21 | long long int d = x (x+1) / 2 - Z; | ~~^~~~~ a.cc:21:39: error: 'Z' was not declared in this scope 21 | long long int d = x (x+1) / 2 - Z; | ...
s171922158
p03779
C++
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; #define rep(i, n) REP(i, 0, n) #define ALL(v) v.begin(), v.end() #define MSG(a) cout << #a << " " << a << endl; #define REP(i, x, n) for (int i = x; i < n; i++) #define OP(m) cout << m << endl typedef long long ll; typedef unsigned long long ull; ...
a.cc: In function 'int main()': a.cc:18:13: error: expected primary-expression before ';' token 18 | int i = ; | ^
s650559584
p03779
C++
#include <bits/stdc++.h> int main(){ int x,t=0,c=0; std::cin>>x; while(t<x) {cnt++;t+=c;} std::cout<<c; }
a.cc: In function 'int main()': a.cc:5:15: error: 'cnt' was not declared in this scope; did you mean 'int'? 5 | while(t<x) {cnt++;t+=c;} | ^~~ | int
s015862658
p03779
C++
#include <bits/stdc++.h> using namespace std; int main() { int X; cint >> X; int count = 0; int ans = 0; vector<int> vec; for (int i = 0; i < X + 1; i++) { vec; } for (int i = 0; size.vec(); i++) { ans++; count++; if (X < count + i + 1) ...
a.cc: In function 'int main()': a.cc:8:5: error: 'cint' was not declared in this scope; did you mean 'uint'? 8 | cint >> X; | ^~~~ | uint a.cc:19:26: error: overloaded function with no contextual type information 19 | for (int i = 0; size.vec(); i++) | ^...
s209395456
p03779
C++
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); : ...
a.cc: In function 'int main()': a.cc:6:183: error: expected primary-expression before ':' token 6 | cin.tie(0); : ...
s030993203
p03779
C++
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); : ...
a.cc: In function 'int main()': a.cc:6:183: error: expected primary-expression before ':' token 6 | cin.tie(0); : ...
s645631398
p03779
C++
#include <iostream> #include <vector> #include <algorithm> #include <cmath> int main() { long N; std::cin >> N; long partial=1+8*N; double edge=sqrt(partial)); partial=edge-1; edge=partial/2; long result=std::ceil(edge); std::cout << result << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:12:30: error: expected ',' or ';' before ')' token 12 | double edge=sqrt(partial)); | ^
s362967235
p03779
C++
#include <iostream> #include <conio.h> using namespace std; int main() { int goal = 0; int position = 0; int count = 0; cin >> goal; int command(int count, int goal, int position); count = command(count, goal, position); cout << count; _getch(); } int command(int count, int goal, int position) { count++; if ...
a.cc:2:10: fatal error: conio.h: No such file or directory 2 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s281081269
p03779
C++
#include <bits/stdc++h> using namespace std; int main(){ int x; int ans=1,me=0; while(me<x){ me+ans; ans++; } cout << ans << endl; }
a.cc:1:10: fatal error: bits/stdc++h: No such file or directory 1 | #include <bits/stdc++h> | ^~~~~~~~~~~~~~ compilation terminated.
s882989313
p03779
C
#include<stdio.h> int main(){ int x; scanf("%d" &x); int a = 0; int i; for( i = 0; a<x; i++) a += i; i--; printf("%d\n", i); return 0; }
main.c: In function 'main': main.c:5:14: error: invalid operands to binary & (have 'char *' and 'int') 5 | scanf("%d" &x); | ~~~~ ^ | | | char *
s077453298
p03779
C
#include<stdio.h> int main(){ int x; scanf("%d" &x); int a = 0; int i; for( i = 0; a<X; i++) a += i; i--; printf("%d\n", i); return 0; }
main.c: In function 'main': main.c:5:14: error: invalid operands to binary & (have 'char *' and 'int') 5 | scanf("%d" &x); | ~~~~ ^ | | | char * main.c:8:17: error: 'X' undeclared (first use in this function) 8 | for( i = 0; a<X; i++) | ^ main....
s302841251
p03779
C
#include<stdio.h> int main(){ int X; scanf("%d" &X); int a = 0; for(int i = 0; a<X; i++) a += i; i--; printf("%d\n", i); return 0; }
main.c: In function 'main': main.c:5:14: error: invalid operands to binary & (have 'char *' and 'int') 5 | scanf("%d" &X); | ~~~~ ^ | | | char * main.c:9:3: error: 'i' undeclared (first use in this function) 9 | i--; | ^ main.c:9:3: note: each undeclared ide...
s221371076
p03779
C
#include<stdio.h> int main(){ int X; scanf("%d" &X); int a = 0; for(int i = 0; a<X; i++) p += i; i--; printf("%d\n", i); return 0; }
main.c: In function 'main': main.c:5:14: error: invalid operands to binary & (have 'char *' and 'int') 5 | scanf("%d" &X); | ~~~~ ^ | | | char * main.c:8:3: error: 'p' undeclared (first use in this function) 8 | p += i; | ^ main.c:8:3: note: each undeclared ...
s159865615
p03779
C
#include<stdio.h> int main(){ int X; scanf("%d" &X); int a = 0; for(int i = 0; a<X; i++); p += i; i--; printf("%d\n", i); return 0; }
main.c: In function 'main': main.c:5:14: error: invalid operands to binary & (have 'char *' and 'int') 5 | scanf("%d" &X); | ~~~~ ^ | | | char * main.c:8:3: error: 'p' undeclared (first use in this function) 8 | p += i; | ^ main.c:8:3: note: each undeclared ...
s329335591
p03779
C
#include<stdio.h> int main(){ int x; scanf("%d" &X); int a = 0; for(int i = 0; a<X; i++); p += i; i--; printf("%d\n", i); return 0; }
main.c: In function 'main': main.c:5:15: error: 'X' undeclared (first use in this function) 5 | scanf("%d" &X); | ^ main.c:5:15: note: each undeclared identifier is reported only once for each function it appears in main.c:8:3: error: 'p' undeclared (first use in this function) 8 | p += ...
s307497057
p03779
C
#include<stdio.h> int main(){ int x; scanf("%d"m &X); int a = 0; for(int i = 0; a<X; i++); p += i; i--; printf("%d\n", i); return 0; }
main.c: In function 'main': main.c:5:13: error: expected ')' before 'm' 5 | scanf("%d"m &X); | ~ ^ | ) main.c:7:20: error: 'X' undeclared (first use in this function) 7 | for(int i = 0; a<X; i++); | ^ main.c:7:20: note: each undeclared identifier is...
s437540582
p03779
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; cin>>n; vector<int>a(1); a[0]=1; if(n==1){ cout <<1; return 0; } for(int i=1;a[i]<1000000000;i++){ a.push_back( (i+1)+a[i-1] ); if(a[i]>=n){ cout<<i+1; return 0; } }
a.cc: In function 'int main()': a.cc:20:10: error: expected '}' at end of input 20 | } | ^ a.cc:5:12: note: to match this '{' 5 | int main() { | ^
s159650621
p03779
C++
#include<bits/stdc++.h> #define all(x) (x).begin(),(x).end() typedef long long ll; #define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i) #define REP(i,num,n) for(ll i=num, i##_len=(n); i<i##_len; ++i) #define repprev(i,a,b) for(ll i=b-1;i>=a;i--) #define reprev(i,n) repprev(i,0,n) using namespace std; #define sz(x)...
a.cc: In function 'int main()': a.cc:198:19: error: expected ';' before 'break' 198 | (sum >= X) break; | ^~~~~~ | ;
s610726750
p03779
C++
#include<bits/stdc++.h> #define all(x) (x).begin(),(x).end() typedef long long ll; #define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i) #define REP(i,num,n) for(ll i=num, i##_len=(n); i<i##_len; ++i) #define repprev(i,a,b) for(ll i=b-1;i>=a;i--) #define reprev(i,n) repprev(i,0,n) using namespace std; #define sz(x)...
a.cc: In function 'int main()': a.cc:195:9: error: 't' was not declared in this scope 195 | for(t = 1; ; t++){ | ^ a.cc:197:19: error: expected ';' before 'break' 197 | (sum >= X) break; | ^~~~~~ | ; a.cc:199:12: error: 't' was not declared i...
s935457956
p03779
C
#include<stdio.h> int main(){ int i,j,k,T; scanf("%d",&T); i=1; while(i(i+1)/2 < T) i++; printf("%d\n",i-1); return 0; }
main.c: In function 'main': main.c:8:9: error: called object 'i' is not a function or function pointer 8 | while(i(i+1)/2 < T) | ^ main.c:4:7: note: declared here 4 | int i,j,k,T; | ^
s690439098
p03779
C
#include<stdio.h> #include<math.h> int main (){ int x; scanf("%d",x); int a=ceil(sqrt(2*x))-1; while(2x>a*a+a) a++; printf("%d",a); }
main.c: In function 'main': main.c:8:9: error: invalid suffix "x" on integer constant 8 | while(2x>a*a+a) a++; | ^~
s254501563
p03779
C++
#include <bits/stdc++.h> using namespace std; const int MOD = 1e9 + 7; int main() { ios :: sync_with_stdio(0); cin.tie(nullptr); int x; long long csum = 0; cin >> x; for(int i = 1; i <= x; ++i) { cout << 1; for(int j = 0; j <= csum; ++j) if (i * (i + 1) / 2 - j ...
a.cc: In function 'int main()': a.cc:24:19: error: no matching function for call to 'min(long long int&, int&)' 24 | csum = min(csum, x); | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s165319456
p03779
C++
#include <bits/stdc++.h> using namespace std; const int MOD = 1e9 + 7; int main() { ios :: sync_with_stdio(0); cin.tie(nullptr); int x; long long csum = 0; cin >> x; for(int i = 1; i <= x; ++i) { cout << 1; for(int j = 0; j <= csum; ++j) if (i * (i + 1) / 2 - j ...
a.cc: In function 'int main()': a.cc:24:19: error: no matching function for call to 'max(long long int&, int&)' 24 | csum = max(csum, x); | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s463052342
p03779
C++
#include <stdio.h> int main() { long long scannum; long long num = 0; long long i; scanf_s("%lld", &scannum); for (i = 0; num <= scannum; i++) { num += i + 1; if (num >= scannum) { break; } } printf("%lld", i + 1); return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 8 | scanf_s("%lld", &scannum); | ^~~~~~~ | scanf
s685447513
p03779
C++
#include<iostream> int main(){ ll x; cin>>x; ll n=0; while(x)x-=++n; cout<<n<<endl; }
a.cc: In function 'int main()': a.cc:3:5: error: 'll' was not declared in this scope 3 | ll x; | ^~ a.cc:4:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | cin>>x; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18:...
s910317573
p03779
C++
x = STDIN.gets.chomp.to_i time = 0 loc = 0 loop do time += 1 loc += time if x <=loc break end end puts time
a.cc:1:1: error: 'x' does not name a type 1 | x = STDIN.gets.chomp.to_i | ^
s879070123
p03779
C++
x = STDIN.gets.chomp.to_i time = 0 loc = 0 loop do- time += 1 loc += time if x <=loc break end end puts time
a.cc:1:1: error: 'x' does not name a type 1 | x = STDIN.gets.chomp.to_i | ^
s337160905
p03779
C++
#include <iostream> #include<algorithm> #include<cmath> using namespace std; int main() { int x,cnt=0; for(int i=0; i<=x; i++) { cnt+=i; if(cnt>=x) { break; } } cout << i << endl; }
a.cc: In function 'int main()': a.cc:13:11: error: 'i' was not declared in this scope 13 | cout << i << endl; | ^
s023985796
p03779
C++
#include<bits/stdc++.h> #define mins(a,b) a=min(a,b) #define maxs(a,b) a=max(a,b) using namespace std; int main(){ long long int n,x=0; cin>>n; for(int ans=1;ans<1000000000;ans++){ x+=ans; if(x>=n) break; } cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:13:9: error: 'ans' was not declared in this scope; did you mean 'abs'? 13 | cout<<ans<<endl; | ^~~ | abs
s985966302
p03779
C++
#include<bits/stdc++.h> #define mins(a,b) a=min(a,b) #define maxs(a,b) a=max(a,b) using namespace std; int main(){ long long int n,x=0,; cin>>n; for(int ans=1;ans<1000000000;ans++){ x+=ans; if(x>=n) break; } cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:6:23: error: expected unqualified-id before ';' token 6 | long long int n,x=0,; | ^ a.cc:13:9: error: 'ans' was not declared in this scope; did you mean 'abs'? 13 | cout<<ans<<endl; | ^~~ | abs
s353102017
p03779
C++
X = int(input()) sum_d = 0 i = 1 while True: sum_d += i if sum_d >= X: print(i) break i += 1
a.cc:1:1: error: 'X' does not name a type 1 | X = int(input()) | ^
s700020761
p03779
Java
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.NoSuchElementException; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.IntStream; public class Main { public static void main(String[] args) throws IOException { new Main().solve(); } ...
Main.java:89: error: cannot find symbol res = IntStream.range(0, 1000000000).reduce(0, (inSum, index) -> { ^ symbol: variable res location: class Main 1 error
s183077339
p03779
C++
#include <bits/stdc++.h> using namespace std; int main () { int X; cin >> X; long ans, sum = 0; for(int i = 1; i <= X; i++) { if(X - sum - i > i) sum += i; else if (X == sum + i) sum += i; if(sum == X) { ans = i; break; } } cout << << endl; return 0; }
a.cc: In function 'int main()': a.cc:15:12: error: expected primary-expression before '<<' token 15 | cout << << endl; | ^~
s406187512
p03779
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,N) for(int i=0;i<int(N);++i) #define rep1(i,N) for(int i=1;i<int(N);++i) int main() { int X; cin>>X; ll x=0,cnt=0; rep1(i,inf){ x+=i; cnt++; if(x>=X)break; } cout<<cnt<<endl; }
a.cc: In function 'int main()': a.cc:9:9: error: 'll' was not declared in this scope 9 | ll x=0,cnt=0; | ^~ a.cc:10:16: error: 'inf' was not declared in this scope; did you mean 'ynf'? 10 | rep1(i,inf){ | ^~~ a.cc:4:37: note: in definition of macro 'rep1' 4 ...
s769602453
p03779
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,N) for(int i=0;i<int(N);++i) int main() { int X; cin>>X; ll x=0,cnt=0; rep1(i,inf){ x+=i; cnt++; if(x>=X)break; } cout<<cnt<<endl; }
a.cc: In function 'int main()': a.cc:8:9: error: 'll' was not declared in this scope 8 | ll x=0,cnt=0; | ^~ a.cc:9:14: error: 'i' was not declared in this scope 9 | rep1(i,inf){ | ^ a.cc:9:16: error: 'inf' was not declared in this scope; did you mean 'ynf'? 9...
s972314097
p03779
C++
#include <bits/stdc++.h> #define repd(i,a,b) for (int i=(a);i<(b);i++) #define rep(i,n) repd(i,0,n) //#define int long long typedef long long ll; using namespace std; const int MOD = 1000000007; const int INF = 1010000000; const double EPS = 1e-10; const pair<int,int> fd[] = {make_pair(1,0),make_pair(-1,0),make_pair(0,...
a.cc: In function 'int main()': a.cc:2:21: error: expected ',' or ';' before 'for' 2 | #define repd(i,a,b) for (int i=(a);i<(b);i++) | ^~~ a.cc:16:3: note: in expansion of macro 'repd' 16 | repd(i,1,lim){ | ^~~~ a.cc:16:8: error: 'i' was not declared in this scope 16 | re...
s714882970
p03779
C++
#include <iostream> using namespace std; int main(){ int N; int k; cin >> N; for (int i=1;;i++) { int l1=(i*(i+1))/2 - N; if(l1 >= 0){ k = i; break;} } cout <<k;
a.cc: In function 'int main()': a.cc:16:12: error: expected '}' at end of input 16 | cout <<k; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s456577124
p03779
C++
#include <iostream> using namespace std; int main(){ int N; int k; cin >> N; for (int i=1;;i++) { int l1=i*(i+1) - N; if(l1 >= 0){ k = i; break;} cout <<k; }
a.cc: In function 'int main()': a.cc:18:4: error: expected '}' at end of input 18 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s698036781
p03779
C++
#include <iostream> using namespace std; int main(){ int N; int k; cin >> N; for (int i=1;;i++) { int l1=i*(i+1) - N; if(l1 >= 0){ k = i; break;} } cout <<k;
a.cc: In function 'int main()': a.cc:16:12: error: expected '}' at end of input 16 | cout <<k; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s979534661
p03779
C++
#include <iostream> using namespace std; int main() { long long x; cin >> x; int n = sqrt(2 * x); cout << n << endl; if (n*(n + 1) / 2 < x) { n++; } cout << n << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:17: error: 'sqrt' was not declared in this scope 6 | int n = sqrt(2 * x); | ^~~~
s365100714
p03779
C++
// #include <bits/stdc++.h> #include <map> #include <set> #include <ctime> #include <cstring> #include <queue> #include <iostream> #include <algorithm> using namespace std; #define mod 1000000007 #define INF 1000000000 #define mp make_pair #define pb push_back #define mt make_tuple #define eb emplace_back #define al...
a.cc: In function 'int main()': a.cc:42:20: error: 'sqrt' was not declared in this scope 42 | ll t = int(sqrt<ll>(2*X)+.5); | ^~~~ a.cc:42:16: error: expected primary-expression before 'int' 42 | ll t = int(sqrt<ll>(2*X)+.5); | ^~~
s913495024
p03779
C++
#include<bits/stdc++.h> using namespace std; int main() { long long INF = 1e9 + 1; ll X, x=0; cin >> X; for (int i = 1; i < INF; i++) { x += i; if (X >= x) cout << i << endl; } return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'll' was not declared in this scope 5 | ll X, x=0; | ^~ a.cc:6:16: error: 'X' was not declared in this scope 6 | cin >> X; | ^ a.cc:8:17: error: 'x' was not declared in this scope 8 | x += i; ...
s040759751
p03779
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; int main(){ int i,sum=0; for(i=1;sum<=x;i++) { sum+=i; } cout<<i; return 0; }
a.cc: In function 'int main()': a.cc:7:22: error: 'x' was not declared in this scope 7 | for(i=1;sum<=x;i++) | ^
s647037916
p03779
C++
#include<bits/stdc++.h> using namespace std; int main(){ int x,ans=0,i=0; cin>>x; while(ans<x){ i++ ans+=i; } cout<<i<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:20: error: expected ';' before 'ans' 7 | i++ | ^ | ; 8 | ans+=i; | ~~~
s417388379
p03779
C++
#include<bits/stdc++.h> using namespace std; int main(){ int x,ans=0,i=0; cin>>x; while(ans>=i){ i++ ans+=i; } cout<<i<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:20: error: expected ';' before 'ans' 7 | i++ | ^ | ; 8 | ans+=i; | ~~~
s947935355
p03779
C++
#include<bits/stdc++.h> using namespace std; int main(){ int x,ans=0,i=0; cin>>x; while(ans>=i){ i++ ans+=i; } cout<<ans; return 0; }
a.cc: In function 'int main()': a.cc:7:20: error: expected ';' before 'ans' 7 | i++ | ^ | ; 8 | ans+=i; | ~~~
s016729072
p03779
C++
#include<bits/stdc++.h> using namespace std; int main(){ int x,ans=0,i=0; cin>>x; while(ans>=i){ i++ ans+=i; } cout<<i; return 0; }
a.cc: In function 'int main()': a.cc:7:20: error: expected ';' before 'ans' 7 | i++ | ^ | ; 8 | ans+=i; | ~~~
s998715036
p03779
C++
#include<bits/stdc++.h> using namespace std; int main(){ int x,ans=0,i=0; cin>>x; while(ans>=i){ i++ ans+=i; } cout<<i; return 0; }
a.cc: In function 'int main()': a.cc:7:20: error: expected ';' before 'ans' 7 | i++ | ^ | ; 8 | ans+=i; | ~~~
s797035619
p03779
C++
#include<bits/stdc++.h> using namespace std; tepedef long long ll; int main(){ int x,ans=0,i=0; cin>>x; while(ans>=i){ i++ ans+=i; } cout<<i; return 0; }
a.cc:3:1: error: 'tepedef' does not name a type; did you mean 'typedef'? 3 | tepedef long long ll; | ^~~~~~~ | typedef a.cc: In function 'int main()': a.cc:8:20: error: expected ';' before 'ans' 8 | i++ | ^ | ; 9 | ...
s445279234
p03779
C++
#include<bits/stdc++.h> using namespace std; tepedef long long ll; int main(){ cout<<2; return 0; }
a.cc:3:1: error: 'tepedef' does not name a type; did you mean 'typedef'? 3 | tepedef long long ll; | ^~~~~~~ | typedef
s754407764
p03779
C++
#include <iostream> using namespace std; int main(){ cin>>n; cout<<n/2; return 0; }
a.cc: In function 'int main()': a.cc:4:14: error: 'n' was not declared in this scope 4 | cin>>n; | ^
s442227073
p03779
C++
#include <iostream> signed main(){ int X; cin >> X; int i; for (i = 1; i*(i + 1) / 2 < X; i++); cout << i << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> X; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ...
s077596808
p03779
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ int X,a=0,b=0; cin >> X; for(int i=0; i<X; i++){ a += 1; b += a; if(c>=X){ cout << a << endl; return 0; } } }
a.cc: In function 'int main()': a.cc:11:8: error: 'c' was not declared in this scope 11 | if(c>=X){ | ^
s539891396
p03779
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ int X,a=0,b=0; cin >> X; for(int i=0; i<X; i++){ a += 1; c += a; if(c>=X){ cout << a << endl; return 0; } } }
a.cc: In function 'int main()': a.cc:10:5: error: 'c' was not declared in this scope 10 | c += a; | ^
s519099124
p03779
Java
import java.util.*;public class Main{public static void main(String[] args){Scanner sc = new Scanner(System.in)int x=sc.nextInt(),t=0;while(t*(t+1)/2<x){t++;}System.out.println(t);}}
Main.java:1: error: ';' expected import java.util.*;public class Main{public static void main(String[] args){Scanner sc = new Scanner(System.in)int x=sc.nextInt(),t=0;while(t*(t+1)/2<x){t++;}System.out.println(t);}} ...
s799857422
p03779
C++
#include<iostream> using namespace std; int main(){ int x; int iwa=0,ta=0; cin>>x: for(int i=0;i<1000000000;i++){ iwa++; ta+=iwa; if(ta>=x){break;} } cout<<iwa<<endl; }
a.cc: In function 'int main()': a.cc:6:9: error: expected ';' before ':' token 6 | cin>>x: | ^ | ; a.cc:7:15: error: 'i' was not declared in this scope 7 | for(int i=0;i<1000000000;i++){ | ^
s298876651
p03779
C++
#include<iostream> #include<climits> #include<math.h> #include<vector> #include<algorithm> #include<cstdio> #include<stdio.h> #include <string> #include <complex> #include <functional> using namespace std; typedef pair<int,int> P; double dat[100][100]; //int dp[6][1010];//動的計画法 int prime[10000001]; char str[1010][1010]...
a.cc: In function 'int main()': a.cc:22:28: error: expected primary-expression before ')' token 22 | for(int i=1;i<=x;i+){ | ^
s841365645
p03779
C++
#include<bitset> //1 #include<iostream> //2 #include<cmath> //3 using namespace std; //1 #include<bits/stdc++.h> //2 #define int long long //大悪魔すくにきあ //3 int GoHome(int n){ //1 } // 2 int Kaerinasai(int n){return n*(n+1)/2;} //3 int main(){ //1 int sucu; // 2 int tkmt; //3 cin>>sucu;tkmt=0; //1 ...
a.cc:20:15: warning: extra tokens at end of #undef directive 20 | #undef rep(a) // 2 | ^ a.cc: In function 'long long int GoHome(long long int)': a.cc:8:1: warning: no return statement in function returning non-void [-Wreturn-type] 8 | } // 2 | ^ At global scope: cc1plus: error: '::...
s130568446
p03779
C++
#include "bits/stdc++.h" using namespace std; #define MOD 1000000007 #define Nmax 200010 #define FOR(i,a,b) for(long long i=(a);i<(b);i++) #define RFOR(i,a,b) for(long long i = (b-1);i>=a;i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define ITR(itr,mp) for(auto itr = (mp).begin(); itr != (mp).end(); ...
a.cc: In function 'int main()': a.cc:27:52: error: expected ')' before ';' token 27 | cnt=min(X-ans+cnt,X-(ans+(2*cnt+3-(cnt+3))); | ~ ^ | )
s275351530
p03779
C++
#include<stdio.h> int x; int main(){ scanf("%d",&x); printf("%d",(int)2*sqrt(x)+0.5); }
a.cc: In function 'int main()': a.cc:5:22: error: 'sqrt' was not declared in this scope 5 | printf("%d",(int)2*sqrt(x)+0.5); | ^~~~
s482086041
p03779
C
i; main(a){ for(a-=i;(a-=i++)>0;gets(atoi(&a)); printf("%d\n",i-1); }
main.c:1:1: warning: data definition has no type or storage class 1 | i; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(a){ | ^~~~ main.c: In function 'main': main.c:2:1: error: type of '...
s936586185
p03779
C
i; main(a){ for(;(a-=i)++>0;scanf("%d",&a)); printf("%d\n",i); }
main.c:1:1: warning: data definition has no type or storage class 1 | i; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(a){ | ^~~~ main.c: In function 'main': main.c:2:1: error: type of '...
s632049948
p03779
C
i; main(a){ scanf("%d",&a); for(i;a-i++>0;) a-=i; } printf("%d\n",i); }
main.c:1:1: warning: data definition has no type or storage class 1 | i; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(a){ | ^~~~ main.c: In function 'main': main.c:2:1: error: type of '...
s929249640
p03779
C
i; main(a){ scanf("%d",&a); for(i;a-i>0;i++){ a-=i; } printf("%d\n"a?i-1:i); }
main.c:1:1: warning: data definition has no type or storage class 1 | i; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(a){ | ^~~~ main.c: In function 'main': main.c:2:1: error: type of '...
s214739059
p03779
C
i; main(a){ scanf("%d",&a); for(i;a-i<=0;i++){ a-=i; } printf("%d",a?i+1:i) }
main.c:1:1: warning: data definition has no type or storage class 1 | i; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int] main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | main(a){ | ^~~~ main.c: In function 'main': main.c:2:1: error: type of '...
s177766963
p03779
C
#include <iostream> using namespace std; int main() { int X; cin >> X; int t = 0; while(t*(t+1)/2 <= X) t++; cout << t << endl; return 0; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s052073293
p03779
C++
int main() { ll X; cin >> X; for (int i = 1; ; i++) { if (2 * X <= i * (i + 1)) { // auto K = i * (i + 1) / 2; // assert(K - X < i); std::cout << i << "\n"; return 0; } } return 0; }
a.cc: In function 'int main()': a.cc:2:3: error: 'll' was not declared in this scope 2 | ll X; cin >> X; | ^~ a.cc:2:9: error: 'cin' was not declared in this scope 2 | ll X; cin >> X; | ^~~ a.cc:2:16: error: 'X' was not declared in this scope 2 | ll X; cin >> X; | ...
s498956929
p03779
C++
#include <iostream> using namespace std; using ll = long long; int main(int argc, const char * argv[]) { ll x, sum = 0, ans; cin >> x; for (int i = 0; i <= x && !flag; i++) { sum += i; if (sum >= x) { ans = i; break; } } cout << ans << endl; }
a.cc: In function 'int main(int, const char**)': a.cc:8:32: error: 'flag' was not declared in this scope 8 | for (int i = 0; i <= x && !flag; i++) { | ^~~~
s084289619
p03779
C++
#include <iostream> #include <string> #include <cstring> #include <map> using namespace std; int run(int x, int arr[x]) { int titen = 0; for (int i = 1; i <= x; i++) { if (arr[i] == 1) { titen += i; } } if (titen == x) { for (int j = x; j > 0; j--) { if (arr[j] == 1) ...
a.cc:8:25: error: use of parameter outside function body before ']' token 8 | int run(int x, int arr[x]) { | ^ a.cc: In function 'int run(...)': a.cc:10:25: error: 'x' was not declared in this scope 10 | for (int i = 1; i <= x; i++) { | ^ a.cc:11:11:...
s814292044
p03779
C
#include <stdio.h> int main() { int X; scanf("%d", &X); for (int i = 1; i < X; i++) if ((1 + i) * i / 2 >= X) { ans = i; break; } printf("%d", ans); return 0; }
main.c: In function 'main': main.c:9:7: error: 'ans' undeclared (first use in this function) 9 | ans = i; | ^~~ main.c:9:7: note: each undeclared identifier is reported only once for each function it appears in
s680593923
p03779
C
#include <stdio.h> int main() { int X; scanf(“%d”, &X); for (int i = 1; i < X; i++) if ((1 + i) * i / 2 >= X) { ans = i; break; } printf(“%d\n”, ans); return 0; }
main.c: In function 'main': main.c:6:9: error: stray '\342' in program 6 | scanf(<U+201C>%d<U+201D>, &X); | ^~~~~~~~ main.c:6:10: error: expected expression before '%' token 6 | scanf(“%d”, &X); | ^ main.c:6:12: error: stray '\342' in program 6 | scanf(<U+201C>%d<U+201D>, ...
s307567169
p03779
C
#include <stdio.h> int main() { int X, ans; scanf(“%d”, &X); for (int i = 1; i < X; i++) if ((1 + i) * i / 2 >= X) { ans = i; break; } printf(“%d”, ans); return 0; }
main.c: In function 'main': main.c:6:9: error: stray '\342' in program 6 | scanf(<U+201C>%d<U+201D>, &X); | ^~~~~~~~ main.c:6:10: error: expected expression before '%' token 6 | scanf(“%d”, &X); | ^ main.c:6:12: error: stray '\342' in program 6 | scanf(<U+201C>%d<U+201D>, ...
s505583411
p03779
C
#include <stdio.h> int main() { int X; scanf(“%d”, &X); for (int i = 1; i < X; i++) if ((1 + i) * i / 2 >= X) { ans = i; break; } printf(“%d”, ans); return 0; }
main.c: In function 'main': main.c:6:9: error: stray '\342' in program 6 | scanf(<U+201C>%d<U+201D>, &X); | ^~~~~~~~ main.c:6:10: error: expected expression before '%' token 6 | scanf(“%d”, &X); | ^ main.c:6:12: error: stray '\342' in program 6 | scanf(<U+201C>%d<U+201D>, ...
s600745078
p03779
C
#include < stdio.h > int main() { int X; scanf(“%d”, &X); for (int i = 1; i < X; i++) if ((1 + i) * i / 2 >= X) { ans = i; break; } printf(“%d”, ans); return 0; }
main.c:1:10: fatal error: stdio.h : No such file or directory 1 | #include < stdio.h > | ^~~~~~~~~~~ compilation terminated.
s353267713
p03779
C
#include < stdio.h > int main() { int X; scanf(“%d”, &X); for (int i = 1; i < X; i++) if ((1 + i) * i / 2 >= X) { ans = i; break; } printf(“%d”, ans); return 0; }
main.c:1:10: fatal error: stdio.h : No such file or directory 1 | #include < stdio.h > | ^~~~~~~~~~~ compilation terminated.
s130960237
p03779
C++
#include < stdio.h > int main() { int X; scanf(“%d”, &X); for (int i = 1; i < X; i++) if ((1 + i) * i / 2 >= X) { ans = i; break; } printf(“%d”, ans); return 0; }
a.cc:1:10: fatal error: stdio.h : No such file or directory 1 | #include < stdio.h > | ^~~~~~~~~~~ compilation terminated.
s936472941
p03779
C++
#include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<LL,LL> P; const LL mod=1000000007; int main(){ int x; cin >> x; for(int i=1;i<=x;i++){ if(t*(t+1)/2>=x){ cout << i << endl; return 0; } } return 0; }
a.cc: In function 'int main()': a.cc:11:12: error: 't' was not declared in this scope 11 | if(t*(t+1)/2>=x){ | ^
s468295373
p03779
C++
import java.io.*; class Report12_2 { public static void main(String[] args) { try { BufferedReader br = new BufferedReader(new FileReader("./score.txt")); PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("oddScore.txt"))); while(true) { String str = br.readLine(); ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:15: error: expected ':' before 'static' 4 | public static void main(String[] args) | ^~~~~~~ | : a.cc:4:33:...
s151080558
p03779
C++
#include <iostream> using namespace std; int main(){ int X; int i; cin>>X; for(i=0;i<1000000000;i++){ if(i(1+i)/2>=X) break; } cout<<i<<endl; }
a.cc: In function 'int main()': a.cc:9:13: error: 'i' cannot be used as a function 9 | if(i(1+i)/2>=X) break; | ~^~~~~
s922704059
p03779
C++
#include <iostream> using namespace std; int main(){ int X; int i; for(i=0;i<1000000000;i++){ if(i(1+i)/2>=X) break; } cout<<i<<endl; }
a.cc: In function 'int main()': a.cc:8:13: error: 'i' cannot be used as a function 8 | if(i(1+i)/2>=X) break; | ~^~~~~
s540841693
p03779
C
#include<stdio.h> int main(void){ int X, i, sum; scanf("%d", &X); sum=0; for(i=0; sum<X; i++){ sum+=i; } printf("%d", i-1); return 0;
main.c: In function 'main': main.c:12:1: error: expected declaration or statement at end of input 12 | return 0; | ^~~~~~
s772006697
p03779
C++
#include <iostream> #include <math.h> using namespace std; int main(){ // int X = 2; int X = 0; cin >> X; int sum = 0; for(int i = 1; i <= X; i++){ sum += i; if(sum >= X){ int dis = sum - X; if(dis < X){ cout << i << endl; ...
a.cc: In function 'int main()': a.cc:21:6: error: expected '}' at end of input 21 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s879698168
p03779
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { // int X = 2; int X = 0; cin >> X; int sum = 0; for(int i = 1; i <= X; i++){ sum += i; if(sum >= X){ int dis = sum - X; if(dis < X){ ...
a.cc:23:5: error: expected unqualified-id before 'return' 23 | return 0; | ^~~~~~ a.cc:24:1: error: expected declaration before '}' token 24 | } | ^
s169712148
p03779
C++
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; namespace AtCoder { class MainClass { //C#7.0 int X; void Solve() { io.i(out X); Mathf mat = new Mathf(); ...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.Collectio...
s787948146
p03779
C++
#include <bits/stdc++.h> #define FOR(i,bg,ed) for(ll i=(bg);i<(ed);i++) #define REP(i,n) FOR(i,0,n) #define MOD 1000000007 //#define int long long using namespace std; typedef long long ll; const int INF = 1e9; signed main() { int X; cin >> X; int sum = 0; for (int t=1; true; t++) { sum += t...
a.cc: In function 'int main()': a.cc:23:13: error: 't' was not declared in this scope 23 | cout << t << endl; | ^
s383016198
p03779
C++
#include <iostream> #include <string> #include <algorithm> #include <cstring> #include <cstdio> #include <cmath> #include <cctype> #define div 1000000000+7 typedef long long ll; using namespace std; int main() { long x; long count = 0; cin >> x; for(int i = 1; i < INT_MAX; i++){ x = x - i; ...
a.cc: In function 'int main()': a.cc:20:24: error: 'INT_MAX' was not declared in this scope 20 | for(int i = 1; i < INT_MAX; i++){ | ^~~~~~~ a.cc:8:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 7 | #include <cctype> ...
s066006461
p03779
Java
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.InputMismatchException; public class Main { static void solve(B.FastScanner sc, PrintWriter out) { int X = sc.ni(); int dist = 0, i=0; while(dist<X) { di...
Main.java:8: error: package B does not exist static void solve(B.FastScanner sc, PrintWriter out) { ^ Main.java:18: error: package B does not exist B.FastScanner sc = new B.FastScanner(System.in); ^ Main.java:18: error: package B does not exist B.FastScanner sc = new ...
s572937687
p03779
C++
#include <iostream> #include <cmath> using namespace std; int main(){ int X; cin >> X; cout << ceil( (-1+sqrt(1+8*X)) / 2 ) << endl; } [
a.cc:11:1: error: expected unqualified-id before '[' token 11 | [ | ^