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); } else { remainder = x / 11 int rest = x % 11; if (rest > 6) { cout << (long long)(remainder * 2) + 2); } else { cout << (long long)(remainder) + 1); } } } return 0; }
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: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator*' 30 | cout << (long long)(remainder * 2) + 2); | ~~~~~~~~~~^~~ a.cc:34:46: error: overloaded function with no contextual type information 34 | cout << (long long)(remainder) + 1); | ^
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 = pair<int, int>; using Pll = pair<ll, ll>; #define rep(i, n) for (ll i = 0; i < (n); i++) #define rrep(i, n) for (ll i = (n)-1; i >= 0; i--) int main(int argc, char *argv[]) { cin.tie(0); ios::sync_with_stdio(false); ll x; cin >> x; ll ans = (x/11)*2; if (X%11 != 0) { ans++; if (X%11 > 6) { ans++; } } cout << ans << endl; return 0; }
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() const ll mod = 1e9+7; const ll INF = 1e9; ll gcd(ll a,ll b){return b?gcd(b,a%b):a;} int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; int main() { ll x; cin>>x; ll res = x%11; if(res>0) res = (res<=6?1:2); cout<<(x/11)*2'+res<<endl; return 0; }
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: expected ';' before 'return' 34 | cout<<(x/11)*2'+res<<endl; | ^ | ; 35 | return 0; | ~~~~~~
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() { long long x; cin >> x; cout << setprecision(20) << (x%17==0||x%18 == 0 ||x%19 == 0 ||x%20 == 0 ||x%21 == 0 ? (x%11<=5 ? x/11*2+1 : x/11*2+2) : (x % 11 <= 6 ? x / 11 * 2 + 1 : x / 11 * 2 + 2) )<< endl; }
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_null_pointer' redeclared as different kind of entity 164 | __is_null_pointer(std::nullptr_t) | ^ /usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)' 159 | __is_null_pointer(_Type) | ^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std' 164 | __is_null_pointer(std::nullptr_t) | ^~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64: /usr/include/c++/14/type_traits:295:27: error: 'size_t' has not been declared 295 | template <typename _Tp, size_t = sizeof(_Tp)> | ^~~~~~ /usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std' 666 | struct is_null_pointer<std::nullptr_t> | ^~~~~~~~~ /usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid 666 | struct is_null_pointer<std::nullptr_t> | ^ /usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid 670 | struct is_null_pointer<const std::nullptr_t> | ^ /usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid 674 | struct is_null_pointer<volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid 678 | struct is_null_pointer<const volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:984:26: error: 'size_t' has not been declared 984 | template<typename _Tp, size_t _Size> | ^~~~~~ /usr/include/c++/14/type_traits:985:40: error: '_Size' was not declared in this scope 985 | struct __is_array_known_bounds<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:985:46: error: template argument 1 is invalid 985 | struct __is_array_known_bounds<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std' 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^~~~~~ /usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std' 1438 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid 1438 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared 1440 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope 1441 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid 1441 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std' 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std' 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1451:32: error: 'size_t' was not declared in this scope 1451 | : public integral_constant<size_t, 0> { }; | ^~~~~~ /usr/include/c++/14/type_traits:64:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 63 | #include <bits/version.h> +++ |+#include <cstddef> 64 | /usr/include/c++/14/type_traits:1451:41: error: template argument 1 is invalid 1451 | : public integral_constant<size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1451:41: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1453:26: error: 'size_t' has not been declared 1453 | template<typename _Tp, size_t _Size> | ^~~~~~ /usr/include/c++/14/type_traits:1454:23: error: '_Size' was not declared in this scope 1454 | struct extent<_Tp[_Size], 0> | ^~~~~ /usr/include/c++/14/type_traits:1454:32: error: template argument 1 is invalid 1454 | struct extent<_Tp[_Size], 0> | ^ /usr/include/c++/14/type_traits:1455:32: error: 'size_t' was not declared in this scope 1455 | : public integral_constant<size_t, _Size> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1455:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/type_traits:1455:40: error: '_Size' was not declared in this scope 1455 | : public integral_constant<size_t, _Size> { }; | ^~~~~ /usr/include/c++/14/type_traits:1455:45: error: template argument 1 is invalid 1455 | : public integral_constant<size_t, _Size> { }; | ^ /usr/include/c++/14/type_traits:1455:45: error: template argument 2 is invalid /usr/include/c++/14/type_traits:1457:42: error: 'size_t' has not been declared 1457 | template<typename _Tp, unsigned _Uint, size_t _Size> | ^~~~~~ /usr/include/c++/14/type_traits:1458:23: error: '_Size' was not declared in this scope 1458 | struct extent<_Tp[_Size], _Uint> | ^~~~~ /usr/include/c++/14/type_traits:1458:36: error: template argument 1 is invalid 1458 | struct extent<_Tp[_Size], _Uint> | ^ /usr/include/c++/14/type_traits:1463:32: error: 'size_t' was not declared in this scope 1463 | : public integral_constant<size_t, 0> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1463:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/type_traits:1463:41: error: template argument 1 is invalid 1463 | : public integral_constant<size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1463:41: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1857:26: error: 'size_t' does not name a type 1857 | { static constexpr size_t __size = sizeof(_Tp); }; | ^~~~~~ /usr/include/c++/14/type_traits:1857:26: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/type_traits:1859:14: error: 'size_t' has not been declared 1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> | ^~~~~~ /usr/include/c++/14/type_traits:1859:48: error: '_Sz' was not declared in this scope 1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> | ^~~ /usr/include/c++/14/type_traits:1860:14: error: no default argument for '_Tp' 1860 | struct __select; | ^~~~~~~~ /usr/include/c++/14/type_traits:1862:14: error: 'size_t' has not been declared 1862 | template<size_t _Sz, typename _Uint, typename... _UInts> | ^~~~~~ /usr/include/c++/14/type_traits:1863:23: error: '_Sz' was not declared in this scope 1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true> | ^~~ /usr/include/c++/14/type_traits:1863:57: error: template argument 1 is invalid 1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true> | ^ /usr/include/c++/14/type_traits:1866:14: error: 'size_t' has not been declared 1866 | template<size_t _Sz, typename _Uint, typename... _UInts> | ^~~~~~ /usr/include/c++/14/type_traits:1867:23: error: '_Sz' was not declared in this scope 1867 | struct __select<_Sz, _List<_Uint, _UInts...>, false> | ^~~ /usr/include/c++/14/type_traits:1867:58: error: template argument 1 is invalid 1867 | struct __select<_Sz, _List<_Uint, _UInts...>, false> |
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(); i!=(c).end(); ++i) #define EXIST(s,e) ((s).find(e)!=(s).end()) #define SORT(c) sort((c).begin(),(c).end()) #define PB push_back #define MP make_pair template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } int main() { ll N; scanf("%lld", &N); ll ans = 0; ll base = N/11; N = N%11; if(N<=6 %% N!=0) ++ans; else ans += 2; cout << ans + base*2 << endl; }
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) if(isPrime[i]) for(size_t j=2; i*j <= max; ++j) isPrime[i*j] = false; } int main(){ cin.tie(0); ios::sync_with_stdio(false); ll x; cin >> x; ll ans; if (x=<6){ cout << 1 << endl; return 0; } ans = 2*(x/11+1); if (x%11 <=6){ ans--; } cout << ans << endl; }
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) { ans = x.divide(new BigInteger("11")).multiply(new BigInteger("2")).add(new BigInteger("1")); } else if(6 < y) { ans = x.divide(new BigInteger("11")).multiply(new BigInteger("2")).add(new BigInteger("2")); } System.out.println(ans.toString()); } }
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){ return b; }else{ return gcd(b,a%b); } } long long lcm(long long x, long long y){ return (x/gcd(x,y))*y; } class UnionFind { public: //各頂点の親の番号を格納する。その頂点自身が親だった場合は-(その集合のサイズ)を入れる。 vector<int> Parent; //クラスを作るときは、Parentの値を全て-1にする。 //以下のようにすると全てバラバラの頂点として解釈できる。 UnionFind(int N) { Parent = vector<int>(N, -1); } //Aがどのグループに属しているか調べる int root(int A) { if (Parent[A] < 0) return A; return Parent[A] = root(Parent[A]); } //自分のいるグループの頂点数を調べる int size(int A) { return -Parent[root(A)];//先祖をrootで取っておきたい。 } //AとBをくっ付ける bool connect(int A, int B) { //AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける A = root(A); B = root(B); if (A == B) { //すでにくっついてるからくっ付けない return false; } //大きい方(A)に小さいほう(B)をくっ付けたい //大小が逆だったらAとBをひっくり返す。 if (size(A) < size(B)) swap(A, B); //Aのサイズを更新する Parent[A] += Parent[B]; //Bの親をAに変更する Parent[B] = A; return true; } }; int main(){ long long x; cin>>x; long long time; int rest; time = x/11; rest = x%11; long long ans; if(rest==0){ ans = time; }else if(rest<=6){ ans = time+1; }else{ ans = time+2 } cout<<ans<<endl; return 0; }
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(); std::io::stdin().read_line(&mut line).unwrap(); let mut iter = line.split_whitespace(); ( $(iter.next().unwrap().parse::<$t>().unwrap(),)* ) } }; ($t:ty; $n:expr) => { (0..$n).map(|_| get!($t) ).collect::<Vec<_>>() }; ($($t:ty),*; $n:expr) => { (0..$n).map(|_| get!($($t),*) ).collect::<Vec<_>>() }; ($t:ty ;;) => { { let mut line: String = String::new(); std::io::stdin().read_line(&mut line).unwrap(); line.split_whitespace() .map(|t| t.parse::<$t>().unwrap()) .collect::<Vec<_>>() } }; ($t:ty ;; $n:expr) => { (0..$n).map(|_| get!($t ;;)).collect::<Vec<_>>() }; } fn main() { let x = get!(u64); let res_base = x/11 * 2; let res_add = match x%11 { 0 => 0, 1 ... 5 => 1, _ => 2 }; println!("{}", res_base + res_add); }
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 ;;)).collect::<Vec<_>>() | ^~~~~ a.cc:1:1: error: 'macro_rules' does not name a type 1 | macro_rules! get { | ^~~~~~~~~~~ a.cc:43:1: error: 'fn' does not name a type 43 | fn main() { | ^~
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; } return 0; }
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){ | ^ | yn a.cc:11:24: error: expected ';' before 'sum' 11 | __int64 sum=0,count=0; | ^~~~ | ; a.cc:12:23: error: 'sum' was not declared in this scope 12 | while(sum<n){ | ^~~ a.cc:14:30: error: no post-increment operator for type 14 | count++; | ^~ a.cc:17:38: error: no post-increment operator for type 17 | count++; | ^~ a.cc:20:21: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>') 20 | cout<<count<<endl; | ~~~~^~~~~~~ In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const voi
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; } return 0; }
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){ | ^ | yn a.cc:11:24: error: expected ';' before 'sum' 11 | __int64 sum=0,count=0; | ^~~~ | ; a.cc:12:23: error: 'sum' was not declared in this scope 12 | while(sum<n){ | ^~~ a.cc:14:30: error: no post-increment operator for type 14 | count++; | ^~ a.cc:17:38: error: no post-increment operator for type 17 | count++; | ^~ a.cc:20:21: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>') 20 | cout<<count<<endl; | ~~~~^~~~~~~ In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const voi
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 = pair<int, int>; const int INF = 1e9; int main() { long long n, ans = 0; scanf("lld%", &n); ans += (n / 11) * 2; n %= 11; ans += (n + 5) / 6; printf("%lld\n", ans); return 0; }
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>; const int INF = 1e9; int main() { long long n, ans = 0; scanf("lld%", &n); ans += (n / 11) * 2; n %= 11; ans += (n + 5) / 6; printf("%lld\n", ans); return 0; }
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).size()) #define contains(a, x) (a.find(x) != end(a)) #define rep(i, n) for (int i = 0; i < (int)n; ++i) #define F(i,a,b) for(int i = (int)(a); i < (int)(b); ++i) #define RF(i,a,b)for(int i = (int)(a); i >= (int)(b); --i) typedef double dbl; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<long long> vll; typedef pair<int,int> pi; #define fast() {ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);} #define log(x) cout << (x) << endl; #define exp(x) dbl((6*x)+(5*x)) int main() { fast(); ll a, x = 1; cin >> x; double r = (x+5)/11.0; if (r == 1) a = 1 else { a = ll(r * 2); if (a % 11) ++a; } log(a) return 0; }
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> #include <map> #include <queue> #include <set> #include <string> #include <tuple> #include <vector> /* ---------- Namespace ---------- */ using namespace std; /* ---------- Type Abbreviation ---------- */ template <typename T> using PQ = priority_queue<T>; template <typename T> using GPQ = priority_queue<T, vector<T>, greater<T>>; using ll = long long; #define fst first #define snd second #define mp make_pair #define mt make_tuple #define FOR(i, a, b) for (ll i = (a); i < (b); i++) #define REP(i, n) FOR(i, 0, n) /* ---------- conversion ---------- */ #define INT(c) static_cast<int>(c) #define CHAR(n) static_cast<char>(n) #define LL(n) static_cast<ll>(n) #define DOUBLE(n) static_cast<double>(n) /* ---------- container ---------- */ #define ALL(v) (v).begin(), (v).end() #define SIZE(v) (LL((v).size())) #define each(itr,v) for(auto (itr):(v)) #define FIND(v, k) (v).find(k) != (v).end() #define VFIND(v, k) find(ALL(v), k) != (v).end() #define gsort(b, e) sort(b, e, greater<decltype(*b)>()) /* ----------- debug ---------- */ template <class T> ostream& operator<<(ostream& os, vector<T> v) { os << "["; for (auto vv : v) os << vv << ","; return os << "]"; } template <class T> ostream& operator<<(ostream& os, set<T> v) { os << "["; for (auto vv : v) os << vv << ","; return os << "]"; } template <class L, class R> ostream& operator<<(ostream& os, pair<L, R> p) { return os << "(" << p.fst << "," << p.snd << ")"; } /* ---------- Constants ---------- */ // const ll MOD = 1e9 + 7; // const int INF = 1 << 25; // const ll INF = 1LL << 50; // const double PI = acos(-1); // const double EPS = 1e-10; // mt19937 mert(LL(time(0))); /* ---------- Short Functions ---------- */ template <typename T> T sq(T a) { return a * a; } template <typename T> T gcd(T a, T b) { if (a > b) return gcd(b, a); return a == 0 ? b : gcd(b % a, a); } template <typename T, typename U> T mypow(T b, U n) { if (n == 0) return 1; if (n == 1) return b /* % MOD */; if (n % 2 == 0) { return mypow(b * b /* % MOD */, n / 2); } else { return mypow(b, n - 1) * b /* % MOD */; } } ll pcnt(ll b) { return __builtin_popcountll(b); } // const ll dx[4] = {0, -1, 1, 0}; // const ll dy[4] = {-1, 0, 0, 1}; // const ll dx[8] = {-1, 0, 1, -1, 1, -1, 0, 1}; // const ll dy[8] = {-1, -1, -1, 0, 0, 1, 1, 1}; /* v-v-v-v-v-v-v-v-v Main Part v-v-v-v-v-v-v-v-v */ int main() { cin.tie(0); ios::sync_with_stdio(false); ll N; cin >> N; if (N % 11 == 0) cout << N / 11 * 2 << endl; ll c = N / 11; else cout << c * 2 + 1 << endl; return 0; }
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{ | ^ | ( a.cc:13:6: error: 'else' without a previous 'if' 13 | }else { | ^~~~
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 -= 5; ans = 1; if(x <= 0){ cout << ans << endl; return 0; } ll ans += (x / 11) * 2; x = x % 11; if(x == 0) cout << ans << endl; else if(x > 6) cout << ans + 2 << endl; else cout << ans + 1 << endl; return 0; }
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 < = y + 10){ count = 2 * (n + 1); } printf("%lld", count); return 0; }
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 (mod <= 6) { cout << (elevens * 2 + 1) << "\n"; } else { cout << (elevens * 2 + 2) << "\n"; } }
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 <= 6) { cout << (elevens * 2 + 1) << "\n"; } else { cout << (elevens * 2 + 2) << "\n"; } }
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_queue<P, vector<P>, greater<P>> pque; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); cin >> x; int cnt=0; while(x>0){ cnt++; if(cnt%2==1){ x-=6; }else{ x-=5; } } cout << cnt << endl; return 0; }
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; if (point < x) { point += 5; count++; } else break; } else { point += 999999990; cout+=90909090; } } cout << count; } //999999990
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:11:15: error: 'a' was not declared in this scope 11 | cout << a << endl; | ^ a.cc:13:15: error: 'a' was not declared in this scope 13 | cout << a + 1 << endl; | ^ a.cc:15:15: error: 'a' was not declared in this scope 15 | cout << a + 2 << endl; | ^
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<<"\n"; | ^~~ | abs
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/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 68 | typedef ptrdiff_t streamsize; // Signed integral type | ^~~~~~~~~ /usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 40 | #include <cwchar> // For mbstate_t +++ |+#include <cstddef> 41 | In file included from /usr/include/c++/14/bits/exception_ptr.h:38, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41: /usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ In file included from /usr/include/wchar.h:35, from /usr/include/c++/14/cwchar:44, from /usr/include/c++/14/bits/postypes.h:40: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive] 132 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive] 134 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared 140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared 142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:145:52: error: expected primary-expression before 'const' 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:147:54: error: expected primary-expression before 'const' 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive] 155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:156:70: error: expected primary-expression before 'const' 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive] 163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:164:72: error: expected primary-expression before 'const' 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:171:29: error: 'std::size_t' has not been declared 171 | void operator delete(void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/14/new:173:31: error: 'std::size_t' has not been declared 173 | void operator delete[](void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/14/new:179:33: error: declaration of 'operator new' as non-function 179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:179:51: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 179 | _GLIBCXX_NODISCARD inline vo
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(int (i) = 0; (i) < (n); (i)++) #define rrep(i, n) for(int (i) = (n); (i) >= 0; (i)--) #define step(i, f, n, a) for(int (i) = (f); (i) < (n); (i)+=a) #define rstep(i, f, n, a) for(int (i) = (f); (i) >= (n); (i)-=a) #define p(...) printf(__VA_ARGS__); cout << endl; #define gets(x) x; cin >> x; #define puts(x) x; cout << x << endl; #define list_input(x, n) x[(n)]; for(int (i) = 0; (i) < (n); (i)++) cin >> x[i]; #define lambda(a, b, c) [](const a, const b){ return c ;} #define key(t, x, compare) [](const t& a, const t& b){ return a x compare b x ;} using ll = long long; using namespace std; using pii = pair<int, int>; int main(){ ll x, ans; double result; gets(x) result = (x/11.0)*2; ans = ceil(result); puts(ans) }
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 int n = x - (x / 11) * 11; if (n < 7 && n != 0) cout << (x / 11) * 2 + 1<< endl; else if (!n)cout << (x / 11) * 2 << endl; else cout << (x / 11)*2 + 2 << endl; } return 0; }
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 ';' before 'times' 9 | int64 times = x / 11; | ^~~~~~ | ; a.cc:10:14: error: expected ';' before 'a' 10 | int64 a = x % 11; | ^~ | ; a.cc:12:14: error: expected ';' before 'add' 12 | int64 add = 0; | ^~~~ | ; a.cc:13:13: error: 'a' was not declared in this scope 13 | if (a){ | ^ a.cc:14:17: error: 'add' was not declared in this scope 14 | add = 1; | ^~~ a.cc:19:17: error: 'times' was not declared in this scope; did you mean 'timex'? 19 | cout << times*2+add; | ^~~~~ | timex a.cc:19:25: error: 'add' was not declared in this scope 19 | cout << times*2+add; | ^~~
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: expected ';' before 'times' 9 | __int64 times = x / 11; | ^~~~~~ | ; a.cc:10:16: error: expected ';' before 'a' 10 | __int64 a = x % 11; | ^~ | ; a.cc:12:16: error: expected ';' before 'add' 12 | __int64 add = 0; | ^~~~ | ; a.cc:13:13: error: 'a' was not declared in this scope 13 | if (a){ | ^ a.cc:14:17: error: 'add' was not declared in this scope 14 | add = 1; | ^~~ a.cc:19:17: error: 'times' was not declared in this scope; did you mean 'timex'? 19 | cout << times*2+add; | ^~~~~ | timex a.cc:19:25: error: 'add' was not declared in this scope 19 | cout << times*2+add; | ^~~
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 <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; }
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 | ^ | ; 13 | if(c>=7)y=b*2+2 | ~~
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 '}' token 13 | c=2 | ^ | ; 14 | } | ~ a.cc:15:18: error: expected ';' before 'return' 15 | printf("%d",b+c) | ^ | ; 16 | return 0; | ~~~~~~
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; | ^~~~ | ; a.cc:12:12: error: expected ';' before 'ans' 12 | LL ans = rem/11*2+1; | ^~~~ | ; a.cc:13:18: error: 'rem' was not declared in this scope; did you mean 'drem'? 13 | int s = rem%11; | ^~~ | drem a.cc:14:18: error: 'ans' was not declared in this scope; did you mean 'abs'? 14 | if(s>5) ans+=2; | ^~~ | abs a.cc:15:23: error: 'ans' was not declared in this scope; did you mean 'abs'? 15 | else if(s>0) ans+=1; | ^~~ | abs a.cc:16:26: error: 'ans' was not declared in this scope; did you mean 'abs'? 16 | printf("lld\n", ans); | ^~~ | abs
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 <= even){ std::cout << 2*odd-1 << std::endl; } else { std::cout << 2*even << std::endl; } return 0; }
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 << a + 1 << endl; | ^~~~ a.cc:13:9: error: 'cout' was not declared in this scope 13 | cout << a +2 << endl; | ^~~~ a.cc:13:25: error: 'endl' was not declared in this scope 13 | cout << a +2 << endl; | ^~~~
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 if (number%6==0){ System.out.println(getNumber); } else { System.out.println(getNumber+1); } } }
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 (number%6==0){ System.out.println(getNumber); } else { System.out.println(getNumber+1); } } }
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.java:8: error: illegal character: '\u3000' ?? String line = scan.next(); ^ 4 errors
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.out.print(count); } }
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++; } System.out.println(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; } return 0; }
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 match this '{' 6 | { | ^
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_ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0])) int main() { long long int x; cin >> x; long long int k = x/11; long long int m = x%11; if(0<m<7){ cout << 1 + 2*k << endl; } else if()m == 0 { cout << 2*k << endl; } else { cout << 2 + 2*k << endl; } return 0; }
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(); } catch (IOException e) { } long out = 0; long K = Long.valueOf(input); if (K == 1) { out = 1; } else if (2 < K && K <= 7) { out = 2; } else { long K1 = Long.valueOf(input) - 5; long M1 = Math.max(K1/11,-1) + 1; long L1 = Long.MIN_VALUE; L1 = M1 * 2 + 1; long K2 = Long.valueOf(input) - 6; long L2 = Long.MIN_VALUE; long M2 = Math.max(K2/11,-1) + 1; L2 = M2 * 2 + 1; long K3 = Long.valueOf(input); long M3 = Math.max(K3/11,-1) + 1; long L3 = Long.MIN_VALUE; L3 = M3 * 2; out = Math.min(L3,Math.min(L1, L2)); } System.out.print(out); } }
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(); } catch (IOException e) { } long out = 0; long K = Long.valueOf(input); if (K == 1) { out = 1; } else if (2 < K && K <= 7) { out = 2; } else { long K1 = Long.valueOf(input) - 5; long M1 = Math.max(K1/11,-1) + 1; long L1 = Long.MIN_VALUE; L1 = M1 * 2 + 1; long K2 = Long.valueOf(input) - 6; long L2 = Long.MIN_VALUE; long M2 = Math.max(K2/11,-1) + 1; L2 = M2 * 2 + 1; out = Math.min(L1, L2); } System.out.print(out); } }
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(); } catch (IOException e) { } long out = 0; long K = Long.valueOf(input); if (K == 1) { out = 1; } else if (2 < K && K <= 7) { out = 2; } else { long K1 = Long.valueOf(input) - 1; long M1 = Math.max(K1/11,-1) + 1; long L1 = Long.MIN_VALUE; L1 = M1 * 2 + 1; long K2 = Long.valueOf(input) - (1 + 5); long L2 = Long.MIN_VALUE; long M2 = Math.max(K2/11,-1) + 1; L2 = M2 * 2 + 2; long K3 = Long.valueOf(input) - (1 + 6); long M3 = Math.max(K3/11,-1) + 1; long L3 = M3 * 2 + 1; out = Math.min(Math.min(L1, L2), L3); } System.out.print(out); } }
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 an identifier 20 |   | ^ a.cc: In function 'int main()': a.cc:7:1: error: '\U000000a0' was not declared in this scope 7 |   | ^ a.cc:11:9: error: 'else' without a previous 'if' 11 | else if (x % 11 <= 6) { | ^~~~ a.cc:17:2: error: expected ';' before '\U000000a0' 17 |   | ^ | ; 18 |   | ~ a.cc:20:2: error: expected ';' before 'return' 20 |   | ^ | ; 21 | return 0; | ~~~~~~
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> #include <queue> #include <complex> #include <set> #include <map> #include <stack> #include <list> #include <cassert>//assert(); #include <fstream> ///////// #define REP(i, x, n) for(int i = x; i < n; i++) #define rep(i,n) REP(i,0,n) ///////// typedef long long LL; typedef long double LD; typedef unsigned long long ULL; #define PII pair<int,int> ///////// using namespace::std; // 最大公約数 template<class T> inline T gcd(T a, T b){return b == 0 ? a : gcd(b, a % b);} // 最小公倍数 template<class T> inline T lcm(T a, T b){return a * b / gcd(a, b);} //////////////////////////////// inline void solve(){ ULL X; cin >> X; ULL Q,R; Q = X/11; R = X%11; ULL ANS; if( R > 6 ){ ANS = 2; }else if( R > 0{ ANS = 1; } ANS += Q*2; cout << ANS; } int main(void){ std::cin.tie(0); std::ios::sync_with_stdio(false); std::cout << std::fixed;//小数を10進数表示 cout << setprecision(16);//小数をいっぱい表示する。16? solve(); return 0; }
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:60:17: note: to match this '(' 60 | }else if( R > 0{ | ^
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 += 1; } System.out.println(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 += 1; } System.out.println(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 >= 0;i--) #define FOR(i, m, n) for(int i = m;i < n;i++) #define INF 999999999; #define atcoder 1000000007; using namespace std; int main(){ int N, a, max = 0, cnt = 0, ans = 0; int A[100000] = { 0 }; cin >> N; REP(i, N) { cin >> a; A[a]++; if (max < a) max = a; } REP(i, max) { if (A[i] > 1) { cnt++; ans += A[i] - 1; } } if (ans % 2 == 0) { cout << N - ans << endl; } else cout << N - ans - 1 << endl; system("pause"); return 0; } int main() { long long int x, ans = 0; cin >> x; if (x % 11 == 0) { ans = 2 * (x / 11); } else { if (x % 11 <= 6) ans += 1; else ans += 2; } cout << ans << endl; return 0; }
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; } } System.out.println(result); } }
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; did you mean 'ans'? 12 | else if(n%11!=0) ans = anss+2; | ^~~~ | ans
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 not declared in this scope; did you mean 'ans'? 10 | if(n% 11 == 0) ans = anss; | ^~~~ | ans a.cc:11:32: error: 'anss' was not declared in this scope; did you mean 'ans'? 11 | else if(n%11 <= 6) ans = anss+1; | ^~~~ | ans a.cc:12:19: error: 'anss' was not declared in this scope; did you mean 'ans'? 12 | else ans = anss+2; | ^~~~ | ans
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; i < (int)(N); i++) #define rrep(i, N) for (int i = N - 1; i >= 0; i--) #define REP(i, init, N) for (int i = (init); i < (int)(N); i++) #define RREP(i, N, last) for (int i = (init - 1); i >= last; i--) #define PB push_back using namespace std; typedef long long LL; typedef unsigned long long ULL; typedef vector<int> VI; typedef vector<VI > VVi; typedef vector<string> VS; typedef vector<LL> VLL; typedef pair<int,int> PII; const int INF = 0x3f3f3f3f; const LL INFL = 0x3f3f3f3f3f3f3f3fLL; const double DINF = 0x3f3f3f3f; int main(){ ios::sync_with_stdio(false); long long x,p,t; cin>>x; p=x/11; if(x%11==0){ cout<<p<<endl; } else if(x%11<=6){cout<<p+1<<endl;} else cout<<p+2<<endl; return 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 a type 21 | typedef vector<VI > VVi; | ^~~~~~ a.cc:22:9: error: 'vector' does not name a type 22 | typedef vector<string> VS; | ^~~~~~ a.cc:23:9: error: 'vector' does not name a type 23 | typedef vector<LL> VLL; | ^~~~~~ a.cc:24:9: error: 'pair' does not name a type 24 | typedef pair<int,int> PII; | ^~~~ a.cc: In function 'int main()': a.cc:31:9: error: 'ios' has not been declared 31 | ios::sync_with_stdio(false); | ^~~ a.cc:33:1: error: 'cin' was not declared in this scope 33 | cin>>x; | ^~~ a.cc:36:1: error: 'cout' was not declared in this scope 36 | cout<<p<<endl; | ^~~~ a.cc:36:10: error: 'endl' was not declared in this scope 36 | cout<<p<<endl; | ^~~~ a.cc:38:18: error: 'cout' was not declared in this scope 38 | else if(x%11<=6){cout<<p+1<<endl;} | ^~~~ a.cc:38:29: error: 'endl' was not declared in this scope 38 | else if(x%11<=6){cout<<p+1<<endl;} | ^~~~ a.cc:40:1: error: 'cout' was not declared in this scope 40 | cout<<p+2<<endl; | ^~~~ a.cc:40:12: error: 'endl' was not declared in this scope 40 | cout<<p+2<<endl; | ^~~~
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 >= 0;i--) #define FOR(i, m, n) for(int i = m;i < n;i++) #define INF 999999999; #define atcoder 1000000007; using namespace std; int main(){ int N, a, max = 0, cnt = 0, ans = 0; int A[100000] = { 0 }; cin >> N; REP(i, N) { cin >> a; A[a]++; if (max < a) max = a; } REP(i, max) { if (A[i] > 1) { cnt++; ans += A[i] - 1; } } if (ans % 2 == 0) { cout << N - ans << endl; } else cout << N - ans - 1 << endl; system("pause"); return 0; } int main() { long long int x, ans = 0; cin >> x; if (x <= 6) { ans = 1; } else if (x <= 11) { ans = 2; } else { ans = 2 * (x / 11); if (x % 11 != 0) { ans++; } } cout << ans << endl; return 0; }
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<<endl; } return 0; }
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 included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:18:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 18 | cout<<ans<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:18:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 18 | cout<<ans<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
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 << ans << endl; return 0; }
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' +++ |+#include <stdio.h> 1 | int main(void){long long int a,b,ans;scanf("%lld",&a); main.c:1:38: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | int main(void){long long int a,b,ans;scanf("%lld",&a); | ^~~~~ main.c:1:38: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:2:13: error: expected ';' before 'a' 2 | ans=(a-5%11)a*2/11:(a-5)*2/11+1; | ^ | ; main.c:3:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 3 | printf("%lld\n",ans);return 0;} | ^~~~~~ main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:3:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'printf'
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; unsigned long long res; unsigned long double tmp = n / 11.0 * 2.0; res = (unsigned long long)ceil(tmp); if (n == 6) printf("%d\n", 1); else printf("%lld\n", res); return 0; }
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; return 0; }
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; | ^~~~ | ; a.cc:12:7: error: expected ';' before 'rem' 12 | ll rem = x % mod; | ^~~~ | ; a.cc:13:7: error: expected ';' before 'div' 13 | ll div = x / mod; | ^~~~ | ; a.cc:15:5: error: 'div' was not declared in this scope 15 | div *= 2; | ^~~ a.cc:17:9: error: 'rem' was not declared in this scope 17 | if (rem <= 6) div += 1; | ^~~
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(~scanf("%I64d",&a)) | ^ a.cc:10:12: error: expected ';' before 'output' 10 | ll output=a/11*2; | ^~~~~~ a.cc:12:23: error: 'output' was not declared in this scope 12 | if(a>=1&&a<=5)output++; | ^~~~~~ a.cc:13:24: error: 'output' was not declared in this scope 13 | if(a>=6&&a<=10)output+=2; | ^~~~~~ a.cc:14:26: error: 'output' was not declared in this scope 14 | printf("%I64d\n",output); | ^~~~~~
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; while(index < n) { if (isRemaining) { a[index + 1] = a[index]; a[index] = 0; isRemaining = false; index++; continue; } if(index < n - 1 && a[index + 1] == a[index]) { a[index] = 0; isRemaining = true; } index++; } // System.out.println(Arrays.toString(a)); int count = 0; for (int i = 0; i < n; i++) { if(a[i] != 0) { count++; } } System.out.println(count); } }
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) != -1) { minIndex = getSameCardIndex(a); if(a.size() == minIndex + 2) { minIndex--; } a.remove(minIndex); a.remove(minIndex + 1); } System.out.println(a.size()); } private static int getSameCardIndex(ArrayList<Integer> a) { int prev = a.get(0); for(int i = 1; i < a.size(); i++) { if(a.get(i).equals(prev)) { return i - 1; } prev = a.get(i); } return -1; } }
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 Main Main.java:5: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:7: error: cannot find symbol ArrayList<Integer> a = new ArrayList<Integer>(); ^ symbol: class ArrayList location: class Main Main.java:7: error: cannot find symbol ArrayList<Integer> a = new ArrayList<Integer>(); ^ symbol: class ArrayList location: class Main Main.java:13: error: cannot find symbol Collections.sort(a); ^ symbol: variable Collections location: class Main 6 errors
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 < (int)(n); i++) #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() #define pcnt(bit) __builtin_popcountll(bit) template<class T> bool chmax(T &a, const T &b) {if (a < b) {a = b; return 1;} return 0;} template<class T> bool chmin(T &a, const T &b) {if (b < a) {a = b; return 1;} return 0;} const int dx[4] = {1, 0, -1, 0}; const int dy[4] = {0, 1, 0, -1}; const int dx2[8] = {0, 1, 0, -1, 1, 1,-1, -1}; const int dy2[8] = {1, 0,-1, 0, 1, -1, 1, -1}; const long double pi = acos(-1.0); const int MAX = 1000010; const int INF = 1LL << 60; const int MOD = 1000000007; // const int MOD = 998244353; signed main() { cin.tie(0); ios_base::sync_with_stdio(false); int n; cin >> n; vector<int> v(n); rep(i,n) cin >> v[i]; sort(all(v)); v.erase(unique(all(v)), a.end()); cout << ((v.size() % 2) ? v.size() : v.size() - 1) << endl; return 0; }
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 #define MT make_tuple //tie,make_tuple は別物 #define PB push_back #define PF push_front #define all(x) (x).begin(),(x).end() using namespace std; typedef long long ll; typedef vector<ll> v; typedef vector<vector<ll>> vv; int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; int main(){ ll N; cin>>N; v A(N); rep(i,0,N)cin>>A[i]; sort(all(A)); ll sum =0; rep(i,1,N){ if(A[i] == A[i-a1])sum++; } if(sum%2 == 1)sum++; cout<<N-sum; return 0; }
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 cout << ' ' #define in(n) cin >> n #define in2(n, m) cin >> n >> m #define in3(n, m, l) cin >> n >> m >> l #define out(n) cout << n const ll mei = (ll)1e9 + 7; int main(){ ll a, b, s, n; in(n); vector<ll> c(n, 0); rep(i, n){ in(a); c[a]++; } sort(all(c)); a = c[n - 1]; b = 0; rep(i, n) b = b + max(c[i] - 1, 0); if(a * 2 >= b) s = a; else s = (b + 1) / 2; out(s); memi; }
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, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)' 257 | max(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:257:5: note: template argument deduction/substitution failed: a.cc:29:16: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int') 29 | b = b + max(c[i] - 1, 0); | ~~~^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)' 303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 2 provided In file included from /usr/include/c++/14/algorithm:61: /usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)' 5706 | max(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate expects 1 argument, 2 provided /usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)' 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5716:5: note: template argument deduction/substitution failed: a.cc:29:16: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int' 29 | b = b + max(c[i] - 1, 0); | ~~~^~~~~~~~~~~~~
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; } return 0; }
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;i<=n;i++){ cin>>a[i]; cishu[a[i]]++; if(a[i]>=sum){ sum=a[i]; } } f(); return 0; }
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 | } | ~