submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s669037408
p01935
C++
#include<iomanip> #include<limits> #include<thread> #include<utility> #include<iostream> #include<string> #include<algorithm> #include<set> #include<map> #include<vector> #include<stack> #include<queue> #include<cmath> #include<numeric> #include<cassert> #include<random> #include<chrono> #include<unordered_set> #includ...
a.cc: In member function 'void Fordfulkerson::add_edge2(int, int, int)': a.cc:73:38: error: return-statement with a value, in function returning 'void' [-fpermissive] 73 | return {from,G[from].size()-1}; | ^
s408595807
p01935
C++
#include <bits/stdc++.h> #define REP(i, a, n) for(ll i = ((ll) a); i < ((ll) n); i++) #define INF (1LL << 60) #define MAX_V 5000 using namespace std; typedef long long ll; typedef pair<ll, ll> pll; struct edge { ll to, cap, rev; }; vector<edge> G[MAX_V]; bool used[MAX_V]; void add_edge(ll from, ll to, ll cap) { G[...
a.cc: In function 'int main()': a.cc:75:18: error: invalid types 'll {aka long long int}[ll {aka long long int}]' for array subscript 75 | ll t = G[s][t[i].second].to; | ^
s237279170
p01937
Java
import java.io.*; import java.util.*; /** * AIZU ONLINE JUDGE * 2837 Cryptex * 2018/02/17 */ public class Main { int N; int M; int[] T; int nidx; // 負になる場所 // 単純最小値(2倍)を返す int min() { int sum1 = 0; int sum2 = 0; int max1 = 0; int max2 = 0; for(...
Main.java:185: error: cannot find symbol static Main4 instance = new Main4(); ^ symbol: class Main4 location: class Main Main.java:185: error: cannot find symbol static Main4 instance = new Main4(); ^ symbol: class Main4 location: class Main 2 errors
s589115809
p01938
C++
#include <stdio.h> #include <string.h> int main(void) { char s[110], ans = 0; scanf("%s", s); if(s[0] == 'A') ans = 1; for(i = 1; i < strlen(s); ++i) { if(s[i] == 'A' || s[i] < s[i - 1]) ++ans; } printf("%d\n",ans); return 0; }
a.cc: In function 'int main()': a.cc:8:7: error: 'i' was not declared in this scope 8 | for(i = 1; i < strlen(s); ++i) { | ^
s458376112
p01939
C++
typedef long long ll; typedef long double ld; #define INF 1LL<<60 ld lginf = -1; ll mul(ll a, ll b) { if (lginf < 0) lginf = log10l(INF); ld aa = log10l(a), bb = log10l(b); if (lginf <= aa + bb) return INF; return a * b; } ll N, M; int mod = 1000000007; //----------------------------------------------------...
a.cc: In function 'll mul(ll, ll)': a.cc:6:28: error: 'log10l' was not declared in this scope 6 | if (lginf < 0) lginf = log10l(INF); ld aa = log10l(a), bb = log10l(b); | ^~~~~~ a.cc:6:49: error: 'log10l' was not declared in this scope 6 | if (lginf < 0) lginf = log10l(I...
s036544445
p01939
C++
package practice; import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String args[]){ int MOD = 1000000007; Scanner sc = new Scanner(System.in); Long first_N = sc.nextLong(); Long first_M = sc.nextLong(); Long first_limit; if(first_N == 1){ System.ou...
a.cc:1:1: error: 'package' does not name a type 1 | package practice; | ^~~~~~~ a.cc:3:1: error: 'import' does not name a type 3 | import java.math.BigInteger; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: 'import' does not name a type 4 | import jav...
s148634504
p01939
C++
import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String args[]){ int MOD = 1000000007; Scanner sc = new Scanner(System.in); Long first_N = sc.nextLong(); Long first_M = sc.nextLong(); Long first_limit; if(first_N == 1){ System.out.println((first_M+...
a.cc:1:1: error: 'import' does not name a type 1 | import java.math.BigInteger; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodul...
s016309606
p01940
C++
de <iostream> #include <vector> #include <tuple> #include <string> using namespace std; int main(void){ string S; string P; cin >> S; cin >> P; int search = 0; int count = 0; bool finish = false; vector<tuple<int, int>> st; for(int ptr = 0 ; !finish ; ptr++){ if( S[ptr] == P[search] ){ i...
a.cc:1:1: error: 'de' does not name a type 1 | de <iostream> | ^~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/vector:62, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null...
s096572293
p01940
C++
#include <iostream> #include < #include <string> #include <vector> #include <string.h> using namespace std; int main(void) { string T, P; cin >> T; cin >> P; int array[P.size()]; int pos = 0; bool flag = true; for (int i = 0; i < P.size(); i++) array[i] = 0; #ifdef DEBUG for (int i = 0; i < P.size(); i++) ...
a.cc:2:11: error: missing terminating > character 2 | #include < | ^ a.cc:2:10: error: empty filename in #include 2 | #include < | ^
s747273001
p01953
C++
#include<bits/stdc++.h> using namespace std; typedef long long int64; struct BinaryIndexedTree { vector< int64 > data; BinaryIndexedTree(int sz) : data(++sz, 0) {} int64 sum(int k) { int64 ret = 0; for(++k; k > 0; k -= k & -k) { ret += data[k]; } return (ret); } void add(...
a.cc: In function 'int main()': a.cc:145:10: error: expected primary-expression at end of input 145 | cout << | ^ a.cc:145:10: error: expected '}' at end of input a.cc:115:1: note: to match this '{' 115 | { | ^
s865550230
p01957
C++
#include<iostream> #include<string> #include<map> #include<set> #define r(i,n) for(int i=0;i<n;i++) using namespace std; string s; int n,flag,x; char c; map<char,int>m; int make_tree(int l,int r,int depth){ if((r-l)==3){ if(m[s[l+1]]&&m[s[r-1]])flag++; return max(m[s[l+1]],m[s[r-1]])-1; } else{ int f=...
a.cc: In function 'int make_tree(int, int, int)': a.cc:17:21: error: cannot convert '__complex__ int' to 'int' in initialization 17 | int f=0,le=0,ri=0i; | ^~
s030652356
p01957
C++
#include<bits/stdc++.h> #define r(i,n) for(int i=0;i<n;i++) using namespace std; string s; int n,flag,x; char c; map<char,int>m; int make_tree(int l,int r,int depth){ if((r-l)==3){ if(m[s[l+1]]&&m[s[r-1]])flag++; return max(m[s[l+1]],m[s[r-1]])-1; } else{ int f=0,le=0,ri=0i; for(int i=l+1;i<=r;i++...
a.cc: In function 'int make_tree(int, int, int)': a.cc:14:21: error: cannot convert 'std::complex<double>' to 'int' in initialization 14 | int f=0,le=0,ri=0i; | ^~ | | | std::complex<double>
s828963202
p01959
Java
package s; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class BrokenDoor { public static void main(String[] args) { new DataSet(); } static class DataSet { Scanner scan = new Scanner(System.in); int cityNum; int roadNum; int start; int finish; ArrayList<In...
Main.java:7: error: class BrokenDoor is public, should be declared in a file named BrokenDoor.java public class BrokenDoor ^ Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
s370654907
p01959
Java
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class BrokenDoor { public static void main(String[] args) { new DataSet(); } static class DataSet { Scanner scan = new Scanner(System.in); int cityNum; int roadNum; int start; int finish; ArrayList<Integer>[] ci...
Main.java:6: error: class BrokenDoor is public, should be declared in a file named BrokenDoor.java public class BrokenDoor ^ Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
s584164245
p01959
Java
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class BrokenDoor { public static void main(String[] args) { new DataSet(); } static class DataSet { Scanner scan = new Scanner(System.in); int cityNum; int roadNum; int start; int finish; ArrayList<Integer>[] ci...
Main.java:6: error: class BrokenDoor is public, should be declared in a file named BrokenDoor.java public class BrokenDoor ^ 1 error
s625008077
p01967
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; import static java.lang.Integer.parseInt; /** * Many Kinds of Apples */ public class P2867 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new Inp...
Main.java:11: error: class P2867 is public, should be declared in a file named P2867.java public class P2867 { ^ 1 error
s859738383
p01967
C++
import std.stdio; import std.algorithm; import std.array; import std.conv; import std.string; void main() { int N = readln.chomp.to!int; auto c = readln.chomp.split.map!(to!int).array; int Q = readln.chomp.to!int; bool flag = true; int[] apple = new int[](N); for (int i = 0; i < Q; i++) { ...
a.cc:1:1: error: 'import' does not name a type 1 | import std.stdio; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import std.algorithm; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1...
s951153847
p01967
C++
#include <bits/stdc++.h> using namespace std; #define all(c) (c).begin(), (c).end() #define rep(i, n) for (int i = 0; i < (int)(n); i++) int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; constexpr int Q_MAX = 1000006; bool is_prime[Q_MAX]; void init() { rep(i, Q_MAX) is_prime[i] = true; is_prime[0] = is...
a.cc: In function 'int main()': a.cc:24:13: error: 'cnt' was not declared in this scope; did you mean 'int'? 24 | cout << cnt << endl; | ^~~ | int
s608928904
p01967
C++
struct FordFulkerson{ struct Edge { int to,cap,rev; Edge(int to=0,int cap=0,int rev=0) : to(to),cap(cap),rev(rev){} }; int V; vector<vector<Edge> > G; vector<bool> used; FordFulkerson(int V) : V(V) { G.resize(V); used.assign(V,false); } vo...
a.cc:9:5: error: 'vector' does not name a type 9 | vector<vector<Edge> > G; | ^~~~~~ a.cc:10:5: error: 'vector' does not name a type 10 | vector<bool> used; | ^~~~~~ a.cc: In constructor 'FordFulkerson::FordFulkerson(int)': a.cc:13:9: error: 'G' was not declared in this scope 13 | ...
s603159468
p01967
C++
https://github.com/odanado/ProconLib/blob/master/DataStructure/StarrySkyTree.cpp
a.cc:1:1: error: 'https' does not name a type 1 | https://github.com/odanado/ProconLib/blob/master/DataStructure/StarrySkyTree.cpp | ^~~~~
s010362285
p01967
C++
#include <bits/stdc++.h> #define GET_MACRO(_1,_2,_3,_4,_5,NAME,...) NAME #define pr(...) GET_MACRO(__VA_ARGS__,pr5,pr4,pr3,pr2,pr1)(__VA_ARGS__) #define pr1(a) (#a)<<"="<<(a) #define pr2(a,b) pr1(a)<<", "<<pr1(b) #define pr3(a,b,c) pr2(a,b)<<", "<<pr1(c) #define pr4(a,b,c,d) pr3(a,b,c)<<", "<<pr1(d) #define pr5(a,b,c,d...
a.cc:23:39: warning: use of 'auto' in template argument only available with '-fconcepts-ts' 23 | ostream& operator<<(ostream& o,vector<auto> &a){int i=0;for(auto t:a)o<<(i++?" ":"")<<t;return o;} | ^~~~ a.cc:24:39: warning: use of 'auto' in template argument only available...
s539963889
p01967
C++
#include<iostream> using namespace std; int main(){ int n,c,q,t,x,d; cin>>n; for(int i=0;i<n;i++){ cin>>c[i]; } int q,t,x,d; cin>>q; for(int j=0;j<q;j++){ cin>>t>>x>>d; if(t==1){ if(c[x]<d)cout<<d-c[x];break; }else{ if(c[x]>d)cout<<c[x]...
a.cc: In function 'int main()': a.cc:7:15: error: invalid types 'int[int]' for array subscript 7 | cin>>c[i]; | ^ a.cc:9:9: error: redeclaration of 'int q' 9 | int q,t,x,d; | ^ a.cc:4:13: note: 'int q' previously declared here 4 | int n,c,q,t,x,d; | ...
s683553408
p01969
C++
テストケース23ってなーんだ?
a.cc:1:1: error: '\U000030c6\U000030b9\U000030c8\U000030b1\U000030fc\U000030b923\U00003063\U00003066\U0000306a\U000030fc\U00003093\U00003060\U0000ff1f' does not name a type 1 | テストケース23ってなーんだ? | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
s638728115
p01970
C++
#if 1 #include <iostream> #include <fstream> #include <string> #include <vector> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <queue> #include <stack> #include <array> #include <deque> #include <algorithm> #include <utility> #include <cstdint> #include <functional> #include ...
a.cc: In function 'RET combination(Integral, Integral)': a.cc:299:47: error: '\U00008981\U00007d20\U00006570' was not declared in this scope 299 | static const auto fact_v = fact_set_c<要素数 + 1>(); | ^~~~~~
s796976565
p01970
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define all(v) (v).begin(), (v).end() #define resz(v, ...) (v).clear(), (v).resize(__VA_ARGS__) #define reps(i, m, n) for(int i = (int)(m); i < (int)(n); i++) #define rep(i, n) reps(i, 0, n) template<class T1, class T2> void chmin(T1 &a, T2 b){if(a>...
a.cc: In function 'int main()': a.cc:52:59: error: 'a' was not declared in this scope 52 | if(!is_p[q[i]] && !is_p[q[i+1]]) flag = false;a | ^
s294726809
p01970
C++
using System; using System.Collections.Generic; using System.Linq; using System.IO; using System.Globalization; using System.Diagnostics; using Pair = System.Collections.Generic.KeyValuePair<int, int>; class Program { static void Main() { Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { ...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s720011573
p01970
C++
#include <bits/stdc++.h> using namespace std; void eratosthenes(int N, int* arr){ for(int i=0; i < N; i++){ arr[i] = 1; } for(int i=2; i < sqrt(N); i++){ if(arr[i]){ for(int j=0; i * (j + 2) < N; j++){ arr[i*(j+2)] = 0; } } } } int main(void){ const int NMAX = 100002; const...
a.cc:53:1: error: extended character 
 is not valid in an identifier 53 | 
 | ^ a.cc:53:1: error: '\U00002028' does not name a type 53 | 
 | ^
s468353584
p01971
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <cstring> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <list> #include <algorithm> #include <functional> #include <sstream> #include...
a.cc:95:20: error: 'int index [123456][2]' redeclared as different kind of entity 95 | int index[123456][2]; | ^ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from a.cc:7: /usr/include/strings.h:50:20: note: previous d...
s565985726
p01971
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll, ll> P; #define fi first #define se second #define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++) #define rep(i,n) repl(i,0,n) #define all(x) (x).begin(),(x).end() #define dbg(x) cout<<#x"="<<x<<endl #defi...
a.cc: In member function 'void StarrySkyTree::push(int, int, int)': a.cc:54:20: error: 'n' was not declared in this scope; did you mean 'yn'? 54 | int num=(min(n*2,r)-l)/2; | ^ | yn
s094814828
p01973
C++
#include<algorithm> #include<iostream> #include<vector> #include<queue> using namespace std; typedef long long lint; typedef vector<int>vi; typedef pair<int,int>pii; #define rep(i,n)for(int i=0;i<(int)(n);++i) using namespace std; #define all(a) (a).begin(), (a).end() // http://algoogle.hadrori.jp/algorithm/aho-cor...
a.cc: In constructor 'PMA::PMA()': a.cc:20:13: error: 'memset' was not declared in this scope 20 | PMA() { memset(next, 0, sizeof(next)); } | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<queue> +++ |...
s750815226
p01973
C++
#include <bits/stdc++.h> using namespace std; #define MAX_N 1000005 class RollingHash{ public: typedef unsigned long long ull; ull B = 1777771; //ハッシュ基数 int n; string s; vector<ull> hash; vector<ull> k; RollingHash(){}; RollingHash(string s):n(s.size()),s(s),hash(n+1),k(n+1){ for(int i=0;i<n;i++)...
a.cc: In function 'int main()': a.cc:225:5: error: 'f' was not declared in this scope 225 | f | ^
s882133164
p01973
C++
#include <stdio.h> #include <cmath> #include <algorithm> #include <cfloat> #include <stack> #include <queue> #include <vector> #include <string> #include <iostream> #include <set> #include <map> #include <time.h> typedef long long int ll; typedef unsigned long long int ull; #define BIG_NUM 2000000000 #define MOD 100000...
a.cc:44:5: warning: built-in function 'index' declared as non-function [-Wbuiltin-declaration-mismatch] 44 | int index = 1,table[128]; | ^~~~~ a.cc: In function 'int main()': a.cc:135:45: error: no match for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '__gnu_cx...
s786150657
p01974
C++
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> a(n); for (autp &i : a) cin >> i; for (int i = 0; i < n; ++i) { for (int j = i + 1; j < n; ++j) { if (abs(a[i] - a[j]) % (n - 1) == 0) { cout << a[i] << " " << a[j] << endl; return 0; } ...
a.cc: In function 'int main()': a.cc:9:8: error: 'autp' was not declared in this scope; did you mean 'auto'? 9 | for (autp &i : a) cin >> i; | ^~~~ | auto a.cc:9:16: error: found ':' in nested-name-specifier, expected '::' 9 | for (autp &i : a) cin >> i; | ^ ...
s213682834
p01975
C++
#include<bits/stdc++.h> #define vi vector<int> #define vvi vector<vector<int> > #define vl vector<ll> #define vvl vector<vector<ll>> #define vb vector<bool> #define vc vector<char> #define vs vector<string> using ll = long long; using ld =long double; #define int ll #define INF 1e9 #define EPS 0.0000000001 #define rep(...
a.cc: In function 'int main()': a.cc:45:47: error: invalid type argument of unary '*' (have 'long long int') 45 | for(auto itr:vvataarneiskitikuyarou)safe= *itr; | ^~~~
s384854587
p01975
C++
#include<bits/stdc++.h> #define vi vector<int> #define vvi vector<vector<int> > #define vl vector<ll> #define vvl vector<vector<ll>> #define vb vector<bool> #define vc vector<char> #define vs vector<string> using ll = long long; using ld =long double; #define int ll #define INF 1e9 #define EPS 0.0000000001 #define rep(...
a.cc: In function 'int main()': a.cc:47:75: error: expected ';' before '_' 47 | if(vvhasinntyokukaiwainotourist[vvataarne[i]])cout<<kitikuyarou[i]_; | ^ | ...
s521253068
p01976
C++
n = int(input()) a = list(map(int, input().split())) ans = '' t1, t2 = [], [] for i in range(n): t1.append(a[i]) t2.append(a[n-1-i]) if sorted(t1) == sorted(t2): ans += str(i+1) + ' ' print(ans[:-1])
a.cc:3:7: error: empty character constant 3 | ans = '' | ^~ a.cc:1:1: error: 'n' does not name a type 1 | n = int(input()) | ^
s528147255
p01976
C++
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.NoSuchElementException; import java.util.PriorityQueue; public class Main { public static void main(String[] args) { new Main().run(); } @SuppressWarnings("unc...
a.cc:14:9: error: stray '@' in program 14 | @SuppressWarnings("unchecked") | ^ a.cc:1:1: error: 'import' does not name a type 1 | import java.io.IOException; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2...
s716757667
p01976
C++
//座標圧縮して数えるだけ #include <iostream> #include <algorithm> #include <vector> using namespace std; void compress(vector<int> &a) { vector<int> sa; int i; for (i = 0; i < a.size(); i++) sa.push_back(a[i]); sort(sa.begin(), sa.end()); sa.erase(unique(sa.begin(), sa.end()), sa.end()); for (i = 0; i < a.size(); i++) a[i] ...
a.cc: In function 'void compress(std::vector<int>&)': a.cc:12:58: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} in assignment 12 | for (i = 0; i < a.size(); i++) a[i] = lower_bound(sa.begin(), sa....
s789286888
p01978
C++
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.NoSuchElementException; import java.util.PriorityQueue; public class Main implements Runnable { public static void main(String[] args) { new Thread(null, new Main...
a.cc:34:17: error: stray '@' in program 34 | @SuppressWarnings("unchecked") | ^ a.cc:1:1: error: 'import' does not name a type 1 | import java.io.IOException; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not ...
s198936239
p01978
C++
#include<bits/stdc++.h> #define int long long #define r(i,n) for(int i=0;i<n;i++) using namespace std; typedef pair<int,int>P; int d[100009]; int main(){ r(i,100009)d[i]=1e17; int n,m,s,t; cin>>n>>m>>s>>t; s--;t--; vector<P>v[100009]; r(i,m){ int a,b,c,w; cin>>a>>b>>c>>w;a--;b--;c--; v[a].push_back(P(b,w));...
cc1plus: error: '::main' must return 'int'
s092873353
p01979
C++
#include <bits/stdc++.h> #define GET_MACRO(_1,_2,_3,_4,_5,NAME,...) NAME #define pr(...) GET_MACRO(__VA_ARGS__,pr5,pr4,pr3,pr2,pr1)(__VA_ARGS__) #define pr1(a) (#a)<<"="<<(a) #define pr2(a,b) pr1(a)<<", "<<pr1(b) #define pr3(a,b,c) pr2(a,b)<<", "<<pr1(c) #define pr4(a,b,c,d) pr3(a,b,c)<<", "<<pr1(d) #define pr5(a,b,c,d...
a.cc:23:39: warning: use of 'auto' in template argument only available with '-fconcepts-ts' 23 | ostream& operator<<(ostream& o,vector<auto> &a){int i=0;for(auto t:a)o<<(i++?" ":"")<<t;return o;} | ^~~~ a.cc:24:39: warning: use of 'auto' in template argument only available...
s224016148
p01979
C++
#include <bits/stdc++.h> using namespace std; using ll = __int128; template<typename T> std::vector<T> table(int n, T v) { return std::vector<T>(n, v); } template <class... Args> auto table(int n, Args... args) { auto val = table(args...); return std::vector<decltype(val)>(n, std::move(val)); } ll solve(ll n) { ...
a.cc: In function 'll solve(ll)': a.cc:17:33: error: call of overloaded 'to_string(ll&)' is ambiguous 17 | const auto s = to_string(n); | ~~~~~~~~~^~~ In file included from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /...
s586628970
p01979
C++
#include <iostream> #include <fstream> #include <string> #include <cmath> #include <cstdlib> #include <ctime> #include <vector> #include <algorithm> #include <numeric> #include <map> #include <set> #include <stack> #include <queue> #include <deque> #include <functional> #include <cctype> #include <list> //#include <...
a.cc: In function 'long long int digit_dp(std::string)': a.cc:114:5: error: 'memset' was not declared in this scope 114 | memset(dp, 0, sizeof(dp)); | ^~~~~~ a.cc:18:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 17 | #include <list> +++ ...
s408417621
p01980
C++
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.Comparator; import java.util.NoSuchElementException; public class Main implements Runnable { public static void main(String[] args) { new Thread(null, new Main(), "", Runtime.getRuntime().ma...
a.cc:70:25: error: stray '@' in program 70 | @Override | ^ a.cc:1:1: error: 'import' does not name a type 1 | import java.io.IOException; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name ...
s938779882
p01980
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define all(x) (x).begin(),(x).end() #define pb push_back #define fi first #define se second #define dbg(x) cout<<#x" = "<<((x))<<endl template<class T,class U> ostream& operator<<(ostream& o, const pa...
a.cc:126:36: error: redefinition of 'template<class T, class U> std::ostream& operator<<(std::ostream&, const std::pair<_T1, _T2>&)' 126 | template<class T,class U> ostream& operator<<(ostream& o, const pair<T,U> &p){o<<"("<<p.fi<<","<<p.se<<")";return o;} | ^~~~~~~~ a.cc:10:3...
s044651732
p01981
Java
HEISEI 1 1 8 HEISEI 31 4 30 HEISEI 31 5 1 HEISEI 99 12 31 HEISEI 38 8 30 HEISEI 98 2 22 HEISEI 2 3 26 HEISEI 28 4 23 #
Main.java:1: error: class, interface, enum, or record expected HEISEI 1 1 8 ^ Main.java:9: error: illegal character: '#' # ^ 2 errors
s680470694
p01981
C++
#include<bits/stdc++.h> using namespace std; int main(){ while(1){ string s; cin >> s; if(s == "#") break; int y, m, d; cin >> y >> m >> d; string ans; if(y <= 30) ans = "HEISEI"; else if(y >= 32){ ans = "?"; y -= 30 } else{ ...
a.cc: In function 'int main()': a.cc:14:20: error: expected ';' before '}' token 14 | y -= 30 | ^ | ; 15 | } | ~
s990203686
p01981
C++
#include<bits/stdc++.h> using namespace std; int main(){ while(1){ string s; cin >> s; if(s == "#") break; int y, m, d; cin >> y >> m >> d; string ans; if(y <= 30) ans = "HEISEI"; else if(y >= 32){ ans = "?"; y -= 30 } else{ ...
a.cc: In function 'int main()': a.cc:14:20: error: expected ';' before '}' token 14 | y -= 30 | ^ | ; 15 | } | ~
s676534746
p01981
C++
#include<bits/stdc++.h> using namespace std; int main(){ while(1){ string s; cin >> s; if(s == "#") break; int y, m, d; cin >> y >> m >> d; string ans; if(y <= 30) ans = "HEISEI"; else if(y >= 32){ ans = "?"; y -= 30 } else{ ...
a.cc: In function 'int main()': a.cc:14:20: error: expected ';' before '}' token 14 | y -= 30 | ^ | ; 15 | } | ~
s402885545
p01981
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s481469519
p01981
C++
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <tuple> #include <vector> using namespace std; typedef long long int ll; typedef vector<int> vi; typedef vector<vi> vvi; #define INF (1e9) int main() { while(1){ string s; cin >> s; if (s=='#') break; ...
a.cc: In function 'int main()': a.cc:19:14: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 19 | if (s=='#') break; | ~^~~~~ | | | | | char | std::string {aka std::...
s319704276
p01981
C++
Beta paiza.IO Enter a title here Main.cpp Success 

 出力 入力 コメント 0 (0.00 sec) HEISEI 1 1 8 HEISEI 31 4 30 ? 1 5 1 ? 69 12 31 ? 8 8 30 ? 68 2 22 HEISEI 2 3 26 HEISEI 28 4 23
a.cc:9:1: error: extended character 
 is not valid in an identifier 9 | 

 | ^ a.cc:9:1: error: extended character 
 is not valid in an identifier a.cc:2:1: error: 'Beta' does not name a type 2 | Beta | ^~~~
s417627269
p01981
C++
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 1e9; const ll LINF = 1e18; template<class S,class T> ostream& operator << (ostream& out,const pair<S,T>& o){ out << "(" << o.first << "," << o.second << ")"; return out; } template<c...
a.cc: In function 'Type solve(Type)': a.cc:31:42: error: expected ')' before '{' token 31 | if(y <= 30 || (y == 31 && m <= 4){ | ~ ^ | ) a.cc:36:5: error: expected primary-expression before '}' token 36 | } ...
s088689183
p01982
Java
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; class Main{ public static void main(String[] args)throws IOException{ Scanner sc=new Sccanner(System.in); Str...
Main.java:12: error: cannot find symbol Scanner sc=new Sccanner(System.in); ^ symbol: class Scanner location: class Main Main.java:12: error: cannot find symbol Scanner sc=new Sccanner(System.in); ^ symbol: class Sccanner location: class Main Main.java:35: error: cannot fi...
s522210451
p01982
Java
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.*; class Main{ public static void main(String[] args)throws IOException{ Scanner sc=new Scanner(S...
Main.java:36: error: cannot find symbol abya[i]=Integer.parseInt(bfr.readLine()); ^ symbol: variable bfr location: class Main 1 error
s108145527
p01982
Java
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.*; class Main{ public static void main(String[] args)throws IOException{ Scanner sc=new Scanner(S...
Main.java:36: error: cannot find symbol abya[i]=Integer.parseInt(bfr.readLine()); ^ symbol: variable bfr location: class Main 1 error
s850843768
p01983
C++
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<sstream> #include<cstdio> #include<cstdlib> #include<cstring> #include<climits> #include<cmath> #include<string> #include<vector> #include<set> #include<map> #include<queue> #include<numeric> #include<functional> #include<algorithm> #include<bitset> #include<t...
a.cc:33:5: error: 'int index' redeclared as different kind of entity 33 | int index = 0; | ^~~~~ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from a.cc:6: /usr/include/strings.h:50:20: note: previous declaration 'const char* index(c...
s941776562
p01983
C++
#include<bits/stdc++.h> using namespace std; #define lp(i,n) for(int i=0;i<n;i++) int enzan(int num1,int num2,int clc){ int numa[4]; int numb[4]; int ans[4]; lp(i,4){ numa[i]=0; numb[i]=0; } if(num1>=8){ numa[0]=1; num1-=8; } if(num1>=4){ numa[1]=1; num1-=4; } if(num1>=2){ ...
a.cc: In function 'int change(std::string)': a.cc:121:10: error: 'mems' was not declared in this scope; did you mean 'memset'? 121 | if(mems==0) cout<<i<<endl; | ^~~~ | memset a.cc:121:25: error: 'i' was not declared in this scope 121 | if(mems==0) cout<<i<<endl; | ...
s362346054
p01983
C++
#include <iostream> #include <iomanip> #include <cstdio> #include <string> #include <cstring> #include <deque> #include <list> #include <queue> #include <stack> #include <vector> #include <utility> #include <algorithm> #include <map> #include <set> #include <complex> #include <cmath> #include <limits> #include <cfloat>...
a.cc: In function 'long long int f(char, char, char, char, long long int, long long int)': a.cc:78:20: error: expected ';' before 'return' 78 | else(op == '^') return x ^ y; | ^~~~~~~ | ;
s680615246
p01983
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 (i, 0, n) #define ALL(v) (v).begin(), (v).end() #define fi first #define se second template <typename A, typename B> inline bool chmax(A &a, B b) {if (a < b) {a = b; return 1;} return 0;} template <t...
a.cc:21:9: error: ISO C++ forbids declaration of 'SystaxAnalysis' with no type [-fpermissive] 21 | SystaxAnalysis() {} | ^~~~~~~~~~~~~~ a.cc: In member function 'int SyntaxAnalysis::SystaxAnalysis()': a.cc:21:27: warning: no return statement in function returning non-void [-Wreturn-type] 21 ...
s397956334
p01983
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 (i, 0, n) #define ALL(v) (v).begin(), (v).end() #define fi first #define se second template <typename A, typename B> inline bool chmax(A &a, B b) {if (a < b) {a = b; return 1;} return 0;} template <t...
a.cc:21:9: error: ISO C++ forbids declaration of 'SystaxAnalysis' with no type [-fpermissive] 21 | SystaxAnalysis() {} | ^~~~~~~~~~~~~~ a.cc: In member function 'int SyntaxAnalysis::SystaxAnalysis()': a.cc:21:27: warning: no return statement in function returning non-void [-Wreturn-type] 21 ...
s539167746
p01984
C++
#if 1 #include <iostream> #include <fstream> #include <string> #include <vector> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <queue> #include <stack> #include <array> #include <deque> #include <algorithm> #include <utility> #include <cstdint> #include <functional> #include ...
a.cc: In function 'int main()': a.cc:79:17: error: 'memset' was not declared in this scope 79 | memset(dp, -1, sizeof(dp)); | ^~~~~~ a.cc:24:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 23 | #include <list> +++ ...
s630926691
p01986
C++
//#include <bits/stdc++.h> #include <cstdio> #include <iostream> #include <cmath> using namespace std; #define SIZE 1000010 typedef long double ld; typedef long long ll; ll sum[SIZE] = {}; int a[SIZE], x[SIZE], p; bool check(int n, const ll sum[], int p, ll x){ ll l = 0, r = n; // [l,r) for(int i=0;i<n;i++)...
a.cc: In function 'bool solve()': a.cc:46:3: error: 'memset' was not declared in this scope 46 | memset(sum, 0, sizeof(sum)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <cmath> +++ |+#include <cstring> 5...
s633956969
p02001
C++
int main(int, char**) { int dummy = 0; std::cin >> dummy; std::string buff_s; std::string buff_t; std::cin >> buff_s >> buff_t; int place1_s = 0; int place2_s = 0; int place1_t = 0; auto search = [](const std::string& str, const int start, const int delta)->int { for (int index = start; str.length() > ind...
a.cc: In function 'int main(int, char**)': a.cc:4:14: error: 'cin' is not a member of 'std' 4 | std::cin >> dummy; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | int main(int,...
s824545143
p02016
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s126479117
p02016
C++
#include <string> #include <iostream> #include <math.h> #include <algorithm> #include <vector> #include <iomanip> #include <map> #include <set> typedef long long ll; const int mod=1e9+7; #define lol(i,n) for(int i=0;i<n;i++) using namespace std; string n; int main() { cin >>n; if(n="ani")cout <<"square1001"<< ...
a.cc: In function 'int main()': a.cc:17:9: error: could not convert 'n.std::__cxx11::basic_string<char>::operator=(((const char*)"ani"))' from 'std::__cxx11::basic_string<char>' to 'bool' 17 | if(n="ani")cout <<"square1001"<< endl; | ~^~~~~~ | | | std::__cxx11::basic_stri...
s153596556
p02016
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s126227488
p02017
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c,d; cin>>a>>b>>>>c>>d; if(a*b%2&&(c+d)%2){ cout<<"No"<<endl; } else{ cout<<"Yes"<<endl; } }
a.cc: In function 'int main()': a.cc:6:20: error: expected primary-expression before '>>' token 6 | cin>>a>>b>>>>c>>d; | ^~
s282491802
p02017
C++
var input = require('fs').readFileSync('/dev/stdin', 'utf8'); var [a,b,c,d] = input.trim().split(" ").map(Number); if((a*b+1)%2==0 && (a+b+1)%2)console.log("No"); else console.log("Yes");
a.cc:1:21: warning: multi-character character constant [-Wmultichar] 1 | var input = require('fs').readFileSync('/dev/stdin', 'utf8'); | ^~~~ a.cc:1:40: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes 1 | var input = require('fs').readFileSync('/dev/st...
s290627401
p02018
C++
#include <iostream> using namespace std; int h,w,x=0; int main(){ cin>>h; for(i=0;i<h;i++){cin<<w;if(w%2==0)x++;} cout<<x<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'i' was not declared in this scope 6 | for(i=0;i<h;i++){cin<<w;if(w%2==0)x++;} | ^ a.cc:6:25: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 6 | for(i=0;i<h;i++){cin<<w;if(w%2==...
s088951560
p02018
C++
#include <iostream> using namespace std; int h,w,x=0; int main(){ cin>>h; for(i=0;i<h;i++){cin<<w;if(w%2==0)x++;} cout<<x<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'i' was not declared in this scope 6 | for(i=0;i<h;i++){cin<<w;if(w%2==0)x++;} | ^ a.cc:6:25: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 6 | for(i=0;i<h;i++){cin<<w;if(w%2==...
s837503499
p02018
C++
#include <iostream> using namespace std; int h,w,x=0; int main(){ cin>>h; for(i=0;i<h;i++){cin<<w;if(w%2==0)x++;} cout<<x<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'i' was not declared in this scope 6 | for(i=0;i<h;i++){cin<<w;if(w%2==0)x++;} | ^ a.cc:6:25: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 6 | for(i=0;i<h;i++){cin<<w;if(w%2==...
s981951742
p02018
C++
#include <iostream> using namespace std; int h,w,x=0; int main(){ cin>>h; for(i=0;i<h;i++){cin<<w;if(w%2==0)x++;} cout<<x<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: 'i' was not declared in this scope 6 | for(i=0;i<h;i++){cin<<w;if(w%2==0)x++;} | ^ a.cc:6:25: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 6 | for(i=0;i<h;i++){cin<<w;if(w%2==...
s608888601
p02018
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a; cin>>a; int c=0; for(int i=0;i<a;i++){ int b; cin>>b[i]; if(b[i]%2==0){ c++; } } cout<<c<<endl; }
a.cc: In function 'int main()': a.cc:10:23: error: invalid types 'int[int]' for array subscript 10 | cin>>b[i]; | ^ a.cc:11:21: error: invalid types 'int[int]' for array subscript 11 | if(b[i]%2==0){ | ^
s347678449
p02018
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a; cin>>a; int c=0; for(int i=0;i<a;i++){ int b; cin>>b[i]; if((b[i])%2==0){ c++; } } cout<<c<<endl; }
a.cc: In function 'int main()': a.cc:10:23: error: invalid types 'int[int]' for array subscript 10 | cin>>b[i]; | ^ a.cc:11:22: error: invalid types 'int[int]' for array subscript 11 | if((b[i])%2==0){ | ^
s180418020
p02018
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a; cin>>a; int c; for(int i=0;i<a;i++){ int b; cin>>b[i]; if(b[i]%2){ c++; } } cout<<c<<endl; }
a.cc: In function 'int main()': a.cc:10:23: error: invalid types 'int[int]' for array subscript 10 | cin>>b[i]; | ^ a.cc:11:21: error: invalid types 'int[int]' for array subscript 11 | if(b[i]%2){ | ^
s506053499
p02018
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a; cin>>a; int c; for(int i=0;i<a;i++){ int b; cin>>b[i]; if(b[i]%2){ c++; } } cout<<c<<endl; }
a.cc: In function 'int main()': a.cc:10:23: error: invalid types 'int[int]' for array subscript 10 | cin>>b[i]; | ^ a.cc:11:21: error: invalid types 'int[int]' for array subscript 11 | if(b[i]%2){ | ^
s043901424
p02018
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a; cin>>a; int c; for(int i=0;i<a;i++){ int b; cin>>b[i]; if(b[i]%2==0){ c++; } } cout<<c<<endl; }
a.cc: In function 'int main()': a.cc:10:23: error: invalid types 'int[int]' for array subscript 10 | cin>>b[i]; | ^ a.cc:11:21: error: invalid types 'int[int]' for array subscript 11 | if(b[i]%2==0){ | ^
s057720697
p02018
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a; cin>>a; int c=0; for(int i=0;i<a;i++){ int b; cin>>b[i]; if(b[i]%2==0){ c++; } } cout<<c<<endl; }
a.cc: In function 'int main()': a.cc:10:23: error: invalid types 'int[int]' for array subscript 10 | cin>>b[i]; | ^ a.cc:11:21: error: invalid types 'int[int]' for array subscript 11 | if(b[i]%2==0){ | ^
s016780927
p02018
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a; cin>>a; int c=0; for(int i=0;i<a;i++){ int b; cin>>b[i]; if(b[i]%2==0){ c++; } } cout<<c<<endl; }
a.cc: In function 'int main()': a.cc:10:23: error: invalid types 'int[int]' for array subscript 10 | cin>>b[i]; | ^ a.cc:11:21: error: invalid types 'int[int]' for array subscript 11 | if(b[i]%2==0){ | ^
s113951777
p02018
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a; cin>>a; int c=0; for(int i=0;i<a;i++){ cin>>a[i]; if(a[i]%2==0){ c++; } } cout<<c<<endl; }
a.cc: In function 'int main()': a.cc:9:23: error: invalid types 'int[int]' for array subscript 9 | cin>>a[i]; | ^ a.cc:10:21: error: invalid types 'int[int]' for array subscript 10 | if(a[i]%2==0){ | ^
s826669339
p02018
C++
N = int(input()) A = [int(x)%2 for x in input().split()] ans = N - sum(A) print(ans)
a.cc:1:1: error: 'N' does not name a type 1 | N = int(input()) | ^
s356235504
p02019
C++
#include <bits/stdc++.h> #define f(i,n) for(int i=0;i<(n);i++) #define P pair<int,int> #define mod 1000000007 #define S second #define F first #define int long long using namespace std; signed main(){ int a,b,c,d; in>>a>>b>>c>>d; cout<<a+d-b-c<<endl; return 0; }
a.cc: In function 'int main()': a.cc:12:9: error: 'in' was not declared in this scope; did you mean 'yn'? 12 | in>>a>>b>>c>>d; | ^~ | yn
s138012616
p02019
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s044382030
p02019
C++
#include<iostream> #include<string> #include<iomanip> #include<cmath> #include<vector> #include<algorithm> using namespace std; #define int long long #define rep(i,n) for(int i = 0; i < (n); i++) #define INF (long long)(1e18) #define MOD (int)(1e9+7) #define yn(f) ((f)?"Yes":"No") #define YN(f) ((f)?"YES":"NO") sig...
a.cc: In function 'int main()': a.cc:25:15: error: 'N' was not declared in this scope 25 | cout<<N-(a+b-c)<<endl; | ^
s896366941
p02019
C++
N, A, B, C = [int(x) for x in input().split()] ans = N - (A + B) + C print(ans)
a.cc:1:1: error: 'N' does not name a type 1 | N, A, B, C = [int(x) for x in input().split()] | ^
s780697197
p02020
C++
#include <bits/stdc++.h> #define all(vec) vec.begin(),vec.end() using namespace std; using ll=long long; using P=pair<ll,ll>; const ll INF=1LL<<30; const ll LINF=1LL<<61; const double eps=1e-9; const ll MOD=1e9+7; int main(){ int n;cin>>n; vector<int> a(n); int sum=0; for(int i=0;i<n;i++){ cin>>...
a.cc: In function 'int main()': a.cc:18:16: error: 'i' was not declared in this scope 18 | sort(all(a[i])); | ^ a.cc:2:18: note: in definition of macro 'all' 2 | #define all(vec) vec.begin(),vec.end() | ^~~
s884103716
p02020
C++
#include<iostream> #include<string> #include<iomanip> #include<cmath> #include<vector> #include<algorithm> using namespace std; #define int long long #define rep(i,n) for(int i = 0; i < (n); i++) #define INF (long long)(1e18) #define MOD (int)(1e9+7) #define yn(f) ((f)?"Yes":"No") #define YN(f) ((f)?"YES":"NO") sig...
a.cc: In function 'int main()': a.cc:26:22: error: 'A' was not declared in this scope 26 | cin>>A; | ^
s000096548
p02020
C++
#include <string> #include <iostream> #include <math.h> #include <algorithm> #include <vector> #include <iomanip> #include <map> #include <set> typedef long long ll; const int mod=1e9+7; #define lol(i,n) for(int i=0;i<n;i++) using namespace std; int n,a[110],s=0; int main() { cin >>n; lol(i,n){ cin << ...
a.cc: In function 'int main()': a.cc:18:13: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 18 | cin << a[i]<< endl; | ~~~ ^~ ~~~~ | | | | | int | std::istream {aka std::basi...
s524331472
p02020
C++
#include <iostream> using namespace std; int n,a,total=0,kisuusaisyou=101; int main(){ cin>>a; for(int i=0;i<a;i++){ cin>>n; if(kisuusaisyou>n&&n%2==1)kisuusaisyou=n; total+=n; } if(total%2=-1){cout<<(total-kisuusaisyou)/2<<endl; }else{ cout<<total/2<<end\\l; } return 0; }
a.cc:13:35: error: stray '\' in program 13 | cout<<total/2<<end\\l; | ^ a.cc:13:36: error: stray '\' in program 13 | cout<<total/2<<end\\l; | ^ a.cc: In function 'int main()': a.cc:11:25: error: lvalue...
s107326639
p02020
C++
#include <iostream> using namespace std; int n,a,total=0,kisuusaisyou=101; int main(){ cin>>a; for(int i=0;i<a;i++){ cin>>n; if(kisuusaisyou>n&&n%2==1)kisuusaisyou=n; total+=n; } if(total%2=-1){cout<<(total-kisuusaisyou)/2<<endl; }else{ cout<<total/2<<end\\l; } return 0; }
a.cc:13:35: error: stray '\' in program 13 | cout<<total/2<<end\\l; | ^ a.cc:13:36: error: stray '\' in program 13 | cout<<total/2<<end\\l; | ^ a.cc: In function 'int main()': a.cc:11:25: error: lvalue...
s887351228
p02020
C++
#include <iostream> using namespace std; int n,a,total=0,kisuusaisyou=101; int main(){ cin>>a; for(int i=0;i<a;i++){ cin>>n; if(kisuusaisyou>n&&n%2==1)kisuusaisyou=n; total+=n; } if(total%2=-1){cout<<(total-kisuusaisyou)/2<<endl; }else{ cout<<total/2<<end\\l; } return 0; }
a.cc:13:35: error: stray '\' in program 13 | cout<<total/2<<end\\l; | ^ a.cc:13:36: error: stray '\' in program 13 | cout<<total/2<<end\\l; | ^ a.cc: In function 'int main()': a.cc:11:25: error: lvalue...
s002523587
p02020
C++
#include <iostream> using namespace std; int n,a,total=0,kisuusaisyou=101; int main(){ cin>>a; for(int i=0;i<a;i++){ cin>>n; if(kisuusaisyou>n&&n%2==1)kisuusaisyou=n; total+=n; } if(total%2=-1){cout<<(total-kisuusaisyou)/2<<endl; }else{ cout<<total/2<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:25: error: lvalue required as left operand of assignment 11 | if(total%2=-1){cout<<(total-kisuusaisyou)/2<<endl; | ~~~~~^~
s631171173
p02020
C++
#include <iostream> using namespace std; int n,a,total=0,kisuusaisyou=101; int main(){ cin>>a; for(int i=0;i<a;i++){ cin>>n; if(kisuusaisyou>n&&n%2==1)kisuusaisyou=n; total+=n; } if(total%2==1){cout<<(total-kisuusaisyou)/2<<endl; }else{ cout<<total/2<<end\\l; } return 0; }
a.cc:13:35: error: stray '\' in program 13 | cout<<total/2<<end\\l; | ^ a.cc:13:36: error: stray '\' in program 13 | cout<<total/2<<end\\l; | ^ a.cc: In function 'int main()': a.cc:13:30: error: no mat...
s392591028
p02020
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s648479625
p02021
C++
gets;a=gets.split.map &:to_i;p [*1..100].select{|t|s=0;a.all?{|p|0<=s+=p-t}}.max
a.cc:1:34: error: too many decimal points in number 1 | gets;a=gets.split.map &:to_i;p [*1..100].select{|t|s=0;a.all?{|p|0<=s+=p-t}}.max | ^~~~~~ a.cc:1:1: error: 'gets' does not name a type 1 | gets;a=gets.split.map &:to_i;p [*1..100].select{|t|s=0;a.all?{|p|0<=s+=p-t}}.m...
s812053765
p02022
C++
#include <bits/stdc++.h> #define f(i,n) for(int i=0;i<(n);i++) #define P pair<int,int> #define mod 1000000007 #define S second #define F first #define int long long using namespace std; signed main(){ int a,b,c,x=0,y=0; cin>>a>>b; f(i,a){ cin>>c; x+=c; } f(i,b){ cin>>d; y+=d; } cout<<x*y<<endl; return 0...
a.cc: In function 'int main()': a.cc:17:22: error: 'd' was not declared in this scope 17 | cin>>d; | ^
s060720624
p02022
C++
#include <bits/stdc++.h> #define f(i,n) for(int i=0;i<(n);i++) #define P pair<int,int> #define mod 1000000007 #define S second #define F first #define int long long using namespace std; signed main(){ int a,b,c,x=0,y=0; cin>>a>>b; f(i,a){ cin>>c; x+=c; } f(i,b){ cin>>d; y+=d; } cout<<x*y<<endl; return 0...
a.cc: In function 'int main()': a.cc:17:22: error: 'd' was not declared in this scope 17 | cin>>d; | ^
s408681529
p02022
C++
n, m = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) print(sum(a)*sum(b))
a.cc:1:1: error: 'n' does not name a type 1 | n, m = map(int, input().split()) | ^
s003685135
p02022
C++
#include <bits/stdc++.h> using namespace std; int main(){ long long a,b; cin>>a>>b; int e=0; for(int i=0;i<a;i++){ long long c[100000]; cin>>c[i]; for(int j=0;j<b;j++){ long long d[100000]; cin>>d[j]; int l=i*j; int f[l] e+=f[l]; } } cout<<e<<endl; }
a.cc: In function 'int main()': a.cc:16:25: error: expected initializer before 'e' 16 | e+=f[l]; | ^