submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s163058759
p03815
C++
#include <iostream> #include <cstring> #include <math.h> using namespace std; int main() { long long x; cin >> x; if (x <= 6) { cout << 1; } if (x <= 11) { cout << 2; } if (x > 11) { if (x % 11 == 0) { cout << (long long)(x / 11 * 2); ...
a.cc: In function 'int main()': a.cc:26:29: error: overloaded function with no contextual type information 26 | remainder = x / 11 | ^~ a.cc:28:17: error: 'rest' was not declared in this scope 28 | if (rest > 6) | ^~~~ a.cc:30:47: err...
s193057463
p03815
C++
#include <bits/stdc++.h> using namespace std; #define YES cout << "YES" << endl; #define NO cout << "NO" << endl; #define Yes cout << "Yes" << endl; #define No cout << "No" << endl; #define INF INT_MAX #define MOD 1000000007 #define PI acos(-1) using ll = long long; using ull = unsigned long long; using Pii...
a.cc: In function 'int main(int, char**)': a.cc:31:9: error: 'X' was not declared in this scope 31 | if (X%11 != 0) { | ^
s442033383
p03815
C++
#include <iostream> #include <string> #include <algorithm> #include <cstdio> #include <vector> #include <queue> #include <stack> #include <set> #include <map> #include <numeric> #include <cmath> #include <cassert> using namespace std; typedef long long int ll; typedef pair<int,int> P; #define all(x) x.begin(),x.end(...
a.cc:34:23: warning: missing terminating ' character 34 | cout<<(x/11)*2'+res<<endl; | ^ a.cc:34:23: error: missing terminating ' character 34 | cout<<(x/11)*2'+res<<endl; | ^~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:34:23: error: expe...
s855214473
p03815
C++
> #include <algorithm> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <math.h> #include <iomanip> #include <stdio.h> #include <numeric> #include <cmath> #include <limits> #include <bitset> #include <iterator> #include <map> #include <queue> #include <set> using namespace std; int main() { lo...
a.cc:1:1: error: expected unqualified-id before '>' token 1 | > | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is...
s987515257
p03815
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; #define FOR(i,a,b) for(int i=a;i<=b;i++) #define FORD(i,a,b) for(int i=a;i>=b;i--) #define FORL(i,x) for(int i=head[x];i;i=nxt[i]) #define ALL(a) (a).begin(),(a).end() #define SZ(a) int((a).size()) #define EACH(i,c) for(typeof((c).begin()) i=(c).begin...
a.cc: In function 'int main()': a.cc:26:12: error: expected primary-expression before '%' token 26 | if(N<=6 %% N!=0) ++ans; | ^
s206694100
p03815
C++
#include <bits/stdc++.h> using namespace std; int main() { long long x , ans = 0 , amari = 0 ; cin >> x; ans += 2 * ( x / 11 ); amari = x % 11 if ( 0 < amari && amari <= 5) ans += 1 if (6 <= amari) ans += 2 cout << ans << endl; }
a.cc: In function 'int main()': a.cc:11:17: error: expected ';' before 'if' 11 | amari = x % 11 | ^ | ; 12 | 13 | if ( 0 < amari && amari <= 5) | ~~
s162073898
p03815
C++
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for(int i = 0;i < n;i++) #define FOR(i, m, n) for(int i = m;i < n;i++) #define ll long long const ll mod = 1e9+7; void sieve(size_t max, vector<bool> &isPrime){ isPrime[0] = false; isPrime[1] = false; for (size_t i = 2; i*i <= max; ++i) ...
a.cc: In function 'int main()': a.cc:24:15: error: expected primary-expression before '<' token 24 | if (x=<6){ cout << 1 << endl; return 0; } | ^
s931793764
p03815
Java
import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); BigInteger x = new BigInteger(sc.next()); boolean flag = true; BigInteger ans; int y = x.mod(new BigInteger("11")).intValue(); if(0 < y && y <= 6) { ...
Main.java:18: error: variable ans might not have been initialized System.out.println(ans.toString()); ^ 1 error
s867500372
p03815
C++
#include <bits/stdc++.h> using namespace std; int main() { int64_t x; cin>>x; int64_t a=(x-(x%11))/11; int64_t b=x%11; if(b==0){ cout<< 2*a; }a else if(b<=6){ cout<<2*a+1; } else{ cout << 2*(a+1); } }
a.cc: In function 'int main()': a.cc:11:5: error: expected ';' before 'else' 11 | }a | ^ | ; 12 | else if(b<=6){ | ~~~~ a.cc:15:3: error: 'else' without a previous 'if' 15 | else{ | ^~~~
s631020109
p03815
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for(ll i=0;i<n;i++) int main(void){ ll n;cin>>n; else if(n%11>0&&n%11<=6)cout<<n/11*2+1<<endl; else cout<<(n+10)/11*2; }
a.cc: In function 'int main()': a.cc:7:5: error: 'else' without a previous 'if' 7 | else if(n%11>0&&n%11<=6)cout<<n/11*2+1<<endl; | ^~~~
s667426401
p03815
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<n;i++) long long inf=(long long)1E17; #define i_7 (long long)(1E9+7) long mod(long a){ long long c=a%i_7; if(c>=0)return c; return c+i_7; } using namespace std; long long gcd(long long a, long long b){ if(a<b){ swap(a,b); } if(a%b==0){ re...
a.cc: In function 'int main()': a.cc:84:17: error: expected ';' before '}' token 84 | ans = time+2 | ^ | ; 85 | } | ~
s129587510
p03815
C++
#include<iostream> using namespace std; typedef long long int ll; typedef vector<pair<ll,ll> > Q; int main() { ll x,ans=0; cin>>x; ans+=(x/11)*2; if(x%11>=7) ans+=2; else if(x%11>=1) ans++; cout<<ans<<endl; }
a.cc:4:9: error: 'vector' does not name a type 4 | typedef vector<pair<ll,ll> > Q; | ^~~~~~
s672627862
p03815
C++
macro_rules! get { ($t:ty) => { { let mut line: String = String::new(); std::io::stdin().read_line(&mut line).unwrap(); line.trim().parse::<$t>().unwrap() } }; ($($t:ty),*) => { { let mut line: String = String::new()...
a.cc:20:12: error: too many decimal points in number 20 | (0..$n).map(|_| | ^~~~~ a.cc:25:12: error: too many decimal points in number 25 | (0..$n).map(|_| | ^~~~~ a.cc:39:12: error: too many decimal points in number 39 | (0..$n).map(|_| get!($t ;...
s602594620
p03815
C++
#include<iostream> #include<iomanip> #include<cstdio> #include<algorithm> #include<math.h> #include <string.h> using namespace std; int main(){ __int64 i,j,m,n,r,l; while(cin>>n){ __int64 sum=0,count=0; while(sum<n){ sum=sum+6; count++; if(sum<n){ sum=sum+5; count++; } } cout<<count<<endl;...
a.cc: In function 'int main()': a.cc:9:9: error: '__int64' was not declared in this scope; did you mean '__ynf64'? 9 | __int64 i,j,m,n,r,l; | ^~~~~~~ | __ynf64 a.cc:10:20: error: 'n' was not declared in this scope; did you mean 'yn'? 10 | while(cin>>n){ | ...
s721314629
p03815
C++
#include<iostream> #include<iomanip> #include<cstdio> #include<algorithm> #include<math.h> #include <string.h> using namespace std; int main(){ __int64 i,j,m,n,r,l; while(cin>>n){ __int64 sum=0,count=0; while(sum<n){ sum=sum+6; count++; if(sum<n){ sum=sum+5; count++; } } cout<<count<<endl;...
a.cc: In function 'int main()': a.cc:9:9: error: '__int64' was not declared in this scope; did you mean '__ynf64'? 9 | __int64 i,j,m,n,r,l; | ^~~~~~~ | __ynf64 a.cc:10:20: error: 'n' was not declared in this scope; did you mean 'yn'? 10 | while(cin>>n){ | ...
s574156971
p03815
C
#include<iostream> #include<vector> #include<algorithm> #include<string> #include<map> #include<math.h> #include<queue> #include<deque> #include<stack> #include<cstdio> #include<utility> #include<set> #include<list> #include<cmath> #include<stdio.h> #include<cstdio> using namespace std; using ll = long long; using pii ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s150454491
p03815
C
#include<iostream> #include<vector> #include<algorithm> #include<string> #include<map> #include<math.h> #include<queue> #include<deque> #include<stack> #include<cstdio> #include<utility> #include<set> #include<list> #include<cmath> #include<stdio.h> using namespace std; using ll = long long; using pii = pair<int, int>;...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s792093177
p03815
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 pb push_back #define mp make_pair #define all(x) begin(x), end(x) #define len(x) ((int)(x)...
a.cc: In function 'int main()': a.cc:45:22: error: expected ';' before 'else' 45 | a = 1 | ^ | ; 46 | else { | ~~~~
s098875798
p03815
C++
/* ---------- STL Libraries ---------- */ // IO library #include <cstdio> #include <fstream> #include <iomanip> #include <ios> #include <iostream> // algorithm library #include <algorithm> #include <cmath> #include <numeric> #include <random> // container library #include <array> #include <bitset> #include <deque> #...
a.cc: In function 'int main()': a.cc:144:9: error: 'else' without a previous 'if' 144 | else cout << c * 2 + 1 << endl; | ^~~~
s867009254
p03815
C++
#include<iostream> using namespace std; int main(){ long long x; cin >> x ; long long n; n=x/11; x%=11; if{ (x>6) cout << 2*n+2 << endl; }else if{ (x>0) cout << 2*n+1 << endl; }else { cout << n << endl; } }
a.cc: In function 'int main()': a.cc:9:7: error: expected '(' before '{' token 9 | if{ | ^ | ( a.cc:11:6: error: 'else' without a previous 'if' 11 | }else if{ | ^~~~ a.cc:11:13: error: expected '(' before '{' token 11 | }else if{ | ^ | ...
s069786046
p03815
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; int main() { int x,sum=6; cin>>x; if(x>=11) { sum+=x/11*2; if(sum-5>=x) sum-=1; cout<<sum; } else { if(x<=5) cout<<1; else cout<<2; return 0; } if(x%11<=6) cout<<sum+1; else cout<<sum+2 }
a.cc: In function 'int main()': a.cc:22:25: error: expected ';' before '}' token 22 | else cout<<sum+2 | ^ | ; 23 | } | ~
s702277631
p03815
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define all(x) (x).begin(),(x).end() inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;} typedef long long ll; int main(){ ll x, ans = 0; cin >> x; x...
a.cc: In function 'int main()': a.cc:18:10: error: expected initializer before '+=' token 18 | ll ans += (x / 11) * 2; | ^~
s472446292
p03815
C++
#include<string> #include<cstdio> #include<cstdlib> #define MAX 1000000007 int main() { long long int x, y; long long int count; long long int n; scanf("%lld", &x); n = x / 11; y = 11 * n; if (y == x) { count = 2 * n; } else if (y > x && y + 6 <= x) { count = 2 * n + 1; } else if (y + 6 < x && x < = ...
a.cc: In function 'int main()': a.cc:22:35: error: expected primary-expression before '=' token 22 | else if (y + 6 < x && x < = y + 10){ | ^
s028897347
p03815
C++
#include <stdio.h> #include <stdlib.h> int main(void){ int x, n; scanf("%d", &x); n = 0; while (x > 0) { n = n + 2; x = x - 11; } } printf("%d", n); return 0; }
a.cc:13:9: error: expected constructor, destructor, or type conversion before '(' token 13 | printf("%d", n); | ^ a.cc:14:3: error: expected unqualified-id before 'return' 14 | return 0; | ^~~~~~ a.cc:15:1: error: expected declaration before '}' token 15 | } | ^
s905982932
p03815
C++
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int64_t x; cin >> x; if (x <= 7) { cout << 2 << "\n"; return 0; } uint64_t elevens = x / 11; uint64_t mod = x % 11; if (mod == 0) { cout << (elevens * 2) << << "\n"; } else if ...
a.cc: In function 'int main()': a.cc:19:30: error: expected primary-expression before '<<' token 19 | cout << (elevens * 2) << << "\n"; | ^~
s108880460
p03815
C++
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int64_t x; cin >> x; if (x <= 7) { cout << 2 << "\n"; return 0; } uint64_t elevens = x / 11; uint64_t mod = x % 11; if (mod == 0) { cout << (elevens * 2) << << "\n"; } if (mod ...
a.cc: In function 'int main()': a.cc:19:30: error: expected primary-expression before '<<' token 19 | cout << (elevens * 2) << << "\n"; | ^~
s269033435
p03815
C++
#include <iostream> #include <algorithm> #include <cmath> #include <limits> #include <vector> #include <cstdio> #include <bits/stdc++.h> #include <set> #include <map> #include <stdio.h> #include <stack> #include <queue> using namespace std; using ll = long long; map <int ,int> mpa,mpb; typedef pair<ll, ll> P; priority_...
a.cc: In function 'int main()': a.cc:22:10: error: 'x' was not declared in this scope 22 | cin >> x; | ^
s166538495
p03815
C++
#include <iostream> using namespace std; int main() { long long x, point = 0, count = 0; cin >> x; while (1) { if (x < 1000000000) { if (point < x) { point += 6; count++; } else break; ...
a.cc: In function 'int main()': a.cc:30:17: error: no match for 'operator+=' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 30 | cout+=90909090; | ~~~~^~~~~~~~~~
s731018349
p03815
C++
#include<bits/stdc++.h> #include<algorithm> #include<math.h> #include<set> #include<vector> #include<string> #include<iostream> using namespace std; int main(){ LL x; cin>>x; if(x%11>=1&&x%11<=6){ cout<<x/11*2+1<<endl; } else if(x%11==0){ cout<<x/11*2<<endl; } else{ cout<<x/11*2+2<<endl; } }
a.cc: In function 'int main()': a.cc:10:1: error: 'LL' was not declared in this scope 10 | LL x; | ^~ a.cc:11:6: error: 'x' was not declared in this scope 11 | cin>>x; | ^
s500633069
p03815
C++
#include<bits/stdc++.h> #include<algorithm> #include<math.h> #include<set> #include<vector> #include<string> #include<iostream> using namespace std; int main(){ int x; cin>>x; if(x%11>=1&&x%11<=5){ cout<<x/11*2+1<<endl; } else if(x%11==0){ cout<<x/11*2<<endl; } else{ cout<<x/11*2+2<<endl; }
a.cc: In function 'int main()': a.cc:20:2: error: expected '}' at end of input 20 | } | ^ a.cc:9:11: note: to match this '{' 9 | int main(){ | ^
s102179341
p03815
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; long long x,ans; int main(){ cin>>x; ans+=(x/11)*2; x%=11; if(x!=0){ if(x>6){ cout<<ans+2<<endl; }else{ cout<<ans+1<<endl; } }else{ cout<<a<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:18:23: error: 'a' was not declared in this scope 18 | cout<<a<<endl; | ^
s971795223
p03815
C++
#include <bits/stdc++.h> using namespace std; int main() { ll x; cin >> x; ll a = (x / 11) * 2; x %= 11; if (x == 0) { cout << a << endl; } else if (x <= 6) { cout << a + 1 << endl; } else { cout << a + 2 << endl; } return 0; }
a.cc: In function 'int main()': a.cc:5:4: error: 'll' was not declared in this scope 5 | ll x; | ^~ a.cc:6:11: error: 'x' was not declared in this scope 6 | cin >> x; | ^ a.cc:7:6: error: expected ';' before 'a' 7 | ll a = (x / 11) * 2; | ^~ | ; a.cc:1...
s149485513
p03815
C++
#include <iostream> #include <cmath> using namespace std; typedef long long ll; int main() { ll n; cin>>n; if(n<=6){ cout<<1<<"\n"; return 0; } if(n<=11){ cout<<2<<"\n"; return 0; } if(n%11<6) cout<<ans*2+1<<"\n"; else cout<<ans*2+2<<"\n"; }
a.cc: In function 'int main()': a.cc:15:20: error: 'ans' was not declared in this scope; did you mean 'abs'? 15 | if(n%11<6) cout<<ans*2+1<<"\n"; | ^~~ | abs a.cc:16:14: error: 'ans' was not declared in this scope; did you mean 'abs'? 16 | else cout<<ans*2+2<<...
s627657735
p03815
C++
Copy #include <iostream> #include <string> using namespace std; int main(){ long long X; cin >> X; if(X == 0)cout<<0<<endl; if(X%11 > 6) cout << (X/11)*2+2 << endl; else cout << X/11*2+1 << endl; return 0; }
a.cc:1:1: error: 'Copy' does not name a type 1 | Copy | ^~~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:2: /usr/in...
s088042212
p03815
C++
#include <bits/stdc++.h> using namespace std; int main() { long long x; cin >> x; long long ans = x/11; if (x % 11 == 0) ans = 2*ans; else (x%11 <= 6 ) ans = 2*ans + 1; else ans = 2*ans + 2; cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:20: error: expected ';' before 'ans' 8 | else (x%11 <= 6 ) ans = 2*ans + 1; | ^~~~ | ; a.cc:9:3: error: 'else' without a previous 'if' 9 | else ans = 2*ans + 2; | ^~~~
s735854400
p03815
C
#include <stdio.h> int main(void) {int A,B,C,D,N,K,S,X,Y,Z,k,x,l,tmp; long long int x,m,i; scanf("%lld",&x); m=x/11; i=x%11; if(i>=7) printf("%lld",m*2+2); else printf("%lld",m*2+1); return 0; }
main.c: In function 'main': main.c:4:23: error: conflicting types for 'x'; have 'long long int' 4 | long long int x,m,i; | ^ main.c:3:28: note: previous declaration of 'x' with type 'int' 3 | {int A,B,C,D,N,K,S,X,Y,Z,k,x,l,tmp; | ^
s703917968
p03815
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long x = sc.nextLong(); long ans = 0; if(x % 11 <= 6) ans = x / 11 * 2 + 1; else ans = x / 11 * 2 + 2; System.out.println(ans); } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s905957442
p03815
C++
#include <iostream> #include <string> #include <cstring> #include <cstdio> #include <algorithm> #include <vector> #include <set> #include <map> #include <queue> #include <numeric> #define FOR(i, f, n) for(int (i) = (f); (i) < (n); (i)++) #define RFOR(i, f, n) for(int (i) = (f); (i) >= (n); (i)--) #define rep(i, n) for...
a.cc: In function 'int main()': a.cc:35:9: error: 'ceil' was not declared in this scope 35 | ans = ceil(result); | ^~~~
s010808409
p03815
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main (){ ll x; cin >> x; ll ans = 0; ans += ((x-1)/11)*2; (x-1)%=11; if(x<=6){ ans++; }else{ ans += 2; } cout<<ans<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:5: error: lvalue required as left operand of assignment 9 | (x-1)%=11; | ~~^~~
s186560064
p03815
C++
// die.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; int main() { long long x; cin >> x; if (x <= 6) cout << "1" << endl; else if(x == 7) cout << "3" << endl; else if(x > 7 && x <= 11) cout << "2" << endl; else { long long in...
a.cc:4:10: fatal error: stdafx.h: No such file or directory 4 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s796888590
p03815
C++
#include<iostream> using namespace std; int main() { int64 x; cin >> x; int64 times = x / 11; int64 a = x % 11; int64 add = 0; if (a){ add = 1; if (a > 6){ add = 2; } } cout << times*2+add; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'int64' was not declared in this scope; did you mean 'int64_t'? 6 | int64 x; | ^~~~~ | int64_t a.cc:7:16: error: 'x' was not declared in this scope 7 | cin >> x; | ^ a.cc:9:14: error: expected ';' b...
s149489815
p03815
C++
#include<iostream> using namespace std; int main() { __int64 x; cin >> x; __int64 times = x / 11; __int64 a = x % 11; __int64 add = 0; if (a){ add = 1; if (a > 6){ add = 2; } } cout << times*2+add; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'? 6 | __int64 x; | ^~~~~~~ | __int64_t a.cc:7:16: error: 'x' was not declared in this scope 7 | cin >> x; | ^ a.cc:9:16: error: expe...
s652990451
p03815
C++
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int x; cin >> x; int n = (x / 11) * 2; int l = x % 11; if (l > 6) n += 2; else if (l > 0) n += 1; cout << n << endl; return 0; } #include <iostream> #include <string> #include ...
a.cc:30:5: error: redefinition of 'int main()' 30 | int main() | ^~~~ a.cc:7:5: note: 'int main()' previously defined here 7 | int main() | ^~~~
s383507534
p03815
C++
# -*- coding: utf-8 -*- x = input() q = (x/11)*2 r = x-11*q if(r<=6): print(q+1) else: print(q+2)
a.cc:1:3: error: invalid preprocessing directive #- 1 | # -*- coding: utf-8 -*- | ^ a.cc:2:1: error: 'x' does not name a type 2 | x = input() | ^
s194539935
p03815
C++
#include <iostream> #include <string> using namespace std; int main(){ int x,b,c,y; cin>>x; b=x/11; c=x%11; if(c==0){y=b*2;} else if (c>0 && c<7){y=b*2+1;} else {y=b*2+2;} cout<<y<<endl; } return 0; }
a.cc:16:9: error: expected unqualified-id before 'return' 16 | return 0; | ^~~~~~ a.cc:17:9: error: expected declaration before '}' token 17 | } | ^
s003334541
p03815
C++
#include <iostream> #include <string> using namespace std; int main(){ int x,b,c,y; b=x/11 c=x%11 cin>>x; if(c==0)y=b*2; if(c>0 && c>7)y=b*2+1 if(c>=7)y=b*2+2 cout<<y<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:15: error: expected ';' before 'c' 7 | b=x/11 | ^ | ; 8 | c=x%11 | ~ a.cc:12:30: error: expected ';' before 'if' 12 | if(c>0 && c>7)y=b*2+1 | ^ |...
s178189218
p03815
C++
#include<stdio.h> #include<stdlib.h> int a,b,c; int main(void){ scanf("%d",&a); b=a/11; c=a%11; if(c==0){ c=0; }else if(c<=6){ c=1; }else { c=2; } printf("%d",b+c); return 0;
a.cc: In function 'int main()': a.cc:16:11: error: expected '}' at end of input 16 | return 0; | ^ a.cc:4:15: note: to match this '{' 4 | int main(void){ | ^
s080099402
p03815
C++
#include<stdio.h> #include<stdlib.h> int a,b,c; int main(void){ scanf("%d",&a); b=a/11; c=a%11; if(c==0){ c=0; }else if(c<=0){ c=0; }else if{ c=2; } printf("%d",b+c); return 0; }
a.cc: In function 'int main()': a.cc:12:10: error: expected '(' before '{' token 12 | }else if{ | ^ | (
s430129390
p03815
C++
#include<stdio.h> #include<stdlib.h> int a,b,c; int main(void){ scanf("%d",&a); b=a/11; c=a%11; if(c==0){ c=0;; }else(c<=0){ c=0; }else{ c=2; } printf("%d",b+c); return 0; }
a.cc: In function 'int main()': a.cc:10:13: error: expected ';' before '{' token 10 | }else(c<=0){ | ^ | ; a.cc:12:3: error: 'else' without a previous 'if' 12 | }else{ | ^~~~
s894521166
p03815
C++
#include<stdio.h> #include<stdlib.h> int a,b,c; int main(void){ scanf("%d",&a); b=a/11; c=a%11; if(c<=6&&c>0){ c=1; }if(c==0){ c=0; }else{ c=2; } printf("%d",b+c) return 0; }
a.cc: In function 'int main()': a.cc:15:18: error: expected ';' before 'return' 15 | printf("%d",b+c) | ^ | ; 16 | return 0; | ~~~~~~
s283137376
p03815
C++
#include<stdio.h> #include<stdlib.h> int a,b,c; int main(void){ scanf("%d",&a); b=a/11 c=a%11 if(c<=6&&c>0){ c=1 }if(c==0){ c=0 }else{ c=2 } printf("%d",b+c) return 0; }
a.cc: In function 'int main()': a.cc:6:8: error: expected ';' before 'c' 6 | b=a/11 | ^ | ; 7 | c=a%11 | ~ a.cc:11:5: error: expected ';' before '}' token 11 | c=0 | ^ | ; 12 | }else{ | ~ a.cc:13:5: error: expected ';' before '}' tok...
s728263687
p03815
C++
#include<bits/stdc++.h> using namespace std; int main() { LL x; scanf("%lld", &x); if(x<7) puts("1"); else { LL rem = x-6; LL ans = rem/11*2+1; int s = rem%11; if(s>5) ans+=2; else if(s>0) ans+=1; printf("lld\n", ans); } }
a.cc: In function 'int main()': a.cc:6:5: error: 'LL' was not declared in this scope 6 | LL x; | ^~ a.cc:7:20: error: 'x' was not declared in this scope 7 | scanf("%lld", &x); | ^ a.cc:11:12: error: expected ';' before 'rem' 11 | LL rem = x-6; | ...
s300097775
p03815
Java
import java.util.*; public class ABC053_C { public static void main(String[] args){ Scanner sc=new Scanner(System.in); long x=sc.nextLong(),sum=0; sum=x/11*2; if(x%11>6)sum+=2; else sum+=1; System.out.println(sum); } }
Main.java:2: error: class ABC053_C is public, should be declared in a file named ABC053_C.java public class ABC053_C { ^ 1 error
s972391490
p03815
C++
#include <iostream> // 奇数: 6, 17, 28, ... 11n-5 // 偶数: 11, 22, 33 ... 11n 11n-5 >= x -> n >= (x+5)/11 11n >= x -> n >= x/11 int main(){ unsigned long int x; std::cin >> x; unsigned long int odd = (x+5)/11; unsigned long int even = x/11; if ((x+5)%11 != 0){ odd += 1; } if (x%11 != 0){ even += 1; } if (odd <= ev...
a.cc:6:1: error: expected unqualified-id before numeric constant 6 | 11n-5 >= x -> n >= (x+5)/11 | ^~~
s671059195
p03815
C++
int main(){ long a = 0; long goal; cin >> goal; a = (goal/11)*2; if (goal%11 <= 6) cout << a + 1 << endl; else cout << a +2 << endl; }
a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope 6 | cin >> goal; | ^~~ a.cc:11:9: error: 'cout' was not declared in this scope 11 | cout << a + 1 << endl; | ^~~~ a.cc:11:26: error: 'endl' was not declared in this scope 11 | cout...
s654420737
p03815
Java
import java.util.Scanner; public class Contest053_C { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String line = scan.next(); Long number = Long.parseLong(line); Long getNumber = number/6; if (number<=6){ System.out.print(1); } else...
Main.java:3: error: class Contest053_C is public, should be declared in a file named Contest053_C.java public class Contest053_C { ^ 1 error
s185990184
p03815
Java
import java.util.Scanner; public class Main { public static void main(String[] args) {   Scanner scan = new Scanner(System.in);    String line = scan.next(); Long number = Long.parseLong(line); Long getNumber = number/6; if (number<=6){ System.out.print(1); } else if ...
Main.java:7: error: illegal character: '\u3000' ??Scanner scan = new Scanner(System.in); ^ Main.java:7: error: illegal character: '\u3000' ??Scanner scan = new Scanner(System.in); ^ Main.java:8: error: illegal character: '\u3000' ?? String line = scan.next(); ^ Main...
s372293161
p03815
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int number = scan.next(); int count=1; if (number<=6){ System.out.print(1); } while(number>6){ number = number-6; count++; } System....
Main.java:7: error: incompatible types: String cannot be converted to int int number = scan.next(); ^ 1 error
s699790227
p03815
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int number = Integer.parseInt(scan); int count=1; if (number<=6){ System.out.println(1); } while(number>6){ number = number-6; count++; ...
Main.java:7: error: incompatible types: Scanner cannot be converted to String int number = Integer.parseInt(scan); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 1 error
s059842243
p03815
C++
#include <iostream> using namespace std; int main() { long long n; cin >> n; / if (n < 6) { // cout << "1" << endl; // return 0; // } long long m; int r; m = n / 11; r = n % 11; if (r == 0) { cout << 2 * m; } else if (r <= 6) { cout << 2*m + 1; } else { cout << 2*m + 2; ...
a.cc: In function 'int main()': a.cc:10:3: error: expected primary-expression before '/' token 10 | / if (n < 6) { | ^ a.cc:10:5: error: expected primary-expression before 'if' 10 | / if (n < 6) { | ^~ a.cc:28:2: error: expected '}' at end of input 28 | } | ^ a.cc:6:1: note: to mat...
s171344761
p03815
C++
149696127901
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 149696127901 | ^~~~~~~~~~~~
s964132792
p03815
C++
#include <iostream>//cout #include <stdio.h> #include <vector> #include <cmath> #include <algorithm> #include <string> #include <queue> #include <stack> #include <functional> #include <list> #include <utility>//swap using namespace std; static const int MAX = 200000; #define rep(i,n) for(int i=0;i<n;i++) #define GET_AR...
a.cc: In function 'int main()': a.cc:24:13: error: expected primary-expression before ')' token 24 | } else if()m == 0 { | ^ a.cc:24:20: error: expected ';' before '{' token 24 | } else if()m == 0 { | ^~ | ;
s531378550
p03815
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Beg54A { public static void main(String[] args) { InputStreamReader is = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(is); String input = "2"; try { input = br.readLine(); ...
Main.java:5: error: class Beg54A is public, should be declared in a file named Beg54A.java public class Beg54A { ^ 1 error
s095934548
p03815
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Beg54A { public static void main(String[] args) { InputStreamReader is = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(is); String input = "2"; try { input = br.readLine(); ...
Main.java:5: error: class Beg54A is public, should be declared in a file named Beg54A.java public class Beg54A { ^ 1 error
s336168205
p03815
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Beg54A { public static void main(String[] args) { InputStreamReader is = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(is); String input = "2"; try { input = br.readLine(); ...
Main.java:5: error: class Beg54A is public, should be declared in a file named Beg54A.java public class Beg54A { ^ 1 error
s936008991
p03815
C++
#include<iostream> #include<string> using namespace std; int main() { unsigned long long x, n; cin >> x;   if (x % 11 == 0) { n = 2 * (x / 11); } else if (x % 11 <= 6) { n = 2 * (x / 11) + 1; } else { n = 2 * (x / 11) + 2; }     cout << n << endl;   return 0; }
a.cc:7:1: error: extended character   is not valid in an identifier 7 |   | ^ a.cc:17:1: error: extended character   is not valid in an identifier 17 |   | ^ a.cc:18:1: error: extended character   is not valid in an identifier 18 |   | ^ a.cc:20:1: error: extended character   is not valid in...
s053886503
p03815
C++
#ifdef __GNUC__ #pragma GCC optimize ("O3") #pragma GCC target ("avx") #endif #define _USE_MATH_DEFINES #include <iostream> #include <iomanip> #include <stdio.h> #include <sstream> #include <algorithm> #include <cmath> #include <string> #include <cstring> #include <vector> #include <valarray> #include <array> #inc...
a.cc: In function 'void solve()': a.cc:60:24: error: expected ';' before '{' token 60 | }else if( R > 0{ | ^ | ; a.cc:63:19: error: expected ')' before ';' token 63 | ANS += Q*2; | ^ | ) a.cc:...
s908044274
p03815
C++
#include<bits/stdc++.h> using namespace std; int main(){ long long n,a; cin >> n; a = n/11*2; if(n%11){ a++; if(x%11>6) a++; } cout << a << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:20: error: 'x' was not declared in this scope 11 | if(x%11>6) a++; | ^
s016529207
p03815
C++
#include <cstdio> #include <cstring> #include <iostream> using namespace std; const int maxn = 2e5+10; long long n; int main(){ cin>>n; long long ans = (n/11)*2; if(n% 11 == 0) ans = ans; else if(n%11 <= 6 ) ans = ans+1; else if ans = ans+2; cout << ans<<endl; }
a.cc: In function 'int main()': a.cc:12:14: error: expected '(' before 'ans' 12 | else if ans = ans+2; | ^~~ | (
s198532640
p03815
Java
import java.util.Scanner; public class Solution { public static void main(String[] args) { long target = 0; Scanner sc = new Scanner(System.in); target = sc.nextLong(); long res = (long) Math.floor(target / 11) * 2; long l2 = target % 11; if (target > 6) { res += 2; } else if (target > 1){ res +=...
Main.java:3: error: class Solution is public, should be declared in a file named Solution.java public class Solution { ^ 1 error
s765461886
p03815
Java
import java.util.Scanner; public class ProblemC { public static void main(String[] args) { long target = 0; Scanner sc = new Scanner(System.in); target = sc.nextLong(); long res = (long) Math.floor(target / 11) * 2; long l2 = target % 11; if (target > 6) { res += 2; } else if (target > 1){ res +=...
Main.java:3: error: class ProblemC is public, should be declared in a file named ProblemC.java public class ProblemC { ^ 1 error
s236185301
p03815
C++
#include <iostream> #include <algorithm> #include <cstdio> #include <cmath> #include <string> #include <cctype> #include <stack> #include <queue> #include <vector> #include <cstdlib> #include <list> #include <cmath> #define _USE_MATH_DEFINES #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i...
a.cc:54:5: error: redefinition of 'int main()' 54 | int main() { | ^~~~ a.cc:23:5: note: 'int main()' previously defined here 23 | int main(){ | ^~~~
s839585453
p03815
Java
import java.util.*; public class AT2017_1_28_28_3 { static Scanner sc=new Scanner(System.in); public static void main(String[] args) { long x=sc.nextLong(); long n=(long)x/11; long m=x%11; long result=0; if(m==0){ result=2*n; } else{ if(m<=6){ result=2*n+1; } else{ result=2*n+2; } }...
Main.java:2: error: class AT2017_1_28_28_3 is public, should be declared in a file named AT2017_1_28_28_3.java public class AT2017_1_28_28_3 { ^ 1 error
s867459932
p03815
C++
#include <cstdio> #include <cstring> #include <iostream> using namespace std; const int maxn = 2e5+10; long long n; int main(){ cin>>n; long long ans = (n/11)*2; //if(n% 11 == 0) ans = anss; if(n%11 <= 6 && n%11!=0) ans = anss+1; else if(n%11!=0) ans = anss+2; cout << ans<<endl; }
a.cc: In function 'int main()': a.cc:11:38: error: 'anss' was not declared in this scope; did you mean 'ans'? 11 | if(n%11 <= 6 && n%11!=0) ans = anss+1; | ^~~~ | ans a.cc:12:30: error: 'anss' was not declared in this scope; ...
s590271776
p03815
C++
#include <cstdio> #include <cstring> #include <iostream> using namespace std; const int maxn = 2e5+10; long long n; int main(){ scanf("%I64d",&n); long long ans,ans = n/11 *2; if(n% 11 == 0) ans = anss; else if(n%11 <= 6) ans = anss+1; else ans = anss+2; printf("%I64d\n",ans); }
a.cc: In function 'int main()': a.cc:9:20: error: redeclaration of 'long long int ans' 9 | long long ans,ans = n/11 *2; | ^~~ a.cc:9:16: note: 'long long int ans' previously declared here 9 | long long ans,ans = n/11 *2; | ^~~ a.cc:10:28: error: 'anss' was...
s382526778
p03815
C++
#include <iostream> using namespace std; int main(){ unsigned long long int x; cin >> x; unsigned long long int temp = x / 11; unsigned long long int step = 2*temp; x = x - step * 11; if(x >= 1) ++step; of(x > 6) ++step; cout << step << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:3: error: 'of' was not declared in this scope 14 | of(x > 6) | ^~
s269248401
p03815
C++
#include <bits/stdc++.h> #define MP make_pair #define PB push_back #define ALL(x) (x).begin(),(x).end() #define RALL(x) (x).rbegin(),(x).rend() #define RANGEBOX(x,y,maxX,maxY) (0 <= (x) && 0 <= (y) && (x) < (maxX) && (y) < (maxY)) #define RANGE(x, l, r) ((l) <= (x) && (x) <= (r)) #define rep(i, N) for (int i = 0;...
a.cc:2:1: error: stray '#' in program 2 | #include <bits/stdc++.h> | ^ a.cc:2:1: error: '\U0000feff' does not name a type 2 | #include <bits/stdc++.h> | a.cc:20:9: error: 'vector' does not name a type 20 | typedef vector<int> VI; | ^~~~~~ a.cc:21:9: error: 'vector' does not name...
s218712917
p03815
C++
#include <iostream> #include <algorithm> #include <cstdio> #include <cmath> #include <string> #include <cctype> #include <stack> #include <queue> #include <vector> #include <cstdlib> #include <list> #include <cmath> #define _USE_MATH_DEFINES #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i...
a.cc:54:5: error: redefinition of 'int main()' 54 | int main() { | ^~~~ a.cc:23:5: note: 'int main()' previously defined here 23 | int main(){ | ^~~~
s201185002
p03815
C++
#include<iostream> using namespace std; int main(){ long long int x,ans; cin>>x; if(x>11){ ans=(x/11)*2; if(x%11<=6 x%11>0)ans++;else ans+=2; }else{ if(x>6)ans=2;else ans=1; } cout<<ans<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:11: error: expected ')' before 'x' 8 | if(x%11<=6 x%11>0)ans++;else ans+=2; | ~ ^~ | )
s054012699
p03815
C++
#include<iostream> #include<cstdio> using namepace std; int main(void) { long long x; while(cin>>x) { long long y=x/11; long long z=x%11; long long ans=2*y-1; if(z==0) ans+=0; else if(ans<7) ans+=1; else ans+=2; cout<<ans<<end...
a.cc:3:7: error: expected nested-name-specifier before 'namepace' 3 | using namepace std; | ^~~~~~~~ a.cc: In function 'int main()': a.cc:7:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | while(cin>>x) | ^~~ | std::cin In file include...
s212332740
p03815
C++
#include<iostream> using namespace std; int main() { long long a; long long b; long long c; cin >> a; b = a / 11; c = a % 11; if (c = 0) cout << 2 * b; if ( c > 0 && c < 7) cout << 2 * b + 1; if ( C > 6 && c < 11) cout << 2 * b + 2; cin >> a; return 0; }
a.cc: In function 'int main()': a.cc:20:14: error: 'C' was not declared in this scope 20 | if ( C > 6 && c < 11) | ^
s659823915
p03815
C++
#include <iostream> using namespace std; int main() { long long x, ans, result, remain; cin >> x; cout << x << endl; if(x <= 11){ if(x <= 6){ ans = 1; }else{ ans = 2; } }else{ result = x/11; remain = x % 11; if(remain === 0){ ans = result * 2; }else{ ans = result * 2 + 1; } } cout...
a.cc: In function 'int main()': a.cc:17:29: error: expected primary-expression before '=' token 17 | if(remain === 0){ | ^
s688366945
p03815
C
int main(void){long long int a,b,ans;scanf("%lld",&a); ans=(a-5%11)a*2/11:(a-5)*2/11+1; printf("%lld\n",ans);return 0;}
main.c: In function 'main': main.c:1:38: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | int main(void){long long int a,b,ans;scanf("%lld",&a); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#...
s317534666
p03815
C++
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #include <vector> #include <cmath> #define rep(i, n) for (i = 0; i < n; ++i) #define REP(i, m, n) for (i = m, i < n; ++i) #define INF 1000 * 1000 using namespace std; int main() { unsigned long long n; cin >> n; ...
a.cc: In function 'int main()': a.cc:23:3: error: 'unsigned' specified with 'long double' 23 | unsigned long double tmp = n / 11.0 * 2.0; | ^~~~~~~~
s423682261
p03815
C++
#include <iostream> using namespace std; int main() { unsigned long long x, ans, result; cin >> x; if(x <= 11){ if(x <= 6){ ans = 1; }else{ ans = 2; } }else{ result = x/11; remain = x % 11; if(remain == 0){ ans = result * 2; }else{ ans = result * 2 + 1; } } cout << ans << endl; r...
a.cc: In function 'int main()': a.cc:15:17: error: 'remain' was not declared in this scope; did you mean 'main'? 15 | remain = x % 11; | ^~~~~~ | main
s367025831
p03815
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); long x=sc.nextLong(); long ans=(long)(x/11); if(x-11*ans<6)ans++; ans++; System.out.println(ans); }
Main.java:10: error: reached end of file while parsing } ^ 1 error
s236771972
p03815
C
#include<stdio.h> int main() { int x; int counter=0; int check=0; scanf("%d",&x); while(x>0) { if(check%2==0) x-=6; else x-=5; counter++; check++; } printf("%d",check); return 0; } x-=6;
main.c:20:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before '-=' token 20 | x-=6; | ^~
s609854067
p03815
C++
#include <cstdio> using namespace std; int main() { ll x; scanf("%lld", &x); ll mod = 11; ll rem = x % mod; ll div = x / mod; div *= 2; if (rem <= 6) div += 1; else div += 2; printf("%lld\n", div); return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'll' was not declared in this scope 7 | ll x; | ^~ a.cc:9:20: error: 'x' was not declared in this scope 9 | scanf("%lld", &x); | ^ a.cc:11:7: error: expected ';' before 'mod' 11 | ll mod = 11; | ^~~~ ...
s169042199
p03815
C++
#include<stdio.h> #include<string.h> using namespace std; #define ll __int64 int main() { ll a; while(~scanf("%I64d",&a)) { ll output=a/11*2; a%=11; if(a>=1&&a<=5)output++; if(a>=6&&a<=10)output+=2; printf("%I64d\n",output); } }
a.cc: In function 'int main()': a.cc:4:12: error: '__int64' was not declared in this scope; did you mean '__int64_t'? 4 | #define ll __int64 | ^~~~~~~ a.cc:7:5: note: in expansion of macro 'll' 7 | ll a; | ^~ a.cc:8:27: error: 'a' was not declared in this scope 8 | while(~...
s261272402
p03815
C++
#include <iostream> using namespace std; int main() { long x; cin >> x; long ans = 0; ans += x / 11; ans *= 2; if (x % 11 = 0); else if (x % 11 >= 7) ans += 2; else ans++; cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:15: error: lvalue required as left operand of assignment 10 | if (x % 11 = 0); | ~~^~~~
s664906210
p03816
Java
import java.util.Arrays; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = sc.nextInt(); } sc.close(); Arrays.sort(a); int index = 0; boolean isRemaining = false; ...
Main.java:7: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:7: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s711982059
p03816
Java
public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); ArrayList<Integer> a = new ArrayList<Integer>(); for (int i = 0; i < n; i++) { a.add(sc.nextInt()); } sc.close(); Collections.sort(a); int minIndex; while(getSameCardIndex(a...
Main.java:34: error: cannot find symbol private static int getSameCardIndex(ArrayList<Integer> a) { ^ symbol: class ArrayList location: class Main Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Mai...
s965806107
p03816
C++
/** * created: 31.07.2020 11:19:43 **/ #define _GLIBCXX_DEBUG #include <bits/stdc++.h> // #include <boost/multiprecision/cpp_int.hpp> // using bint = boost::multiprecision::cpp_int; using namespace std; #define int long long #define rep(i,n) for (int i = 0; i < (int)(n); i++) #define rep2(i,s,n) for (int i = (s); i ...
a.cc: In function 'int main()': a.cc:36:29: error: 'a' was not declared in this scope 36 | v.erase(unique(all(v)), a.end()); | ^
s328520990
p03816
C++
#include<iostream> #include<algorithm> #include<vector> #include<queue> #include<stack> #include<string> #include<map> #include<set> #include<tuple> #include<cmath> #include<iomanip> #define MOD 1000000007 #define INF 1001001001 #define MIN -1001001001 #define rep(i,k,N) for(int i=k;i<N;i++) #define MP make_pair #def...
a.cc: In function 'int main()': a.cc:42:24: error: 'a1' was not declared in this scope; did you mean 'y1'? 42 | if(A[i] == A[i-a1])sum++; | ^~ | y1
s961956956
p03816
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for(ll i = 0; i < (ll)(n); i++) #define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++) #define memi cout << endl #define kono(n) cout << fixed << setprecision(n) #define all(c) (c).begin(), (c).end() #define pb push_back #define hina c...
a.cc: In function 'int main()': a.cc:29:16: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type, int)' 29 | b = b + max(c[i] - 1, 0); | ~~~^~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s532290054
p03816
C++
#include<bits/stdc++.h> using namespace std; int n,a[101101],ans; int main() { cin>>n; for(int i=1;i<=n;i++) { cin>>a[i]; } sort(&a[1],&a[n+1]); for(int i=1;i<=n;i++) { if(a[i]==a[i-1]) ans++; } if(ans%2) ans++; cout<<n-ans<<endl; return 0;...
a.cc: In function 'int main()': a.cc:20:12: error: unable to find numeric literal operator 'operator""\U0000ff1b' 20 | return 0; | ^~~ a.cc:20:15: error: expected ';' before '}' token 20 | return 0; | ^ | ; 21 | } | ~
s725317079
p03816
C++
#include<iostream> #include<set> using namespace std; int main() { int N, A_i, k; cin >> N; set<int> B; for(i=0; i<N; i++) { cin >> A_i; B.insert(A_i); } k = B.size(); if(k%2 == 1) { cout << k << endl; } else { cout << k-1 << endl; } ...
a.cc: In function 'int main()': a.cc:11:9: error: 'i' was not declared in this scope 11 | for(i=0; i<N; i++) { | ^
s038563127
p03816
C++
15 1 3 5 2 1 3 2 8 8 6 2 6 11 1 1
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 15 | ^~
s846413603
p03816
C++
#include <bits/stdc++.h> using namespace std; int n,ans,sum; int a[100005],cishu[100005]; void f(){ for(int i=1;i<=sum;i++){ if(shu[i]>1){ ans+=shu[i]-1; }else{ continue; } } if(ans%2==1){ ans+=1; } cout<<n-ans<<endl; return ; } int main(){ cin>>n; for(int i=1...
a.cc: In function 'void f()': a.cc:7:12: error: 'shu' was not declared in this scope 7 | if(shu[i]>1){ | ^~~
s485246308
p03816
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N; cin>>N; map<int,int> m; for(int i=0;i<N;i++){ int x; cin>>x; if(m.count(x)){ m.at(x)++; }else{ m[x]=0; } } int sum=0; for(auto i:m){ sum+=i.second } cout<<sum/2+sum%2<<endl; }
a.cc: In function 'int main()': a.cc:20:18: error: expected ';' before '}' token 20 | sum+=i.second | ^ | ; 21 | } | ~