submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s195937662
p03706
C++
#include <bits/stdc++.h> using namespace std; #define int long long int main() { string S; cin >> S; int N = S.size(); int ans = (N-1)*(N-1); for(int i=0; i<N; i++){ if(i == 0 || i == N-1){ continue; } else if(S[i] == "U"){ ans += i; } else{ ans += N-1-i; } } cout...
cc1plus: error: '::main' must return 'int' a.cc: In function 'int main()': a.cc:13:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | else if(S[i] == "U"){
s358850515
p03707
C++
#include<bits/stdc++.h> using namespace std; const int N=2010; int sump[N][N],sume1[N][N],sume2[N][N]; bool mp[N][N]; int main() { static char s[N]; int n,m,q;cin>>n>>m>>q; for(int i=1;i<=n;i++) { scanf("%s",s+1); for(int j=1;j<=m;j++) mp[i][j]=(s[j]=='1'); } for(in...
a.cc: In function 'int main()': a.cc:33:10: error: no matching function for call to 'flush()' 33 | flush(); | ~~~~~^~ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /...
s764777630
p03707
C++
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define f first #define s second #define pb push_back #define pii pair<int,int> #define pll pair<ll,ll> #define ll long long #define faster ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); const ll M = 998244353; const int N = 1005; const int K = 3...
a.cc:19:45: error: 'int y1' redeclared as different kind of entity 19 | int a[N][N],c[N][N],r[N][N],cnt[N][N],x1,x2,y1,y2; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, ...
s914347910
p03707
C++
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define f first #define s second #define pb push_back #define pii pair<int,int> #define pll pair<ll,ll> #define ll long long #define faster ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); const ll M = 998244353; const int N = 1005; const int K = 3...
a.cc:20:45: error: 'int y1' redeclared as different kind of entity 20 | int a[N][N],c[N][N],r[N][N],cnt[N][N],x1,x2,y1,y2; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, ...
s063123395
p03707
C++
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define f first #define s second #define pb push_back #define pii pair<int,int> #define pll pair<ll,ll> #define ll long long #define faster ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); const ll M = 998244353; const int N = 1005; const int K = 3...
a.cc:20:44: error: 'long long int y1' redeclared as different kind of entity 20 | ll a[N][N],c[N][N],r[N][N],cnt[N][N],x1,x2,y1,y2; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,...
s653458939
p03707
C++
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define f first #define s second #define pb push_back #define pii pair<int,int> #define pll pair<ll,ll> #define ll long long #define faster ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); const ll M = 998244353; const int N = 1005; const int K = 3...
a.cc:20:45: error: 'int y1' redeclared as different kind of entity 20 | int a[N][N],c[N][N],r[N][N],cnt[N][N],x1,x2,y1,y2; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, ...
s382012071
p03707
C++
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define f first #define s second #define pb push_back #define pii pair<int,int> #define pll pair<ll,ll> #define ll long long #define faster ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); const ll M = 998244353; const int N = 2005; const int K = 3...
a.cc:20:45: error: 'int y1' redeclared as different kind of entity 20 | int a[N][N],c[N][N],r[N][N],cnt[N][N],x1,x2,y1,y2; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, ...
s572791024
p03707
C++
#include<bits/stdc++.h> using namespace std; char S[2020][2020]; int P[2020][2020]; int Q[2020][2020]; int R[2020][2020]; int cj(int T[][2020], int x1, int y1, int x2, int y2){ return T[x2][y2] - T[x1-1][y2] - T[x2][y1-1] + T[x1-1][y1-1]; } void ck(int n,int m,int q){ for(int i=1;i<=n;i++) for(int j=1;j...
a.cc: In function 'int main()': a.cc:31:14: error: 's' was not declared in this scope 31 | cin>>s[i]; | ^
s369837558
p03707
C++
#include<bits/stdc++.h> using namespace std; char S[2020][2020]; int P[2020][2020]; int Q[2020][2020]; int R[2020][2020]; int cj(int T[][2020], int x1, int y1, int x2, int y2){ return T[x2][y2] - T[x1-1][y2] - T[x2][y1-1] + T[x1-1][y1-1]; } void ck(){ for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) { ...
a.cc: In function 'void ck()': a.cc:11:20: error: 'n' was not declared in this scope 11 | for(int i=1;i<=n;i++) | ^ a.cc:12:24: error: 'm' was not declared in this scope 12 | for(int j=1;j<=m;j++) { | ^ a.cc:17:19: error: 'q' was not declared in th...
s005936152
p03707
C++
#include<bits/stdc++.h> using namespace std; const int N=2010; int sump[N][N],sume1[N][N],sume2[N][N]; bool mp[N][N]; int main() { static char s[N]; int n,m,q;cin>>n>>m>>q; for(int i=1;i<=n;i++) { scanf("%s",s+1); for(int j=1;j<=m;j++) mp[i][j]=(s[j]=='1'); } for(in...
a.cc: In function 'int main()': a.cc:33:10: error: no matching function for call to 'flush()' 33 | flush(); | ~~~~~^~ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /...
s082616435
p03707
C++
#include <bits/std++.h> using namespace std; const int MAXN = 2e3 + 10; vector<string> grid; int pref1[MAXN][MAXN], pref2[MAXN][MAXN], pref3[MAXN][MAXN]; int main(){ //freopen("sample_input.txt", "r", stdin); //freopen("sample_output.txt", "w", stdout); int t = 1; //cin>> t; while(t--){ //memset(grid, 0, si...
a.cc:1:10: fatal error: bits/std++.h: No such file or directory 1 | #include <bits/std++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s940411412
p03707
C++
#include <vector> #include <iostream> using namespace std; const int MAXN = 2e3 + 10; vector<string> grid; int pref1[MAXN][MAXN], pref2[MAXN][MAXN], pref3[MAXN][MAXN]; int main(){ //freopen("sample_input.txt", "r", stdin); //freopen("sample_output.txt", "w", stdout); int t = 1; //cin>> t; while(t--){ //mems...
a.cc: In function 'int main()': a.cc:19:17: error: 'memset' was not declared in this scope 19 | memset(pref1, 0, sizeof pref1); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <iostream>...
s947381468
p03707
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define FOR(i, a, b) for(ll i = (a); i < (b); ++i) #define FORR(i, a, b) for(ll i = (a); i > (b); --i) #define REP(i, n) for(ll i = 0; i < (n); ++i) #define REPR(i, n) for(ll i = n; i >= 0; i--) #define FOREACH(x, a) for(auto &(x) : (a)) #define VECC...
a.cc: In function 'int main()': a.cc:82:14: error: expected ';' before 'll' 82 | cinfast() | ^ | ; a.cc:83:10: error: 'N' was not declared in this scope 83 | LCIN(N, M, Q); | ^ a.cc:37:9: note: in definition of macro 'LCIN' 37 | CIN(__VA_ARGS__) ...
s584457208
p03707
C++
#include<bits/stdc++.h> using namespace std; const int N=2010; int sump[N][N],sume1[N][N],sume2[N][N]; bool mp[N][N]; int main() { static char s[N]; int n,m,q;cin>>n>>m>>q; for(int i=1;i<=n;i++) { scanf("%s",s+1); for(int j=1;j<=m;j++) mp[i][j]=(s[j]=='1'); } for(in...
a.cc: In function 'int main()': a.cc:33:10: error: no matching function for call to 'flush()' 33 | flush(); | ~~~~~^~ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /...
s179533081
p03707
C++
#include <stdio.h> #include <assert.h> #include <fstream> #include <iostream> #include <algorithm> #include <array> #include <vector> #include <queue> #include <set> #include <cmath> #include <unordered_map> //#include <unordered_set> //#include <boost/container/static_vector.hpp> //#include <boost/unordered_set.hpp> /...
a.cc:30:24: error: 'int y1 [200000]' redeclared as different kind of entity 30 | int x1[MAX_Q], y1[MAX_Q], x2[MAX_Q], y2[MAX_Q]; | ^ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33, from /...
s956649600
p03707
C++
//#include "pch.h" #include <stdio.h> #include <math.h> #include <string.h> #include <stdlib.h> #include <vector> #include <set> #include <map> #include <iostream> #include <utility> #include <queue> #include <algorithm> #include <functional> #include <string> #include <bitset> #define ll long long #define fri(n) for...
a.cc: In function 'int main()': a.cc:78:25: error: 'sint' was not declared in this scope; did you mean 'uint'? 78 | sint[i][j]=s[j]-'0'; | ^~~~ | uint
s557811512
p03707
C++
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #include <queue> #include <stack> #include <map> #include <set> #include <vector> #include <iomanip> #define ALL(x) (x).begin(), (x).end() #define dll(x) scanf("%I64d",&x) #define xll(x) printf("%I64d\n",x) #define sz(a) int(...
a.cc:49:11: error: 'int y1' redeclared as different kind of entity 49 | int x1,x2,y1,y2; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h...
s050506775
p03707
C++
#include <bits/stdc++.h> #define FI first #define SE second #define PB push_back #define ll long long #define FOR(i,a,b) for(int i=a;i<b;i++) #define ROF(i,a,b) for(int i=b-1;i>=a;i--) #define YES(i) cout<<(i?"YES":"NO")<<endl #define Yes(i) cout<<(i?"Yes":"No")<<endl #define co(i) cout<<(i)<<endl #define fcout cout<<f...
a.cc: In function 'int main()': a.cc:59:9: error: expected primary-expression before '}' token 59 | } | ^
s300125816
p03707
C++
#include<bits/stdc++.h> using namespace std; namespace whatever{ int readu(){ char ch=getchar(); while(!isdigit(ch)) ch=getchar(); int value=ch-'0'; ch=getchar(); while(isdigit(ch)){ value=value*10+ch-'0'; ch=getchar(); } return value; } void writeu(int n){ if(n<10) putchar(n+'0'); else...
a.cc: In function 'void whatever::run()': a.cc:30:25: error: 'gets' was not declared in this scope; did you mean 'getw'? 30 | gets(s[i]+1); | ^~~~ | getw
s271569188
p03707
C++
#include<bits/stdc++.h> using namespace std; namespace whatever{ int readu(){ char ch=getchar(); while(!isdigit(ch)) ch=getchar(); int value=ch-'0'; ch=getchar(); while(isdigit(ch)){ value=value*10+ch-'0'; ch=getchar(); } return value; } void writeu(int n){ if(n<10) putchar(n+'0'); else...
a.cc: In function 'void whatever::run()': a.cc:30:25: error: 'gets' was not declared in this scope; did you mean 'getw'? 30 | gets(s[i]+1); | ^~~~ | getw
s987939641
p03707
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,a,n) for (int i=a;i<n;i++) #define per(i,a,n) for (int i=n-1;i>=a;i--) #define pb push_back #define mp make_pair #define all(x) (x).begin(),(x).end() #define fi first #define se second #define SZ(x) ((int)(x).size()) typedef vector<int> VI; typedef long long l...
a.cc: In function 'int main()': a.cc:70:16: error: invalid types 'int[int]' for array subscript 70 | ans = tyo[q[2]][q[3]] - tyo[q[2]][q[1]-1] - tyo[q[0]-1][q[3]] + tyo[q[0]-1][q[1]-1]; | ^ a.cc:70:22: error: invalid types 'int[int]' for array subscript 70 | ans = tyo[q[2]][q[3]] - ty...
s158130792
p03707
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,a,n) for (int i=a;i<n;i++) #define per(i,a,n) for (int i=n-1;i>=a;i--) #define pb push_back #define mp make_pair #define all(x) (x).begin(),(x).end() #define fi first #define se second #define SZ(x) ((int)(x).size()) typedef vector<int> VI; typedef long long l...
a.cc: In function 'int main()': a.cc:26:21: error: storage size of 'ch' isn't constant 26 | static char ch[n][m]; | ^~ a.cc:33:14: error: storage size of 'tyo' isn't constant 33 | static int tyo[n+1][m+1] = {}; | ^~~ a.cc:42:14: error: storage size of 'hen' i...
s544042299
p03707
C++
#include<bits/stdc++.h> using namespace std; const int N=2010; int sump[N][N],sume1[N][N],sume2[N][N]; bool mp[N][N]; int main() { static char s[N]; int n,m,q;cin>>n>>m>>q; for(int i=1;i<=n;i++) { scanf("%s",s+1); for(int j=1;j<=m;j++) mp[i][j]=(s[j]=='1'); } for(in...
a.cc: In function 'int main()': a.cc:33:10: error: no matching function for call to 'flush()' 33 | flush(); | ~~~~~^~ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /...
s962385045
p03707
C++
package main import ( "bufio" "fmt" "io/ioutil" "os" ) const MAXN=2000 const MAXQ=200000 type IOTp struct { iBuffer []byte iPos int } func (this *IOTp) GetChar() byte { res:=this.iBuffer[this.iPos] this.iPos++ return res } func (this *IOTp) ReadInt() int { res:=0 k:=1 for ch:=this.iBuffer[this.iPos]; !(ch...
a.cc:1:1: error: 'package' does not name a type 1 | package main | ^~~~~~~ a.cc:16:6: error: expected constructor, destructor, or type conversion before '(' token 16 | func (this *IOTp) GetChar() byte { | ^ a.cc:21:6: error: expected constructor, destructor, or type conversion before '(' token ...
s647211612
p03707
C++
#include<bits/stdc++.h> using namespace std; int n,m,q; int f[2001][2001],h[2001][2001],g[2001][2001]; char s[N][N]; int main() { cin>>n>>m>>q for(int i=1; i<=n; i++) cin>>s[i]+1; fill(f,f+n+1,0); fiil(h,h+m+1,0); for(int i=1; i<=n; i++) { for(int j=1; j<=m; j++) { ...
a.cc:5:8: error: 'N' was not declared in this scope 5 | char s[N][N]; | ^ a.cc:5:11: error: 'N' was not declared in this scope 5 | char s[N][N]; | ^ a.cc: In function 'int main()': a.cc:8:17: error: expected ';' before 'for' 8 | cin>>n>>m>>q | ^ |...
s332384144
p03707
C++
/************************************************* ************************************************* ************************************************* *** _________________ | | | /*** *** | | | | / *** *** | | | | / *** *** |...
a.cc:159:62: error: 'int y1' redeclared as different kind of entity 159 | int n,m,q,cnt[maxn][maxn],ed1[maxn][maxn],ed2[maxn][maxn],x1,y1,x2,y2; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gn...
s576303018
p03707
C++
#include <cstdio> #define N 2005 #define rep(i,a,b) for(int i=a;i<b;i++) using namespace std; int n,m,Q; char mp[N][N]; int l[N][N]; int u[N][N]; int dp[N][N]; void Init() { scanf("%d %d %d\n",&n,&m,&Q); rep(i,1,n+1) { gets(mp[i]+1); } rep(i,1,n+1) { rep(j,1,m+1) { dp[i][j]=dp[i-1][j]+dp[i][j-1]-dp[i-1][...
a.cc: In function 'void Init()': a.cc:15:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 15 | gets(mp[i]+1); | ^~~~ | getw
s228239767
p03707
C++
#include <iostream> #include <string> #include <cstdio> #include <vector> #include <queue> #include <list> #include <cstdlib> #include <algorithm> #include <set> #include <map> #include <deque> #include <cstring> #include <cmath> //#include<bits/stdc++.h> using namespace std; const int dx[]={1,0,-1,0}; const int dy[]=...
a.cc:21:17: error: 'int y1' redeclared as different kind of entity 21 | int n,m,q,x1,x2,y1,y2; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, from /usr/include/x86_64-linux-gnu/c++/14/bits...
s164539994
p03707
C++
#include <bits/stdc++.h> using namespace std; #define x first #define y second #define dbg(x) cout << #x << '=' << x << '\n'; #define ll long long #define pi pair<int,int> #define pl pair<long long,long long> #define lg length() #define pb push_back ifstream in("file.in"); ofstream out("file.out"); #define MAXN 100005 ...
a.cc:17:65: error: 'int y1' redeclared as different kind of entity 17 | int n,m,dp1[2005][2005],dp2[2005][2005],dp3[2005][2005],q,x1,x2,y1,y2; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-...
s211024713
p03707
C++
5 5 6 11010 01110 10101 11101 01010 1 1 5 5 1 2 4 5 2 3 3 4 3 3 3 3 3 1 3 5 1 1 3 4
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 5 5 6 | ^
s848312287
p03707
C++
#include <bits/stdc++.h> using namespace std; #define N 2001 int n, m, sum[N][N], ngang[N][N], doc[N][N], Q; int x1, y1, x2, y2; char a[N][N]; // Tinh số thành pahanf liên thông của HCN giới hạn bởi 4 đường x1 y1 x2 y2; // Theo đề bài : Graph các đỉnh xanh LÀ 1 CÂY // =>> Số thành phần liên thông của cây : = số đình ...
a.cc:6:9: error: 'int y1' redeclared as different kind of entity 6 | int x1, y1, x2, y2; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:...
s454044687
p03707
C++
#include <bits/stdc++.h> using namespace std; #define N 2001 vector <int> e[N]; int n, m, sum[N][N], ngang[N][N], doc[N][N], Q; int x1, y1, x2, y2; char a[N][N]; /// Tinh số thành pahanf liên thông của HCN giới hạn bởi 4 đường x1 y1 x2 y2; /// Theo đề bài : Graph các đỉnh xanh LÀ 1 CÂY /// =>> Số thành phần liên thôn...
a.cc:7:9: error: 'int y1' redeclared as different kind of entity 7 | int x1, y1, x2, y2; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:...
s472348236
p03707
C++
#include <cstdio> #include <algorithm> using namespace std; int N,M,Q; char A[2001][2001]; int sm[2000][2000]; int smLeft[2000][2000]; int smUp[2000][2000]; void psum(int v[2000][2000]) { for(int i=0;i<N;i++) for(int j=0;j<M;j++) { if(i) v[i][j] += v[i-1][j]; if(j) v[i][j] += v[i][j-1]; if(i && j) v[i][...
a.cc: In function 'int main()': a.cc:50:17: error: 'cout' was not declared in this scope 50 | cout << ans << '\n'; | ^~~~ a.cc:3:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include <algorithm> +++ |+...
s693976439
p03707
C++
123
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 123 | ^~~
s937802550
p03707
C++
#include <bits/stdc++.h> #define mem(a,b) memset(a,b,sizeof(a)) using namespace std; int n, m, Q; bool vis[2002][2002]; int G[2002][2002]; int g[2002][2002]; int x1,x2,y1,y2; int cnt; void dfs(int i, int j){ if(vis[i][j] || G[i][j] == 0) return; if(i<x1||i>x2||j<y1||j>y2) return; vis[i][j] = true; dfs(i...
a.cc:8:11: error: 'int y1' redeclared as different kind of entity 8 | int x1,x2,y1,y2; | ^~ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:...
s641742144
p03707
C++
import sys import numpy as np import copy n, m, q = [int(x) for x in sys.stdin.readline().split()] def lister(n): s = [] for _ in range(n): a = input() s.append(list(map(int, a))) return s def normal_accumulator(s): for i in s: for j,k in enumerate(i): if j != 0: i[j] = k + i[j-1] for i in range(m)...
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s619068163
p03707
C++
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define mp make_pair #define pb push_back #define eb emplace_back #define gc getchar typedef long long LL; typedef long double LD; typedef pair<int,int> pii; const int tb[]={0,1,0,-1}; const int tk[]={1,0,-1,0}; int petas[2][2005][2005]={}...
a.cc:55:1: error: ISO C++ forbids declaration of 'isiprefikslain' with no type [-fpermissive] 55 | isiprefikslain(int jenis){ | ^~~~~~~~~~~~~~ a.cc: In function 'int isiprefikslain(int)': a.cc:78:1: warning: no return statement in function returning non-void [-Wreturn-type] 78 | } | ^
s357211607
p03707
C++
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define mp make_pair #define pb push_back #define eb emplace_back #define gc getchar typedef long long LL; typedef long double LD; typedef pair<int,int> pii; const int tb[]={0,1,0,-1}; const int tk[]={1,0,-1,0}; int petas[2][2005][2005]={}...
a.cc:55:1: error: ISO C++ forbids declaration of 'isiprefikslain' with no type [-fpermissive] 55 | isiprefikslain(int jenis){ | ^~~~~~~~~~~~~~ a.cc: In function 'int isiprefikslain(int)': a.cc:78:1: warning: no return statement in function returning non-void [-Wreturn-type] 78 | } | ^
s038698251
p03707
C++
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define mp make_pair #define pb push_back #define eb emplace_back #define gc getchar typedef long long LL; typedef long double LD; typedef pair<int,int> pii; const int tb[]={0,1,0,-1}; const int tk[]={1,0,-1,0}; int petas[2][2005][2005]={}...
a.cc:55:1: error: ISO C++ forbids declaration of 'isiprefikslain' with no type [-fpermissive] 55 | isiprefikslain(int jenis){ | ^~~~~~~~~~~~~~ a.cc: In function 'int isiprefikslain(int)': a.cc:78:1: warning: no return statement in function returning non-void [-Wreturn-type] 78 | } | ^
s773670863
p03707
C++
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define mp make_pair #define pb push_back #define eb emplace_back #define gc getchar typedef long long LL; typedef long double LD; typedef pair<int,int> pii; const int tb[]={0,1,0,-1}; const int tk[]={1,0,-1,0}; int petas[2][2005][2005]={}...
a.cc:55:1: error: ISO C++ forbids declaration of 'isiprefikslain' with no type [-fpermissive] 55 | isiprefikslain(int jenis){ | ^~~~~~~~~~~~~~ a.cc: In function 'int isiprefikslain(int)': a.cc:78:1: warning: no return statement in function returning non-void [-Wreturn-type] 78 | } | ^ a.cc: At global ...
s736353247
p03707
C++
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define mp make_pair #define pb push_back #define eb emplace_back #define gc getchar typedef long long LL; typedef long double LD; typedef pair<int,int> pii; const int tb[]={0,1,0,-1}; const int tk[]={1,0,-1,0}; int petas[2][2005][2005]={}...
a.cc:55:1: error: ISO C++ forbids declaration of 'isiprefikslain' with no type [-fpermissive] 55 | isiprefikslain(int jenis){ | ^~~~~~~~~~~~~~ a.cc: In function 'int isiprefikslain(int)': a.cc:78:1: warning: no return statement in function returning non-void [-Wreturn-type] 78 | } | ^ a.cc: At global ...
s197442570
p03707
C++
#define _CRT_SECURE_NO_WARNINGS #include <cstdio> #include <vector> using namespace std; int check(int x, int y, const vector< vector<int> > &v) { if (x < 0 || y < 0) return 0; else return v[x][y]; } int main() { int N, M, Q; if (scanf("%d%d%d", &N, &M, &Q) < 3) return 0; vector<string> S(2000);...
a.cc: In function 'int main()': a.cc:18:12: error: 'string' was not declared in this scope 18 | vector<string> S(2000); | ^~~~~~ a.cc:4:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' 3 | #include <vector> +++ |+#include <strin...
s372701262
p03707
C++
#include <bits/stdc++.h> using namespace std; typedef long long signed int LL; typedef long long unsigned int LU; #define incID(i, l, r) for(int i = (l) ; i < (r); i++) #define incII(i, l, r) for(int i = (l) ; i <= (r); i++) #define decID(i, l, r) for(int i = (r) - 1; i >= (l); i--) #define decII(i, l, r) fo...
a.cc:42:35: error: 'int y1 [200000]' redeclared as different kind of entity 42 | int n, m, q, x1[200000], y1[200000], x2[200000], y2[200000]; | ^ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,...
s709864072
p03707
C++
#include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #include <vector> #include <queue> #include <set> using namespace std; //#define ZTDebug //#define ZTVerbose //#define ZTRandomTest #ifdef ZTDebug #define In scanf_s #else #define In scanf #endif // ZTDebug #define Ind(d) In("%d", &d) #def...
a.cc:71:5: error: expected unqualified-id before 'return' 71 | return 0; | ^~~~~~ a.cc:72:1: error: expected declaration before '}' token 72 | } | ^
s319621232
p03707
C++
#include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #include <vector> #include <queue> #include <set> using namespace std; #define ZTDebug //#define ZTVerbose //#define ZTRandomTest #ifdef ZTDebug #define In scanf_s #else #define In scanf #endif // ZTDebug #define Ind(d) In("%d", &d) #defin...
a.cc: In function 'int main()': a.cc:15:12: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 15 | #define In scanf_s | ^~~~~~~ a.cc:23:30: note: in expansion of macro 'In' 23 | #define InD2(a, b) int a, b; In("%d%d", &a, &b); | ^~ a.cc:52:9...
s087776838
p03707
C++
/****************************************** * AUTHOR: CHIRAG AGARWAL * * INSTITUITION: BITS PILANI, PILANI * ******************************************/ #include <bits/stdc++.h> using namespace std; typedef long long LL; typedef long double LD; const int MAX=2003; int arr[MAX][MAX]; int cnt[M...
a.cc: In function 'int main()': a.cc:121:40: error: expected ';' before 'p' 121 | p+=eval(x1,y2,x1,y2,14) | ^ | ; 122 | p+=eval(x1,y2,x1,y2,15); | ~
s749908908
p03707
C++
3 4 4 1101 0110 1101 1 1 3 4 1 1 3 1 2 2 3 4 1 2 2 4
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 4 4 | ^
s211671958
p03707
C++
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include ...
a.cc: In function 'int mapping(int, int, int, int)': a.cc:67:18: error: 'id' was not declared in this scope; did you mean 'i'? 67 | MP[i][j] = id; | ^~ | i
s644562399
p03707
C++
#include<cstdio> #include<cstring> #define N 2005 using namespace std; char s[233]; int n,m,q; int c[N][N]; int hl[N][N],zl[N][N]; int pre[N][N],pred[N][N]; int xx[4]={-1,0,1,0},yy[4]={0,-1,0,1}; void prework(){ for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) pre[i][j]=pre[i-1][j]+pre[i][j-1]-pre[i-1][j-1]+c[i][j]; ...
a.cc: In function 'int main()': a.cc:45:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 45 | gets(s); | ^~~~ | getw
s305155128
p03707
C++
#include<bits/stdc++.h> #define N 2005 using namespace std; char s[233]; int n,m,q; int c[N][N]; int hl[N][N],zl[N][N]; int pre[N][N],pred[N][N]; int xx[4]={-1,0,1,0},yy[4]={0,-1,0,1}; void prework(){ for(int i=1;i<=n;i++) for(int j=1;j<=m;j++) pre[i][j]=pre[i-1][j]+pre[i][j-1]-pre[i-1][j-1]+c[i][j]; for(int i=1...
a.cc: In function 'int main()': a.cc:44:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 44 | gets(s); | ^~~~ | getw
s633329839
p03708
C++
//Be Name Khoda, Besmellah Rahmane Rahim, In The Name Of God; //#include<bits/stdc++.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: In function 'int main()': a.cc:59:15: error: no matching function for call to 'max(int, long long int)' 59 | ans += max(0, b - a + 1); | ~~~^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s257772969
p03708
C++
//Be Name Khoda, Besmellah Rahmane Rahim, In The Name Of God; //#include<bits/stdc++.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: In function 'int main()': a.cc:39:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 39 | return; | ^~~~~~ a.cc:59:15: error: no matching function for call to 'max(long long int, int)' 59 | ans += max(0ll, b - a + 1); | ~~~^~~~~~~~...
s404461870
p03708
C
#include<bits/stdc++.h> using namespace std; #define int long long #define il inline il int read() { int re=0,k=1;char ch=getchar(); while(ch>'9'||ch<'0'){if(ch=='-')k=-1;ch=getchar();} while(ch<='9'&&ch>='0'){re=re*10+ch-48;ch=getchar();} return re*k; } il void write(int x) { if(x<0)return putchar('-'),write(-x),...
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s700862186
p03708
C++
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define mp make_pair #define pb push_back #define eb emplace_back typedef long long ll; typedef pair<int, int> pi; ll A, B; ll solve(ll L, ll R){ if(L == R){ return 1; } for(int i = 60;i >= 0;i--){ ll C = (1...
a.cc: In function 'int main()': a.cc:56:50: error: 'a' was not declared in this scope 56 | cout << mid - A + c + mid * 2 - max(mid + c, a | mid) << endl; | ^
s656408804
p03708
C++
#include<bits/stdc++.h> using namespace std; inline int read(){ register int x=0,f=1;register char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();} while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();} return x*f; } inline void write(int x){ if(x<0)x=-x,putchar('-'); if(x>9)write(x/10); pu...
a.cc: In function 'int read()': a.cc:4:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 4 | register int x=0,f=1;register char ch=getchar(); | ^ a.cc:4:26: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 4 ...
s356522152
p03708
C++
#include <iostream> using namespace std; long long a, b; int main() { scanf("%ll%ll", &a, &b); printf(a+1); return 0; }
a.cc: In function 'int main()': a.cc:8:17: error: invalid conversion from 'long long int' to 'const char*' [-fpermissive] 8 | printf(a+1); | ~^~ | | | long long int In file included from /usr/include/c++/14/cstdio:42, from /us...
s145355690
p03708
C++
#include <bits/stdc++.h> // #include <boost/multiprecision/cpp_int.hpp> #define int long long #define inf 1000000007 #define pa pair<int,int> #define ll long long #define pal pair<double,double> #define ppap pair<pa,int> #define PI 3.14159265358979323846 #define paa pair<int,char> #define mp make_...
a.cc: In function 'long long int solve()': a.cc:188:17: error: 'ans' was not declared in this scope; did you mean 'abs'? 188 | return ans=e(z1)+e(z2)-e(intr(z1,z2)); | ^~~ | abs
s002973429
p03708
C++
#include <stdio.h> #include <math.h> #include <algorithm> long long a, b; int main() { scanf("%lld%lld", &a, &b); if (a == b)return !puts("1"); int _ = 60; while (~(-- _)) if ((a & (1ll << _)) ^ (b & (1ll << _))) { a &= (1ll << (_ + 1)) - 1, b &= (1ll << (_ + 1)) - 1; ...
a.cc: In function 'int main()': a.cc:15:35: error: expected ';' before ')' token 15 | __ = !__? 1ll: __ << 1); | ^ | ;
s891147601
p03708
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.ArrayList; import java.util.InputMismatchException; import java.util.Iterator; import java.util.LinkedList; import java.util.Map; import java.util.Queue; ...
Main.java:20: error: class Solution is public, should be declared in a file named Solution.java public class Solution implements Runnable ^ 1 error
s277496757
p03708
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.ArrayList; import java.util.InputMismatchException; import java.util.Iterator; import java.util.LinkedList; import java.util.Map; import java.util.Queue; ...
Main.java:20: error: class Solution is public, should be declared in a file named Solution.java public class Solution implements Runnable ^ 1 error
s994436626
p03708
C++
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native") #pragma GCC optimize("unroll-all-loops") #include <cstdio> #include <cstring> #include <algorithm> using namespace std; typedef long long int LL; namespace io { const int SIZE = (1 << 21) + 1; char ibuf[SIZE], *...
a.cc: In function 'int main()': a.cc:73:22: error: 'k' was not declared in this scope 73 | for (k = 59LL;k >= 0LL;--k) | ^ a.cc:86:37: error: 'k' was not declared in this scope 86 | if ((1LL << k) + (1LL << p) <= R) | ...
s019461899
p03708
C++
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native") #pragma GCC optimize("unroll-all-loops") #include <cstdio> #include <cstring> #include <algorithm> using namespace std; typedef long long int LL; namespace io { const int SIZE = (1 << 21) + 1; char ibuf[SIZE], *...
a.cc: In function 'int main()': a.cc:70:39: error: 'MOD' was not declared in this scope 70 | Ans = (R - L + 1LL) % MOD; | ^~~ a.cc:73:22: error: 'k' was not declared in this scope 73 | for (k = 59LL;k >= 0LL;--k) | ...
s564158965
p03708
C++
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native") #pragma GCC optimize("unroll-all-loops") #include <cstdio> #include <cstring> #include <algorithm> using namespace std; typedef long long int LL; namespace io { const int SIZE = (1 << 21) + 1; char ibuf[SIZE], *...
a.cc: In function 'int main()': a.cc:68:12: error: 'L' was not declared in this scope 68 | gi(L), gi(R); | ^ a.cc:68:19: error: 'R' was not declared in this scope 68 | gi(L), gi(R); | ^ a.cc:70:39: error: 'MOD' was not declared in this scope 70 | ...
s541531898
p03708
C++
/** SXR0aXAkI0JwbXptI3FhI3Z3I293bCNqY2IjUG0jMCNicG0jVHFkcXZvLyNCcG0jQW10bjBhY2phcWFicXZvLyNNYm16dml0MSNWdyNhdGN1am16I2tpdiNhbXF9bSNQcXUjVnd6I0F0bW14MSNQcWEjaXptI2l0dCNicHF2b2EjUXYjYnBtI3BtaWRtdmEjaXZsI3d2I21pemJwMSNFcHcjcWEjYnBtem0ja2l2I3F2Ym16a21sbSNRdiNQcWEjeHptYW12a20jbXtrbXhiI0lhI3BtI3htenVxYmJtYnBHI1BtI3N2d2VtYnAj...
a.cc:35:13: error: '__int64' does not name a type; did you mean '__int64_t'? 35 | #define int __int64 | ^~~~~~~ a.cc:66:1: note: in expansion of macro 'int' 66 | int G(int x, ll l) { | ^~~ a.cc:70:2: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 70 | main(...
s709467219
p03708
C++
#include <bits/stdc++.h> #define ll long long using namespace std; ll a,b; int main() { // freopen("in.txt","r",stdin); ios_base::sync_with_stdio(0); cin.tie(0); cin>>a>>b; while (true) { if (a==0 && b==0) { cout<<1<<endl; return 0; } int a2 = __lg(a); ...
a.cc: In function 'int main()': a.cc:34:15: error: 'l3' was not declared in this scope; did you mean 'l2'? 34 | if (l1 >= l3) cout<<(l2-l1+1) + (l2-l1+1) + l3 + 1<<endl; | ^~ | l2
s292955873
p03708
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long a,b,ans=0,now=1,man=1; while(now<=a){ now*=2; } if(now>b){ cout<<now/2-1<<endl; }else{ ans+=now-a; ans+=now*2-(now+a); while(nn*2+now<=b){ nn*=2; } if(nn+now>b){ ans+=b-now+1; }else{ ans+=nn*2;...
a.cc: In function 'int main()': a.cc:13:11: error: 'nn' was not declared in this scope; did you mean 'yn'? 13 | while(nn*2+now<=b){ | ^~ | yn a.cc:16:8: error: 'nn' was not declared in this scope; did you mean 'yn'? 16 | if(nn+now>b){ | ^~ | yn
s249270888
p03708
C++
#include <stdint.h> #include <stdio.h> uint64_t f(uint64_t A, uint64_t B, uint64_t bit) { uint64_t Blen = 1; for (uint64_t x = 1; x < bit; x *= 2, ++Blen); uint64_t bb = bit / 2; for (; bb && !(B & bb); bb /= 2); uint64_t bblen = 1; for (uint64_t x = 1; x < bb; x *= 2, ++bblen); if (bblen...
a.cc: In function 'uint64_t f(uint64_t, uint64_t, uint64_t)': a.cc:16:25: error: 'max' is not a member of 'std' 16 | uint64_t Alo = std::max(A, uint64_t(1) << bblen); | ^~~
s191846161
p03708
C++
#include<bits/stdc++.h> #define L long long using namespace std; L l,r; inline L calc(int i,L l,L r,bool t) { if(l==-1 && r==-1) return 0; if(t && r==-1) return 0; if(i==-1) return 1; if(r==-1) { if(l==-1) return 0; if(l==0) return 1; //int k; //for(k=i;!(l&(1ll<<k));k--); ...
a.cc: In function 'long long int calc(int, long long int, long long int, bool)': a.cc:21:13: error: expected ';' before 'return' 21 | r//eturn (1ll<<k+1); | ^ | ; 22 | return 0; | ~~~~~~
s562087017
p03708
C++
#include <iostream> #define int long long using namespace std; int keta(int n){ int ret = 0; while(n){ ret++; n /= 2; } return ret; } int calc(int a,int b){ if(!a && !b) return 1; if(keta(a) == keta(b)) return calc(a - (1ll << (keta(a) - 1)),b - (1ll << (keta(a) - 1))); else return min(calc(1ll << (keta(...
a.cc: In function 'long long int calc(long long int, long long int)': a.cc:17:24: error: no matching function for call to 'min(long long int)' 17 | else return min(calc(1ll << (keta(b) - 1),b) + 1ll << (keta(b) - 1) - a),1ll << (keta(b) - 1)) + 1ll << (keta(b) - 1) - a; | ~~~^~~~~~~...
s472875303
p03708
C++
#include <bits/stdc++.h> using namespace std; long long a, b; int main() { cin >> a >> b; if(a == b) cout << 1, exit(0); int r = 60; while((a >> r & 1) == (b >> r & 1)) --r; a &= (1ll << r+1)-1, b &= (1ll << r+1)-1; int k = r-1; while(k >= 0 && !(b >> k & 1)) --k; ans = (1ll << r+1) - a; if(1ll << k+1 < a) an...
a.cc: In function 'int main()': a.cc:13:9: error: 'ans' was not declared in this scope; did you mean 'abs'? 13 | ans = (1ll << r+1) - a; | ^~~ | abs
s666113584
p03708
C++
#include<bits/stdc++.h> using namespace std; long long a,b,t,w,ans; inline long long dis(const long long&l,const long long&r) { if(l>r) return 0ll; else return r-l+1; } int main(void) { scanf("%lld%lld",&a,&b); if(a==b) return 0*puts("1"); for(int i=63;~i;i--) if((b&(1<<i))&&!(a&(1<<i))) { t=(1<<i); ...
a.cc: In function 'int main()': a.cc:25:49: error: 'W' was not declared in this scope 25 | w=t+(1<<W+1)-1 | ^
s268777314
p03708
C++
#include <bits/stdc++.h> #define forn(i, s, f) for (int i = (s); i <= (f); ++i) #define for1(i, s, f) for (int i = (s); i >= (f); --i) #define pb push_back using namespace std; typedef long long ll; ll a, b, r, k = -1, ans; #define int long long int bit(ll x, int i) { return ((x >> i) & 1); } main() { ci...
a.cc:20:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 20 | main() | ^~~~ a.cc: In function 'int main()': a.cc:49:58: error: unable to find numeric literal operator 'operator""x' 49 | if (X.second < Y.first) ans += (X.second - X.first + 1x) + (Y.second - Y.first + 1); ...
s160930806
p03708
Java
import java.util.*; public class HelloWorld{ public static void main(String []args){ Scanner in = new Scanner(System.in); System.out.println(Long.highestOneBit(3)); } }
Main.java:3: error: class HelloWorld is public, should be declared in a file named HelloWorld.java public class HelloWorld{ ^ 1 error
s030503966
p03708
C++
#include "bits/stdc++.h" using namespace std; long long a , b; long long k; long long intersect(long long a , long long b , long long l , long long r){ return max(0LL , min(r , b) - max(l , a) + 1LL); } long long getor(long long l , long long r){ long long res = 0; for(int i = 0 ; i < 60 ; ++i){ if(...
a.cc: In function 'long long int getor(long long int, long long int)': a.cc:16:9: error: 'ans' was not declared in this scope; did you mean 'abs'? 16 | ans |= l; | ^~~ | abs
s005771693
p03708
C++
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; typedef long long ll; typedef vector<int> vi; #define pb push_back #define eb emplace_back #define mp make_pair #define fi first #define se second #define rep(i,n) rep2(i,0,n) #define rep2(i,m,n) for(int i=m;i<(n);i++) #define ALL(c) (c).begin(...
a.cc: In function 'int main()': a.cc:55:34: error: expected ')' before 'LL' 55 | com += ((ll)va[i]LL << i); | ~ ^~ | )
s935910408
p03708
C++
#include<iostream> #include <algorithm> #include <vector> #include <deque> #include <cmath> using namespace std; int main() { long long A,B,i,firstA,firstB,r,k; cin >> A >> B; bitset<60> bitA(A); bitset<60> bitB(B); cout << bitA << endl; cout << bitB << endl; r = -1; k= -1; for (i=5...
a.cc: In function 'int main()': a.cc:12:5: error: 'bitset' was not declared in this scope 12 | bitset<60> bitA(A); | ^~~~~~ a.cc:6:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>' 5 | #include <cmath> +++ |+#include <bitset> 6 | us...
s203265978
p03708
C++
1. #include <bits/stdc++.h> 2. #define forn(i, n) for(int i = 0; i < (int)(n); i++) 3. typedef long long ll; 4. typedef unsigned long long ull; 5. typedef long double ld; 6. using namespace std; 7.   8. ll get(ll x) { 9. for(int i = 60; i >= 0; i--) { 10. if((1LL << i) & x) 11. return i; 12. ...
a.cc:1:4: error: stray '#' in program 1 | 1. #include <bits/stdc++.h> | ^ a.cc:2:4: error: stray '#' in program 2 | 2. #define forn(i, n) for(int i = 0; i < (int)(n); i++) | ^ a.cc:7:4: error: extended character   is not valid in an identifier 7 | 7.   | ^ a.cc:14:5: error: extend...
s632856841
p03708
C++
#import<iostream> #define a(x) 1LL<<64-__builtin_clzll(x) long long A,B,C,i;main(){std::cin>>A>>B;if(A^B){C=(a(A^B))-1;A&=C;B&=C;i=++C>>1;B=(B-i)?(a(B-i))-1:0;C=C-A-(A>B)*(A-1-B);std::cout<<C;}elseputs("1");}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<iostream> | ^~~~~~ a.cc:3:19: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | long long A,B,C,i;main(){std::cin>>A>>B;if(A^B){C=(a(A^B))-1;A&=C;B&=C;i=++C>>1;B=(B-i)?(a(B-i))-1:0;C=C-A-(A>B...
s938793097
p03708
C++
sssssssssssss
a.cc:1:1: error: 'sssssssssssss' does not name a type 1 | sssssssssssss | ^~~~~~~~~~~~~
s448015950
p03708
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <numeric> #include <utility> #include <sys/time.h> #include <cmath> using namespace std; void solve(unsigned long long a, unsigned long long b) { unsigned long long tmp = b; int counter = 0; int counter2 = 0; while (...
a.cc: In function 'void solve(long long unsigned int, long long unsigned int)': a.cc:23:31: error: 'poe' was not declared in this scope; did you mean 'pow'? 23 | unsigned long long maxa = poe(2, counter); | ^~~ | pow a.cc: In function 'int m...
s918607953
p03708
Java
import java.util.*; public class sample { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = Integer.parseInt(sc.next()); int b = Integer.parseInt(sc.next()); int res; if(b >= a){ res = b -a; res = res + res /2; system.out.print(res); } } }
Main.java:2: error: class sample is public, should be declared in a file named sample.java public class sample { ^ Main.java:14: error: package system does not exist system.out.print(res); ^ 2 errors
s642585059
p03708
Java
import java.util.*; public class sample { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = Integer.parseInt(sc.next()); int b = Integer.parseInt(sc.next()); int res if(b >= a){ res = b -a; res = res + res /2; system.out.print(res); } } }
Main.java:9: error: ';' expected int res ^ 1 error
s804592078
p03708
Java
import java.util.*; public class sample { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = Integer.parseInt(sc.next()); int b = Integer.parseInt(sc.next()); int res if(b >= a){ res = b -a; res = res + res /2; system.out.print(res); } } }
Main.java:9: error: ';' expected int res ^ 1 error
s647244078
p03709
C++
//W4P3R #include<bits/stdc++.h> #define inf 1e9 #define eps 1e-6 #define re register int #define FOR(i,a,b) for(re i=a;i<=b;i++) #define REP(i,a,b) for(re i=a;i>=b;i--) #define mp make_pair #define pb push_back #define pf push_front #define pa pair<int,int> #define fr first #define sd second #define Z(x) (x>=mod?x-mod...
a.cc: In function 'int askr(int, int, int, int, int)': a.cc:53:38: error: too few arguments to function 'int askr(int, int, int, int, int)' 53 | if(l==r){return l;}int t=askr(mid+1,r,rs,val); | ~~~~^~~~~~~~~~~~~~~~ a.cc:50:5: note: declared here 50 | int askr(int l,i...
s583309884
p03709
C++
#include <cstdio> #include <cstring> #include <cctype> #include <algorithm> #include <vector> using namespace std; inline int read(int f = 1, int x = 0, char ch = ' ') { while(!isdigit(ch = getchar())) if(ch == '-') f = -1; while(isdigit(ch)) x = x*10+ch-'0', ch = getchar(); return f*x; } const int N = 2e5...
a.cc:42:2: error: expected unqualified-id before '-' token 42 | }- | ^
s786857179
p03709
C++
#include<bits/stdc++.h> using namespace std; #define MOD (1000000007) const int N=5e5+10; int h[N], l[N], r[N]; vector<int> L[N]; int x[N], v[N], a[N]; bool cmp(const int &a, const int &b) { return v[a]<v[b]; } int f[N], S[N]; int main() { ios::sync_with_stdio(false), cin.tie(0); int n, m; cin>>n; fo...
a.cc: In function 'int main()': a.cc:28:10: error: invalid types 'int[int]' for array subscript 28 | l[i]=p[r]; | ^ a.cc:39:10: error: invalid types 'int[int]' for array subscript 39 | r[i]=p[r]; | ^
s923024414
p03709
C++
#include <iostream> #include <cstring> #include <algorithm> #include <cstdio> #define pr pair<int,int> using namespace std; const int mod = 1e9+7; const int maxn = 200010; int n = 0; pr p[maxn]; int X[maxn], V[maxn]; int fa[maxn]; int getroot(int u) { return fa[u] == u ? u : (fa[u]=getroot(fa[u])); } void Uni...
a.cc: In function 'void solve(int, int)': a.cc:43:53: error: 'v' was not declared in this scope 43 | for (int i = m+1; i <= r; i++) mn_R = min(mn_R, v[i]); | ^ a.cc: In function 'int qpow(int, int)': a.cc:57:1: warning: no return statement in function ret...
s084243163
p03709
C++
#include <cstdio> #include <cstring> #include <algorithm> #include <cstdlib> using namespace std; #define N 200050 #define mod 1000000007 ll f[N],s[N]; int n,V[N],L[N],R[N]; struct A { int x,v; bool operator < (const A &p) const {return x<p.x;} }a[N]; int main() { scanf("%d",&n); int i,k=1; for(i=1;i<=n;i++) scanf...
a.cc:8:1: error: 'll' does not name a type 8 | ll f[N],s[N]; | ^~ a.cc: In function 'int main()': a.cc:23:13: error: 'f' was not declared in this scope 23 | for(f[0]=s[0]=1,i=1;i<=n;i++) { | ^ a.cc:23:18: error: 's' was not declared in this scope 23 | for(f[0]=s[0]=1,i=...
s254848085
p03709
C++
#include <cstdio> #include <cstring> #include <algorithm> #include <cstdlib> using namespace std; #define N 200050 #define mod 1000000007 int n,f[N],V[N],L[N],R[N],s[N]; struct A { int x,v; bool operator < (const A &p) constt {x<p.x;} }a[N]; int main() { scanf("%d",&n); int i,k=1; s[0]=1; for(i=1;i<=n;i++) scanf("...
a.cc:11:36: error: expected ';' at end of member declaration 11 | bool operator < (const A &p) constt {x<p.x;} | ^ | ; a.cc:11:38: error: 'constt' does not name a type; did you mean 'const'? 11 | bool operator < (co...
s720183515
p03709
C++
#include <bits/stdc++.h> const int N=2e5+10,Mod=1e9+7; struct Node{ int k,x,l,r; bool operator < ( const Node &A ) const { return (r<A.r) || ( r==A.r && l<A.l); } }p[N]; bool cmpk( const Node &A , const Node &B ) { return A.k<B.k; } bool cmpx( const Node &A , const Node &B ) { return A.x<B.x; } int n,f[N],sum[N];...
a.cc: In function 'void Solve()': a.cc:23:17: error: 'Inf' was not declared in this scope; did you mean 'ynf'? 23 | int mx=-Inf; | ^~~ | ynf
s479289230
p03709
C++
#include<bits/stdc++.h> #define int long long #define out(x) cerr << #x << " = " << x << "\n" using namespace std; typedef long long ll; //by piano template<typename tp> inline void read(tp &x) { x = 0;char c = getchar();bool f = 0; for(; c < '0' || c > '9'; f |= (c == '-'), c = getchar()); for(; c >= '0' && c <=...
a.cc:36:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 36 | main() { | ^~~~ a.cc: In function 'int main()': a.cc:64:26: error: expected ';' before '}' token 64 | cout << Q(n) - Q(n - 1);1 | ^ | ; 65 | } | ...
s326382840
p03709
C++
#include <cstdio> #include <queue> #include <iostream> #include <algorithm> #define INT long long #define oo 987654321 #define MOD 1000000007 using namespace std; INT n, base, T[1<<19], ans, p[200020] = {1}; struct V{ INT x, v; } a[200020]; bool cmp(V a, V b) { return a.x < b.x; } bool cmp2(V a, V b) { return ...
a.cc: In function 'int main()': a.cc:43:21: error: 'pow' was not declared in this scope 43 | ans += (INT)pow(2, getSum(base+a[i].v, base*2-1)); | ^~~
s165308426
p03710
C++
#include <cstdio> #include <algorithm> #include <vector> #include <bits/stdc++.h> #define debug(...) fprintf(stderr, __VA_ARGS__) typedef long long ll; using namespace std; typedef std::pair<ll, ll> mp; #define fi first #define se second #define MOD 1000000007 inline ll read() { ll x = 0, f = 1; char ch = getchar(); ...
a.cc: In function 'int main()': a.cc:34:2: error: 'exellent' was not declared in this scope; did you mean 'excellent'? 34 | exellent[1].push_back(mp(1, 2)); | ^~~~~~~~ | excellent
s546801799
p03710
C++
#include<bits/stdc++.h> #define rep(i,n) for(int i=0;i<n;i++) #define lint long long using namespace std; int readint() { char c = getchar_unlocked(); int ans = 0; while ('0' <= c && c <= '9') { ans = ans * 10 + c - '0'; c = getchar_unlocked(); } return ans; } lint readlint() { char c = getchar_unlocked(); l...
a.cc: In function 'int main()': a.cc:45:34: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int' 45 | writeint(1);writeint(y==1?1:x==1?2:4); | ^ a.cc:24:20: note: initializing argument 1 of 'void writeint(int&)' 24...
s479735251
p03710
C++
#pragma GCC target("avx2") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #include<bits/stdc++.h> using namespace std; #define ll long long #define FOR(i,l,r) for(ll i=(l);i<(r);++i) #define REP(i,n) FOR(i,0,n) #define SZ(x) ((ll)(x).size()) #define pb push_back template<class T = ll> using V = vect...
a.cc: In function 'int main()': a.cc:60:5: error: declaration does not declare anything [-fpermissive] 60 | ios; | ^~~
s860947738
p03710
C++
10 1 1 2 2 5 1000000000000000000 7 3 1 334334334334334334 23847657 23458792534 111111111 111111111 7 7 4 19 9 10
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 10 | ^~
s478984349
p03710
C++
#include <iostream> #include <algorithm> #include <cstdio> #include <cstring> #include <queue> #include <vector> #include <bitset> #include <string> #include <cmath> #include <set> #include <map> #define Rep(i, x, y) for (int i = x; i <= y; i ++) #define Dwn(i, x, y) for (int i = x; i >= y; i --) #define RepE(i, x) for...
a.cc: In function 'void prework()': a.cc:40:52: error: cannot bind rvalue reference of type 'long long int&&' to lvalue of type 'll' {aka 'long long int'} 40 | p[k][++ s[k]] = mk(y, x); | ^ In file included from /usr/include/c++...
s693805866
p03710
C++
#include <cstdio> #include <algorithm> #include <cstring> #include <cmath> #include <iostream> #define For(i, j, k) for(int i = j; i <= k; i++) #define Forr(i, j, k) for(int i = j; i >= k; i--) #define x first #define y second #define mp make_pair #define pb push_back using namespace std; typedef long long LL; typed...
a.cc:24:1: error: 'vector' does not name a type 24 | vector<PII> P[N]; | ^~~~~~ a.cc: In function 'void init()': a.cc:35:9: error: 'P' was not declared in this scope 35 | P[0].pb(mp(0, 1)); | ^ a.cc: In function 'int main()': a.cc:76:29: error: 'P' was not declared in this scope 76 ...
s787791028
p03710
C++
#include <bits/stdc++.h> using namespace std; #define ll long long #define PA pair<ll,ll> const int mod = 1000000007; vector<PA >a[110]; ll f[110]; int Q; void init() { a[1].push_back(PA(1,1)); f[0]=f[1]=1; for(int i=2;i<=90;i++) f[i]=f[i-1]+f[i-2]; for(int i=2;i<90;i++) { a[i].push_back(PA(f[i-1],f[i])); a[...
a.cc: In function 'int main()': a.cc:47:25: error: cast from 'long long int*' to 'int' loses precision [-fpermissive] 47 | k=min(k,(int)upper_bound(f+1,f+90+1,y)-f-1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:47:55: error: invalid operands of types 'int' and 'long long int ...
s133045754
p03710
C++
#include <bits/stdc++.h> using namespace std; #define ll long long #define PA pair<ll,ll> const int mod = 1000000007; vector<PA >a[110]; ll f[110]; int Q; void init() { a[1].push_back(PA(1,1)); f[0]=f[1]=1; for(int i=2;i<=90;i++) f[i]=f[i-1]+f[i-2]; for(int i=2;i<90;i++) { a[i].push_back(PA(f[i-1],f[i])); a[...
a.cc: In function 'int main()': a.cc:47:22: error: no matching function for call to 'min(int&, long int)' 47 | k=min(k,upper_bound(f+1,f+90+1,y)-f-1); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/incl...