submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s805425050
p04040
C++
#include <bits/stdc++.h> // {{{ #define ARG4(_1, _2, _3, _4, ...) _4 #define rep(...) ARG4(__VA_ARGS__, FOR, REP)(__VA_ARGS__) #define REP(i, a) FOR(i, 0, a) #define FOR(i, a, b) for (int i = (a); i < (int)(b); ++i) #define rrep(...) ARG4(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__) #define RREP(i, a) RFOR(i, 0, a) #define R...
a.cc: In substitution of 'template<class T> using orliv::math::mod_internal::next_uint_t = typename orliv::math::mod_internal::next_uint::type [with T = long long unsigned int]': a.cc:118:3: required from 'Derived& orliv::math::mod_internal::ModBase<Derived, T>::operator*=(const Derived&) [with Derived = orliv::math:...
s314117969
p04040
C++
#include <bits/stdc++.h> // {{{ #define ARG4(_1, _2, _3, _4, ...) _4 #define rep(...) ARG4(__VA_ARGS__, FOR, REP)(__VA_ARGS__) #define REP(i, a) FOR(i, 0, a) #define FOR(i, a, b) for (int i = (a); i < (int)(b); ++i) #define rrep(...) ARG4(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__) #define RREP(i, a) RFOR(i, 0, a) #define R...
a.cc: In substitution of 'template<class T> using orliv::math::mod_internal::next_uint_t = typename orliv::math::mod_internal::next_uint::type [with T = long long unsigned int]': a.cc:118:3: required from 'Derived& orliv::math::mod_internal::ModBase<Derived, T>::operator*=(const Derived&) [with Derived = orliv::math:...
s569210313
p04040
Java
import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.StringTokenizer; public class IrohaAndGrid { static long[] fact = new long[300000]; static long mod = (long) 1e9 + 7; static long pow(long base, long ...
Main.java:8: error: class IrohaAndGrid is public, should be declared in a file named IrohaAndGrid.java public class IrohaAndGrid { ^ 1 error
s719294349
p04041
C++
#include<iostream> #include<cstdio> #include<cstring> using namespace std; int n,x,y,z; int end; int sum; long long dp[45][1<<18]; long long ans=1,mod=1e9+7; int main() { freopen("haiku.txt","r",stdin); scanf("%d%d%d%d",&n,&x,&y,&z); memset(dp,0,sizeof dp); end=1<<x+y+z-1; end=end|(1<<y+z-1); end=end|(1<<z-1);/...
a.cc: In function 'int main()': a.cc:17:9: error: reference to 'end' is ambiguous 17 | end=1<<x+y+z-1; | ^~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, ...
s088471702
p04041
Java
import java.io.*; import java.util.*; public class A { static int[][] memo; static int[] stages; static int MOD = (int) 1e9 + 7; static int dp(int idx, int msk) { if (check(msk)) return 0; if (idx == 0) return 1; if (memo[idx][msk] != -1) return memo[idx][msk]; int ans = 0; for (int d = 1; d...
Main.java:4: error: class A is public, should be declared in a file named A.java public class A { ^ Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
s296054452
p04041
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s743977413
p04041
C++
解けなかった 言われてみると当たり前...解けないとまずそう
a.cc:1:1: error: '\U000089e3\U00003051\U0000306a\U0000304b\U00003063\U0000305f' does not name a type 1 | 解けなかった | ^~~~~~~~~~~~
s628729005
p04041
C++
#include<bits/stdc++.h> using namespace std; typedef unsigned long long int ull; typedef long long int ll; typedef pair<ll,ll> pll; typedef long double D; typedef complex<D> P; #define F first #define S second const ll MOD=1000000007; //const ll MOD=998244353; template<typename T,typename U>istream & operator >> (istr...
a.cc: In function 'int main()': a.cc:25:1: error: '\U000077e5\U00003063\U00003066\U00003044\U0000308b\U0000306e\U00003067\U00005b9f\U00008ceaAC' was not declared in this scope 25 | 知っているので実質AC | ^~~~~~~~~~~~~~~~~~~~
s447087357
p04041
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define rep(i, n) for (ll i = 0; i < n; i++) #define FOR(i, a, b) for (ll i = a; i < b; i++) #define len(v) ll(v.size()) #define fi first #define se second template <class T> void cout_vec(const vector<T> &vec){ for(auto itr:v...
a.cc: In function 'int main()': a.cc:28:47: error: expected ')' before ';' token 28 | int ng=(1<<(x+y+z-1)|(1<<(y+z-1))|(1<<(z-1)); | ~ ^ | )
s665662041
p04041
C++
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.StringTokenizer; import java.io.PrintWriter; import java.util.Arrays; public class Main { static class Scanner { BufferedReader br; StringTokenizer tk=new St...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.BufferedReader; | ^~~~~~ 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.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fm...
s489363844
p04041
C++
#include <bits/stdc++.h> #define LL long long #define pow10 sndaslkknsda using namespace std; const int mod = 1000 * 1000 * 1000 + 7; int dp[41][4][7]; int W[41][15]; void add(int &a , int b) { a = a + b < mod ? a + b : a + b - mod; } int mult(int a , int b) { return (a * (LL)b) % mod; } int ways(int k , int n) { i...
a.cc: In function 'int main()': a.cc:54:131: error: too few arguments to function 'int mult(int, int)' 54 | add(ans , mult(pow10[n - w + x] , mult(ways(X[0] , y - x) , mult(ways(X[1] , z - y) , mult(ways(X[2] , w - z))))); | ...
s541605180
p04041
C++
#include <bits/stdc++.h> #define LL long long #define pow10 sndaslkknsda using namespace std; const int mod = 1000 * 1000 * 1000 + 7; int dp[41][4][7]; int W[41][15]; void add(int &a , int b) { a = a + b < mod ? a + b : a + b - mod; } int mult(int a , int b) { return (a * (LL)b) % mod; } int ways(int n , int k) { i...
a.cc: In function 'int main()': a.cc:54:86: error: invalid types 'int[int]' for array subscript 54 | add(ans , mult(pow10[n - w + x] , mult(ways(x[0] , y - x) , mult(ways(x[1] , z - y) , mult(ways(x[2] , w - z))))); | ...
s724999673
p04041
C++
#include <bits/stdc++.h> #define LL long long using namespace std; const int mod = 1000 * 1000 * 1000 + 7; int dp[41][4][7]; int W[41][15]; void add(int &a , int b) { a = a + b < mod ? a + b : a + b - mod; } int mult(int a , int b) { return (a * (LL)b) % mod; } int ways(int n , int k) { if(k < 0) { return 0; }...
a.cc:32:5: warning: built-in function 'pow10' declared as non-function [-Wbuiltin-declaration-mismatch] 32 | int pow10[45]; | ^~~~~ a.cc: In function 'int main()': a.cc:53:86: error: invalid types 'int[int]' for array subscript 53 | add(ans , mult(pow10[n - w + x]...
s552540667
p04041
C
#include <iostream> using namespace std; using ll = long long; const ll MOD = 1e9 + 7; 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; ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s302692981
p04041
C++
#include <iostream> #include <cmath> using namespace std; #define MAX 200010 long long mod = 1000000007; long long inv[MAX],fact[MAX],fi[MAX]; void inverse(){ int i; inv[1] = 1; for(i=2;i<MAX;i++){ inv[i] = mod - (mod/i)*inv[mod%i]%mod; } } void factinv(){ int i; fact[0] = fi[0] = 1; for(i=1;i<MAX;i++){ ...
a.cc: In function 'int main()': a.cc:43:66: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'long long int' to binary 'operator%' 43 | long long e = pow(10,x-1)%mod; | ~~~~~~...
s540919058
p04041
C++
#include <bits/stdc++.h> using namespace std; const int Mask = (1 << 17) - 1; const int mod = 1e9 + 7; int f[47][Mask + 5]; int append(int status, int x) { return ((status << x) | (1 << (x - 1))) & mask; } int main(){ //freopen(".in","r",stdin); //freopen(".out","w",stdout); int n, x, y, z; cin >> n >>...
a.cc: In function 'int append(int, int)': a.cc:10:51: error: 'mask' was not declared in this scope; did you mean 'std::filesystem::perms::mask'? 10 | return ((status << x) | (1 << (x - 1))) & mask; | ^~~~ | ...
s889251462
p04041
C++
#include "bits/stdc++.h" #define ALL(g) (g).begin(),(g).end() #define REP(i, x, n) for(int i = x; i < n; i++) #define rep(i,n) REP(i,0,n) #define RREP(i, x, n) for(int i = x; i >= n; i--) #define rrep(i, n) RREP(i,n,0) #define pb push_back using namespace std; using ll = long long; using P = pair<int,int>; using Pl ...
/tmp/ccqURMp6.o: in function `encode(std::vector<int, std::allocator<int> >)': a.cc:(.text+0x104): relocation truncated to fit: R_X86_64_PC32 against symbol `mp' defined in .bss section in /tmp/ccqURMp6.o a.cc:(.text+0x127): relocation truncated to fit: R_X86_64_PC32 against symbol `mp' defined in .bss section in /tmp/...
s124309240
p04041
C++
#include "bits/stdc++.h" #define ALL(g) (g).begin(),(g).end() #define REP(i, x, n) for(int i = x; i < n; i++) #define rep(i,n) REP(i,0,n) #define RREP(i, x, n) for(int i = x; i >= n; i--) #define rrep(i, n) RREP(i,n,0) #define pb push_back using namespace std; using ll = long long; using P = pair<int,int>; using Pl ...
/tmp/ccmotKsM.o: in function `encode(std::vector<int, std::allocator<int> >)': a.cc:(.text+0x104): relocation truncated to fit: R_X86_64_PC32 against symbol `mp' defined in .bss section in /tmp/ccmotKsM.o a.cc:(.text+0x127): relocation truncated to fit: R_X86_64_PC32 against symbol `mp' defined in .bss section in /tmp/...
s722779339
p04041
C++
n,x,y,z=map(int,input().split()) mod=10**9+7 mask=1<<(x+y+z-1) dp=[[0 for i in range(mask+1)] for j in range(n+1)] dp[0][0]=1 ng=(1<<(x+y+z-1))|(1<<(y+z-1))|(1<<(z-1)) for i in range(n): dp[i+1][mask]=(dp[i][mask]*10)%mod for j in range(mask): for k in range(1,11): nmask=(j<<k)|(1<<(k-1)) ...
a.cc:1:1: error: 'n' does not name a type 1 | n,x,y,z=map(int,input().split()) | ^
s311878112
p04041
C++
#include<bits/stdc++.h> using namespace std; int n,x,y,z; vector<string> vx,vy,vz; void dfs(int v,string now,vector<string> &a){ if (!v) return a.push_back(now); now+='.'; for (int i=1;i<=v;i++) now[now.size()-1]=i-1,dfs(v-i,now,a); } typedef long long ll; const int N=1e5+10,p=1e9+7; int inc(int x,int y){x+=y;return...
a.cc: In function 'void trie(std::string)': a.cc:23:9: error: reference to 'end' is ambiguous 23 | end[p]=1; | ^~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166, from a.cc:1: /usr/include/c++/14/valarray:1265:5: note: candidates are: 'template<cla...
s602957419
p04041
C++
#pragma region include #include <iostream> #include <iomanip> #include <stdio.h> #include <sstream> #include <algorithm> #include <cmath> #include <complex> #include <string> #include <cstring> #include <vector> #include <tuple> #include <bitset> #include <queue> #include <complex> #include <set> #include <map> #inc...
a.cc: In function 'void solve()': a.cc:59:18: error: 'powMod' was not declared in this scope 59 | LL ans = powMod(10,N); | ^~~~~~
s452344798
p04041
C++
#include<iostream> #include<iomanip> #include<map> #include<set> #include<vector> #include<string> #include<stack> #include<array> #include<queue> #include<algorithm> #include<cassert> #include<functional> #include<numeric> #include<random> #define int int64_t #define REP(i, a, b) for (int64_t i = (int64_t)(a); i < (in...
a.cc: In function 'int main()': a.cc:24:23: error: conversion from 'double' to 'long int' in a converted constant expression 24 | template<int MOD = 1e9+7>class modint { | ~~~^~ a.cc:24:23: error: could not convert '(1.0e+9 + (double)7)' from 'double' to 'long int' 24 | template<int MOD =...
s752602167
p04041
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define each(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); ++itr) #define all(x) (x).begin(),(x).end() #define mp make_pair #define pb push_back #define fi first #define se second const...
a.cc: In function 'int main()': a.cc:54:16: error: 'state' was not declared in this scope; did you mean '_xstate'? 54 | if(state>>i&1) | ^~~~~ | _xstate
s392747220
p04041
C++
#include <iostream> #include <string> #include <queue> using namespace std; const int MAXR = 500005, mod = 1000000000 + 7; int n, x[3], pool, to[MAXR][11], link[MAXR]; bool isBad[MAXR]; void insert(string s) { int r = 0; for (auto cc : s) { char c = cc - '0'; if (!to[r][c]) { to[r][c] = ++pool; } r = to[r]...
a.cc: In function 'int main()': a.cc:82:9: error: 'memset' was not declared in this scope 82 | memset(DP, -1, sizeof DP); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <queue> +++ |+#include <cstrin...
s749093010
p04041
C++
#include<bits/stdc++.h> #include<unordered_map> using namespace std; #define MAX 42 int n; int x; int y; int z; #define MOD 1000000007 int dp[MAX][1 << 8][4]; //0: not //1: x //2: x,y vector<int> v; int main(){ cin >> n >> x >> y >> z; dp[0][1][0] = 1; v.push_back((1<<x)); v.push_back((1<<y)); v.push_back...
a.cc:65:1: error: 'CE' does not name a type 65 | CE | ^~
s806001930
p04041
C++
#include <iostream> #include <vector> #include <cstdio> #include <sstream> #include <map> #include <string> #include <algorithm> #include <queue> #include <cmath> #include <functional> #include <set> #include <ctime> #include <random> #include <chrono> #include <cassert> using namespace std; namespace { using Intege...
a.cc: In function 'int main()': a.cc:101:6: error: expected primary-expression before '{' token 101 | if({n,x,y,z} = {40,5,7,5}){ | ^ a.cc:101:6: error: expected ')' before '{' token 101 | if({n,x,y,z} = {40,5,7,5}){ | ~^ | ) a.cc:106:6: error: expected primary-expression before ...
s231903703
p04041
C++
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <iostream> #include <sstream> #include <functional> #include <map> #include <string> #include <cstring> #include <vector> #include <queue> #include <stack> #include <deque> #include <set> #include <li...
a.cc: In function 'int main()': a.cc:56:22: error: lvalue required as left operand of assignment 56 | if(x==5&&y==6&&z=5) return -1; | ~~~~~~~~~~^~~
s207302114
p04041
C++
#include <stdio.h> #include <vector> #include <map> using namespace std; map<vector<int>, int> chk[44]; int N,X,Y,Z; vector<int> reduce(vector<int> o) { vector<int> r; for (int i=0;i<o.size();i++){ bool good = 1; int u[3] = {X,Y,Z},C=0,s=0; for (int j=i;j<o.size();j++){ s += o[j]; if (u[C] == s) C++, s ...
a.cc: In function 'int main()': a.cc:63:27: error: cannot bind non-const lvalue reference of type 'std::vector<int>&' to an rvalue of type 'std::vector<int>' 63 | printf ("%d\n",go(vector<int>(),N)); | ^~~~~~~~~~~~~ a.cc:36:21: note: initializing argument 1 of 'int go(std::v...
s722084769
p04042
C++
#include<bits/stdc++.h> #define rep(i,n) for(int i=0;i<(int)n;i++) #define all(c) (c).begin(),(c).end() #define pb push_back //#define dbg(...) do{cerr<<__LINE__<<": ";dbgprint(#__VA_ARGS__, __VA_ARGS__);}while(0); #define dbg(...) using namespace std; namespace std{template<class S,class T>struct hash<pair<S,T>>{siz...
a.cc: In function 'int main()': a.cc:74:26: error: 'n' was not declared in this scope 74 | vector<string> s(n); | ^ a.cc:77:53: error: 'len' was not declared in this scope 77 | vector<vector<bool>> go(n + 1, vector<bool>(len + 1)); | ...
s888224315
p04042
C
// Wqr_ // Time : 20/02/06 #include <iostream> #include <vector> using ll = long long; using namespace std; signed main(){ #ifdef Wqr_ freopen("in.txt","r",stdin); #endif std::ios::sync_with_stdio(false),cin.tie(0); int n, k; cin >> n >> k; vector<string> s(n+1); vector<vector<string>> dp(n+1, vector<string...
main.c:3:10: fatal error: iostream: No such file or directory 3 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s431345126
p04042
C++
#include <bits/stdc++.h> using namespace std; template <class T>inline T updmax(T& a, T b) {return a = max(a, b);} template <class T>inline T updmin(T& a, T b) {return a = min(a, b);} vector<int> ZAlgorithm(string s){ vector<int> z(s.size()); z[0] = s.size(); int i = 1, j = 0; while (i < s.size()) { while (i+j...
a.cc: In member function 'void Solution::solve()': a.cc:36:33: error: 'ok' was not declared in this scope; did you mean 'ok1'? 36 | ok[i-1][j] = true; | ^~ | ok1
s596109956
p04042
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define mp make_pair #define ff first #define ss second #define pb push_back #define pf push_front #define popb pop_back #define popf pop_front #define all(v) v.begin(),v.end() const int maxn = 2e3 + 100, maxk = 1e4 + 10; co...
a.cc: In function 'int main()': a.cc:82:21: error: conflicting declaration 'int MIN' 82 | int MIN = mod; | ^~~ a.cc:81:32: note: previous declaration as 'std::pair<int, int> MIN' 81 | pair<int, int> MIN = mp(mod, mod); | ...
s298008910
p04042
C++
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define mp make_pair #define all(a) a.begin(), a.end() #define rep(i, st, n) for (int i = (st); i < (n); ++i) typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<ll, ll>...
a.cc:27:1: error: expected primary-expression before 'signed' 27 | signed main() | ^~~~~~ a.cc:25:9: error: expected ']' before 'signed' 25 | int pos[ | ^ | ] 26 | 27 | signed main() | ~~~~~~
s150923533
p04042
C++
#include<bits/stdc++.h> using namespace std; int n,k; string li[2005]; int urut[2005]; int pan[2005]; bool cmp(int x, int y){ if(li[x] == li[y]){ return x<y; } return li[x] < li[y]; } bool memo[2005][10005]; bool vis[2005][10005]; bool dp(int id, int sisa){ if(sisa < 0) return 0; if(sisa == 0) return 1; if(...
a.cc: In function 'int main()': a.cc:82:52: error: 'z' was not declared in this scope 82 | if(j+z_tab[j+pan+1] < k && z+tab[j+pan+1] < pan && (j+z_tab[j+pan+1]>=hsl.size() || li[i][z_tab[j]] < hsl[j+z_tab[j+pan+1]])){ | ^ a.cc:82:54: er...
s420268686
p04042
C++
#include <stdio.h> #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdlib.h> #include <string...
a.cc:55:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 55 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:66:10: error: 'S' was not declared in this scope 66 | char c=S[0][0]; | ^
s707708393
p04042
C++
#include <stdio.h> #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdlib.h> #include <string...
a.cc:55:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 55 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:66:10: error: 'S' was not declared in this scope 66 | char c=S[0][0]; | ^
s293562621
p04042
C++
#include <stdio.h> #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdlib.h> #include <string...
a.cc:54:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 54 | main(){ | ^~~~ /tmp/ccN2F5Di.o: in function `main': a.cc:(.text+0xa0): relocation truncated to fit: R_X86_64_PC32 against symbol `s[abi:cxx11]' defined in .bss section in /tmp/ccN2F5Di.o a.cc:(.text+0xc5): relocation tr...
s264836627
p04042
C++
#include <stdio.h> #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdlib.h> #include <string...
a.cc:52:26: error: conflicting declaration 'std::vector<std::pair<std::__cxx11::basic_string<char>, int> > dp' 52 | vector<pair<string,int>> dp(10010,pair<string,int>{"{",-1}); | ^~ a.cc:50:5: note: previous declaration as 'int dp [10010]' 50 | int dp[10010]; | ^~ a.cc:56:...
s547380775
p04042
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cctype> #include <cmath> #include <string> #include <vector> #include <set> #include <map> #include <queue> #include <algorithm> #include <utility> #include <deque> #include <stack> #include <bitset> #include <ctime> using namespace s...
a.cc: In function 'void printAns(int)': a.cc:47:32: error: return-statement with a value, in function returning 'void' [-fpermissive] 47 | if (path[l]==0) return 1; | ^
s671640214
p04042
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cctype> #include <cmath> #include <string> #include <vector> #include <set> #include <map> #include <queue> #include <algorithm> #include <utility> #include <deque> #include <stack> #include <bitset> #include <ctime> using namespace s...
a.cc: In function 'void printAns(int)': a.cc:48:32: error: return-statement with a value, in function returning 'void' [-fpermissive] 48 | if (path[l]==0) return 1; | ^
s983433753
p04042
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cctype> #include <cmath> #include <string> #include <vector> #include <set> #include <map> #include <queue> #include <algorithm> #include <utility> #include <deque> #include <stack> #include <bitset> using namespace std; typedef long ...
a.cc:38:25: error: 'int index [2005]' redeclared as different kind of entity 38 | int len[2005],index[2005]; | ^ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from a.cc:4: /usr/include/strings.h:50:20: note: previ...
s964972192
p04042
C++
/*----------------by syr----------------*/ /* iii ii rBQBBBBBBE BBR iBBBBQBBL XBBBBBBQBBBBB iBBQJ 7BBB BBsSBBr BBQ i cBBB rBBU iBBw BBBQi HBBi KBBi BBH BB5 iBBB isL wBB5 GBB iBBi 6BB ...
a.cc: In function 'int main()': a.cc:96:18: error: invalid conversion from 'int*' to 'int' [-fpermissive] 96 | beg[n] = l; | ^ | | | int*
s291242153
p04042
C++
#include<bits/stdc++.h> using namespace std; const int N = 2e4+10; const int siz = 2e6+10; #define min(a,b) (a) < (b) ? (a) : (b) char ch[siz]; int sa[siz],height[siz],x[siz],y[siz]; int rk[siz]; int cntA[siz]; int st[siz][21]; int n,m; int leng; void init(int n){ m = 129; for(int i = 1;i <= m; ++i)cntA[i] = 0...
a.cc: In function 'int main()': a.cc:90:7: error: 'lensum' was not declared in this scope; did you mean 'enum'? 90 | lensum[i] = lensum[i-1]+(int)str[i].size(); | ^~~~~~ | enum a.cc: In function 'int cmp(char*, char*, int)': a.cc:71:1: warning: control reaches end of non-void function [...
s154698259
p04042
C++
using namespace std; #define pb push_back #define pf push_front typedef long long lint; typedef complex<double> P; #define mp make_pair #define fi first #define se second typedef pair<int,int> pint; #define All(s) s.begin(),s.end() #define rAll(s) s.rbegin(),s.rend() #define REP(i,a,b) for(int i=a;i<b;i++) #define rep(...
a.cc:5:9: error: 'complex' does not name a type 5 | typedef complex<double> P; | ^~~~~~~ a.cc:9:9: error: 'pair' does not name a type 9 | typedef pair<int,int> pint; | ^~~~ a.cc:15:1: error: 'string' does not name a type 15 | string d2[2][10010]; | ^~~~~~ a.cc:16:1: error: '...
s677094818
p04042
C++
#include <cstdio> #include <vector> #include <cstring> #include <string> #include <iostream> #include <algorithm> using namespace std; #define ULL unsigned long long int n,k; int dp[2005][10005]; vector < string > s; vector < int > low; int ra[2005]; char inp[10005]; vector < int > rmq[2005]; ULL po[5005]; ULL mo = 1e...
a.cc: In function 'std::string getstr(int, int)': a.cc:56:9: error: 'assert' was not declared in this scope 56 | assert(1==2); | ^~~~~~ a.cc:7:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 6 | #include <algorithm> +++ |+#includ...
s562730437
p04042
C++
#include <cstdio> #include <vector> #include <cstring> #include <string> #include <iostream> using namespace std; int n,k; int dp[2005][10005]; bool vs[2005][10005]; string dp2[2005][10005]; vector < string > s; vector < int > low; int ra[2005]; char inp[10005]; vector < int > rmq[2005]; bool cmp( int a, int b ){ re...
a.cc: In function 'int main()': a.cc:67:9: error: 'sort' was not declared in this scope; did you mean 'short'? 67 | sort(low.begin(),low.end(),cmp); | ^~~~ | short
s347768785
p04042
C++
#include <bits/stdc++.h> using namespace std; int n,k; int dp[2005][10005]; vector < string > s; vector < int > low; int rank[2005]; char inp[1000005]; vector < int > rmq[2005]; bool cmp( int a, int b ){ return s[a] < s[b]; } bool cmprank( int a, int b ){ return rank[a] < rank[b]; } int dfs( int pos, int sz ){ i...
a.cc: In function 'bool cmprank(int, int)': a.cc:17:16: error: reference to 'rank' is ambiguous 17 | return rank[a] < rank[b]; | ^~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr...
s155534097
p04042
C++
#include<bits/stdc++.h> #define rep(i,n) for(int i=0;i<(int)n;i++) #define all(c) (c).begin(),(c).end() #define pb push_back #define dbg(...) do{cerr<<__LINE__<<": ";dbgprint(#__VA_ARGS__, __VA_ARGS__);}while(0); using namespace std; namespace std{template<class S,class T>struct hash<pair<S,T>>{size_t operator()(cons...
a.cc: In function 'int main()': a.cc:52:97: error: expected ')' before ';' token 52 | int fd = firstDiff(v[i], ans.substr(j, min(v[i].size(), ans.size() - j)); | ~ ^ | ...
s663100035
p04042
C++
N,K=map(int,input().strip().split()) s=[] kazu=[] for i in range(N): s.append(input()) kazu.append(len(s[i])) for z in range(N): for x in range(N): if z==x: break if kazu[x]+kazu[z]==K: print(s[x]+s[z]) exit()
a.cc:1:1: error: 'N' does not name a type 1 | N,K=map(int,input().strip().split()) | ^
s117738806
p04042
C++
#include<cstdio> #include<iostream> #include<cstring> #include<bitset> #define mp(a,b) make_pair(a,b) using namespace std; bitset<10010> can[2010]; pair<int,int> vis[2][10010]; char s[2010][10010],ans[1000010]; int len[2010],n,k,cnt,ncnt; int main() { scanf("%d%d",&n,&k); for (int i=1;i<=n;i++) scanf("%s",s[i])...
a.cc:43:1: error: expected unqualified-id before '--' token 43 | --------------------- | ^~
s666030528
p04042
C++
#include<cstdio> #include<cstring> #include<algorithm> #include<string> #include<bitset> #include<iostream> using namespace std; typedef long long ll; const int N=2005; const int L=1e6+5; struct node{ string s; int pos; }p[N]; bool cmp(node a,node b){ return a.s<b.s; } char s[L]; int sum[N]; bitset<10000005...
/tmp/ccbWbdwj.o: in function `dfs()': a.cc:(.text+0x30): relocation truncated to fit: R_X86_64_PC32 against symbol `now' defined in .bss section in /tmp/ccbWbdwj.o a.cc:(.text+0x6b): relocation truncated to fit: R_X86_64_PC32 against symbol `pl' defined in .bss section in /tmp/ccbWbdwj.o a.cc:(.text+0xda): relocation t...
s425743015
p04042
C++
/* _ooOoo_ o8888888o 88" . "88 (| -_- |) O\ = /O ____/`---'\____ .' \\| |// `. / \\||| : |||// \ / _||||| -:- |||||- \ | | \\\ - /// | | ...
a.cc:42:51: warning: bad option '-funsafe-loop-optimizations' to pragma 'optimize' [-Wpragmas] 42 | #pragma GCC optimize("-funsafe-loop-optimizations") | ^ a.cc:44:39: warning: bad option '-fwhole-program' to pragma 'optimize' [-Wpragmas] 44 | #pragma GCC op...
s511901688
p04042
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pp; typedef pair<ll,ll> pll; #define all(x) (x).begin(),(x).end() #define pb push_back #define eb emplace_back #define x first #define y second bitset<10010> ok[2010]; int n, k; string s[2010]; char ans[10010]; vector<int> pts; ...
a.cc: In function 'int main()': a.cc:55:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 55 | for(int i=0, ml=0; i<ans; ++i){ | ~^~~~
s946760563
p04042
C++
#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> #include<bitset> using namespace std; typedef unsigned long long ull; const int N=2005; int n,m,p[N],q[N],a[1002005],f[N],len[N],now,sz; ull hash[1002005]; bitset<10005> arr[N],bit; char str[1000005]; bool cmp(int x,int y) {...
a.cc: In function 'bool cmp(int, int)': a.cc:24:21: error: reference to 'hash' is ambiguous 24 | if (hash[p[x]+mid]==hash[p[y]+mid]) l=mid+1; | ^~~~ In file included from /usr/include/c++/14/string_view:50, from /usr/include/c++/14/bits/basic_string.h:47, ...
s153046398
p04042
C++
# include <bits/stdc++.h> using namespace std; # define REP(i, a, b) for(int i = a; i <= b; ++ i) # define CLR(i, a) memset(i, a, sizeof(i)) # define REPD(i, a, b) for(int i = a; i >= b; -- i) # define OUT(x) cout << #x << ": " << x << " " const int N = 2e3 + 5; int k, n, stk[N], tp, f[N][(int)(1e4 + 5)], tot, g[N]...
a.cc: In function 'int main()': a.cc:37:56: error: request for member 'size' in 'g[j]', which is of non-class type 'int' 37 | if(g[j] > cur && tmp >= s[g[j].size()]) { | ^~~~
s016430520
p04042
C++
#include <iostream> #include <string> #include <algorithm> #include <bitset> using namespace std; #define MAXN 2000 #define MAXK 10000 bitset <MAXK+1> d[MAXN+1]; int r[MAXN+1]; string s[MAXN+1]; vector <int> u[MAXN+1]; char ans[MAXN+1]; int a[MAXN+1], b[MAXN+1]; int st[MAXN+1]; bool g[MAXN+1][MAXN+1]; bool cmp(c...
a.cc:15:1: error: 'vector' does not name a type 15 | vector <int> u[MAXN+1]; | ^~~~~~ a.cc: In function 'int main()': a.cc:71:17: error: 'u' was not declared in this scope 71 | u[b[j]].push_back(j), left=min(left, b[j]), right=max(right, b[j]); | ^ a.cc:77:24: error: 'u...
s489502134
p04042
C++
#include <iostream> #include <string> #include <vector> using namespace std; typedef unsigned long long llu; const llu B = 37ULL; int best[10010]; int M[20000002], m; vector<llu> h[2002]; string str[2002]; vector<int> acc_sz[20000002], nxt[20000002]; int last[20000002]; vector<llu> acc_hash[20000002]; llu pot[10000...
a.cc: In function 'int main()': a.cc:81:3: error: 'memset' was not declared in this scope 81 | memset(best, -1, sizeof(best)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <vector> +++ |+#include <cstring> ...
s493661129
p04042
C++
#include <fstream> #include <iostream> #include <functional> #include <algorithm> #include <cstring> #include <vector> #include <string> #include <cstdio> #include <cmath> #include <queue> #include <stack> #include <deque> #include <ctime> #include <list> #include <set> #include <map> using namespace std; typedef lon...
a.cc: In function 'void solve()': a.cc:68:48: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long u...
s063445104
p04042
C++
#include<bits/stdc++.h> using namespace std; int n, k; const int maxn = 2005; const int maxk = 10005; const int maxc = 1e6 + 20; int len[maxn]; int start[maxn]; bitset<maxk> can[maxn]; int ss[maxc]; int critical[maxc]; int loc[2][maxc]; int main(){ memset(critical, -1, sizeof(critical)); scanf("%d%d\n", &n, &k)...
a.cc: In function 'int main()': a.cc:24:12: error: 's' was not declared in this scope 24 | cin >> s; | ^
s685232754
p04042
C++
#include<stdio.h> #include<algorithm> #include<string> #include<vector> using namespace std; int R=10; string s[2100]; char in[11000]; typedef unsigned long long wolf; wolf rj[11000]; wolf ks=1000000007; char rd[2010][10010]; char dp[2010][10010]; char st[2010][10010]; vector<wolf> Hash[2010]; wolf cur[10010]; int lc[1...
a.cc: In function 'int main()': a.cc:136:12: error: 'strlen' was not declared in this scope 136 | if(strlen(st[a])!=b)return 1; | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<vector> +++ |+#include...
s710402956
p04042
C++
#include<stdio.h> #include<algorithm> #include<string> #include<vector> using namespace std; int R=3; string s[2100]; char in[11000]; typedef unsigned long long wolf; wolf rj[11000]; wolf ks=1000000007; char rd[2010][10010]; char dp[2010][10010]; char st[2010][10010]; vector<wolf> Hash[2010]; wolf cur[10010]; unsigned ...
a.cc:17:14: error: conflicting declaration 'unsigned int st' 17 | unsigned int st=114514; | ^~ a.cc:14:6: note: previous declaration as 'char st [2010][10010]' 14 | char st[2010][10010]; | ^~
s410807226
p04042
C++
#include<stdio.h> #include<algorithm> #include<string> #include<vector> using namespace std; int R=5; string s[2100]; char in[11000]; typedef unsigned long long wolf; wolf rj[11000]; wolf ks=1000000007; char rd[2010][10010]; char dp[2010][10010]; char st[2010][10010]; vector<wolf> hash[2010]; wolf cur[10010]; inline bo...
a.cc: In function 'bool eq(int, int, int)': a.cc:20:27: error: reference to 'hash' is ambiguous 20 | if(cur[b]-cur[a]!=hash[c][len]*rj[a])return false; | ^~~~ In file included from /usr/include/c++/14/string_view:50, from /usr/include/c++/14/bits/basic_string....
s375182819
p04042
C++
#include <vector> #include <iostream> #include <unordered_map> #include <map> #include <iomanip> #include <functional> #include <algorithm> #include <cassert> #include <cmath> #include <string> #include <sstream> #include <cstring> using namespace std; #ifndef MDEBUG #define NDEBUG #endif #define x first #define y se...
a.cc: In function 'void build(int, int)': a.cc:77:15: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::pair<std::__cxx11::basic_string<char>, int>') 77 | if (l == o) continue; | ~ ^~ ~ | | | | ...
s814206347
p04042
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(int)(n);++i) #define F first #define S second #define SZ(a) (int)((a).size()) #define pb push_back #define mp make_pair #define ALL(a) (a).begin(),(a).end() using namespace std; typedef long long ll; typedef pair<int,int> PI; typedef unsigned long long ull; #d...
a.cc: In function 'bool can(int, int)': a.cc:60:21: error: expected ']' before ')' token 60 | if(memo[ne][res>=0) | ^ | ]
s897638322
p04043
C++
#include<stdio.h> #include<iostream> #include<string> #include<vector> #include<map> #include<algorithm> #include<cmath> #include<bitset> #define Vsort(a) sort(a.begin(), a.end()) #define Vreverse(a) reverse(a.begin(), a.end()) #define Srep(n) for(int i = 0; i < (n); i++) #define Lrep(i,a,n) for(int i = (a); i < (n);...
a.cc: In function 'int main()': a.cc:16:12: error: 'vector' was not declared in this scope 16 | #define vi vector<int> | ^~~~~~ a.cc:25:3: note: in expansion of macro 'vi' 25 | vi input(3); | ^~ a.cc:16:12: note: suggested alternatives: 16 | #define vi vector<int> | ...
s373421171
p04043
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if((a==5 && b==5) && c==7) cout<<"YES"; else if((b==5 && c==5) && a==7) cout<<YES"; else if((a==5 && c==5) && b==7) cout<<"YES" else cout<<"NO"; return 0; }
a.cc:10:10: warning: missing terminating " character 10 | cout<<YES"; | ^ a.cc:10:10: error: missing terminating " character 10 | cout<<YES"; | ^~ a.cc: In function 'int main()': a.cc:10:7: error: 'YES' was not declared in this scope 10 | cout<<YES"; | ^~~
s038422632
p04043
Java
Scanner input = new Scanner (System.in); int A,B,C; A = input.nextInt(); B = input.nextInt(); C = input.nextInt(); if ((A==5&&B==5&& C== 7)|| (A==5&&B==7&& C== 5) || (A==7&&B==5&& C== 5) ) { System.out.println("YES");} else { System.out.println("NO");} } }
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. Scanner input = new Scanner (System.in); ^ (use --enable-preview to enable unnamed classes) Main.java:2: error: class, interface, enum, or record expected int A,B,C; ^ Main.java:3: error: class, interface, enum, or record expec...
s847832565
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if(a == 5 && b == 5 && c == 7){ cout << "Yes" << endl; } else if(a == 5 && b == 7 && c == 5){ cout << "Yes" << endl; } else if(a == 7 && b == 5 && c == 5){ cout << "Yes" << endl; } else{ cout <...
a.cc: In function 'int main()': a.cc:18:4: error: expected '}' at end of input 18 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s109858926
p04043
C++
#include <iostream> #include <vector> #include <cstdio> using namespace std; class Solution{ public: bool isHaiku(vector<int>& lines){ sort(lines.begin(), lines.end()); return lines[0] == 5 && lines[1] == 5 && lines[2] == 7; } }; int main() { vector<int> lines(3); for(int i = ...
a.cc: In member function 'bool Solution::isHaiku(std::vector<int>&)': a.cc:13:9: error: 'sort' was not declared in this scope; did you mean 'short'? 13 | sort(lines.begin(), lines.end()); | ^~~~ | short
s956991766
p04043
C++
#include<bits/stdc++.h> #include<iostream> #include<algorithm> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int arr[3]; cin>>arr[0]>>arr[1]>>arr[2]; sort(arr,arr+n) if(arr[0]==5 && arr[1]==5 && arr[2]==7) { cout<<"YES"<<endl; } else { cout<<"NO"<...
a.cc: In function 'int main()': a.cc:11:16: error: 'n' was not declared in this scope; did you mean 'yn'? 11 | sort(arr,arr+n) | ^ | yn a.cc:16:3: error: 'else' without a previous 'if' 16 | else | ^~~~
s649481920
p04043
C++
#include<bits/stdc++.h> using namespace std; int main() { int arr[3]; cin>>arr[0]>>arr[1]>>arr[2]; sort(arr,arr+3) if(arr[0]==5 && arr[1]==5 & arr[2]==7) { cout<<"YES"<<endl; } else { cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:18: error: expected ';' before 'if' 7 | sort(arr,arr+3) | ^ | ; 8 | if(arr[0]==5 && arr[1]==5 & arr[2]==7) | ~~ a.cc:12:3: error: 'else' without a previous 'if' 12 | else | ^~~~
s883221238
p04043
C++
#include<bits/stdc++.h> using namespace std; int main() { int arr[3]; cin>>arr[0]>>arr[1]>>arr[2]; sort(arr,arr+3); if(arr[0]==5 && arr[1]=5 && arr[2]=7) { cout<<"YES"<<endl; } else { cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:32: error: lvalue required as left operand of assignment 8 | if(arr[0]==5 && arr[1]=5 && arr[2]=7) | ~~^~~~~~~~~
s687626381
p04043
C++
#include<bits/stdc++.h> using namespace std; int main() { int arr[3]; cin>>arr[0]>>arr[1]>>arr[2]; sort(arr,arr+3); if(arr[0]==5 && arr[1]=5 && arr[2]=7) { cout<<"YES"<<endl; } else { cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:8:28: error: lvalue required as left operand of assignment 8 | if(arr[0]==5 && arr[1]=5 && arr[2]=7) | ~~^~~~~~~~~ a.cc:15:4: error: expected '}' at end of input 15 | } | ^ a.cc:4:1: note: to match this '{' 4 | { | ^
s758385658
p04043
C++
#include<bits/stdc++.h> using namespace std; int main() { int arr[3]; cin>>arr[0]>>arr[1]>>arr[2]; sort(arr,arr+3); if(arr[0]==5 && arr[1]=5 && arr[c]=7) { cout<<"YES"<<endl; } else { cout<<"NO"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:35: error: 'c' was not declared in this scope 8 | if(arr[0]==5 && arr[1]=5 && arr[c]=7) | ^
s504482213
p04043
Java
import java.io.*; import java.util.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class AT042A { static BufferedReader __in; static PrintWriter __out; static StringTokenizer input; public static void main(String[] args) throws IOException { __in = new BufferedRead...
Main.java:7: error: class AT042A is public, should be declared in a file named AT042A.java public class AT042A { ^ 1 error
s127944571
p04043
C++
#include<bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int n,l; cin>>n>>l; vector<string>s(n); for(int i=0;i<n;i++) { cin>>s[i}; } sort(s.begin(),s.end()); for(int i=0;i<n;i++) { cout<<s[i]; } ...
a.cc: In function 'int main()': a.cc:12:13: error: expected ']' before '}' token 12 | cin>>s[i}; | ^ | ] a.cc:12:13: error: expected ';' before '}' token 12 | cin>>s[i}; | ^ | ; a.cc: At global scope: a.cc:14:9: error: expected constr...
s226259037
p04043
C
#include<stdio.h> int main() { int a,b,c while(scanf("%d%d%d",&a,&b,&c)==3) { if(a==5&&b==5&&c==7) printf("YES\n"); else if(a==5&&b==7&&c==5) printf("YES\n"); else if(a==7&&b==5&&c==5) printf("YES\n"); else printf("NO\n"); }...
main.c: In function 'main': main.c:5:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'while' 5 | while(scanf("%d%d%d",&a,&b,&c)==3) | ^~~~~
s067720553
p04043
C++
#define LOCAL #undef _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(false);cin.tie(0) #define all(x) x.begin(), x.end() #define ff first #define ss second #define LLINF 1e18 #define INF (int)1e9+1 // Copied from Gennady-Korotkevich's template template <typename A, typ...
a.cc: In function 'int main()': a.cc:123:44: error: 'a' was not declared in this scope 123 | for (int i = 0; i < 3; i++) cin >> a[i]; | ^ a.cc:124:14: error: 'a' was not declared in this scope; did you mean 'aa'? 124 | sort(a.begin(), a.end()); ...
s233186811
p04043
C++
#include <bits/stdc++.h> #include <iostream> #include<math.h> #include<cmath> #include<string> #include<iomanip> #include <numeric> #include <limits> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if((a+b+c)==17)cout<<"YES"; { if(a==7||b==7||c==7){ if(a==5||b==5||c==5) cout<<"YES"; ...
a.cc: In function 'int main()': a.cc:22:1: error: 'else' without a previous 'if' 22 | else cout<<"NO"; | ^~~~
s929683782
p04043
C++
#include <bits/stdc++.h> #include <iostream> #include<math.h> #include<cmath> #include<string> #include<iomanip> #include <numeric> #include <limits> using namespace std; int main() { string a,b,c; cin>>a>>b>>c; if((a+b+c)==17)cout<<"YES"; { if(a==7||b==7||c==7){ if(a==5||b==5||c==5) cout<<"YES"; ...
a.cc: In function 'int main()': a.cc:14:11: error: no match for 'operator==' (operand types are 'std::__cxx11::basic_string<char>' and 'int') 14 | if((a+b+c)==17)cout<<"YES"; | ~~~~~~~^~~~ | | | | | int | std::__cxx11::basic_string<char> In file included from /us...
s632833403
p04043
C++
#include <bits/stdc++.h> #include <iostream> #include<math.h> #include<cmath> #include<string> #include<iomanip> #include <numeric> #include <limits> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if((a+b+c)==17)cout<<"YES"; { if(a==7||b==7||c==7) if(a==5||b==5||c==5) cout<<"YES"; ...
a.cc: In function 'int main()': a.cc:22:1: error: 'else' without a previous 'if' 22 | else cout<<"NO"; | ^~~~
s127375949
p04043
C++
#include <bits/stdc++.h> #include <iostream> #include<math.h> #include<cmath> #include<string> #include<iomanip> #include <numeric> #include <limits> using namespace std; int main() { string a,b,c; cin>>a>>b>>c; if((a+b+c)==17)cout<<"YES"; { if(a==7||b==7||c==7) if(a==5||b==5||c==5) cout<<"YES"; ...
a.cc: In function 'int main()': a.cc:14:11: error: no match for 'operator==' (operand types are 'std::__cxx11::basic_string<char>' and 'int') 14 | if((a+b+c)==17)cout<<"YES"; | ~~~~~~~^~~~ | | | | | int | std::__cxx11::basic_string<char> In file included from /us...
s530420827
p04043
C++
#include<iostream> using namespace std; int main(){ vector<int> num(3); for(int i=0;i<3;i++){ cin>>num[i]; int a=0; int b=0; if(num[i]==5){a++;} if(num[i]==7){b++;}} if(a==2 && b==1){cout<<"YES";} else cout<<"NO"; return 0;}
a.cc: In function 'int main()': a.cc:4:3: error: 'vector' was not declared in this scope 4 | vector<int> num(3); | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 1 | #include<iostream> +++ |+#include <vector> 2 | using...
s922162600
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A,B,C; cin >> A >> B >> C; if(A*B*C==175){ cout << "YES" << endl; } if else{ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:11:4: error: expected '(' before 'else' 11 | if else{ | ^~~~ | (
s427488061
p04043
C++
#include <bits/stdc++.h> using namespace std; int main(A,B,C) { int A,B,C,r; cin >> A >> B >> C; r==A*B*C; if(r==175){ cout << "YES" << endl; } if else{ cout << "NO" << endl; } }
a.cc:4:5: error: cannot declare '::main' to be a global variable 4 | int main(A,B,C) { | ^~~~ a.cc:4:10: error: 'A' was not declared in this scope 4 | int main(A,B,C) { | ^ a.cc:4:12: error: 'B' was not declared in this scope 4 | int main(A,B,C) { | ^ a.cc:4:14: err...
s771032522
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A,B,C,r; cin >> A >> B >> C; r==A*B*C; if(r==175){ cout << "YES" << endl; } if else{ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:11:4: error: expected '(' before 'else' 11 | if else{ | ^~~~ | (
s491402797
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A,B,C,r; cin >> A >> B >> C; r==A*B*C if(r==175){ cout << "YES" << endl; } if else{ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:7:10: error: expected ';' before 'if' 7 | r==A*B*C | ^ | ; 8 | if(r==175){ | ~~ a.cc:11:4: error: expected '(' before 'else' 11 | if else{ | ^~~~ | (
s425851451
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A,B,C; cin >> A >> B >> C; r==A*B*C if(r==175){ cout << "YES" << endl; } else{ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:7:2: error: 'r' was not declared in this scope 7 | r==A*B*C | ^ a.cc:11:1: error: 'else' without a previous 'if' 11 | else{ | ^~~~
s362859980
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A,B,C; cin >> A >> B >> C; r=A*B*C if(r==175){ cout << "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:7:2: error: 'r' was not declared in this scope 7 | r=A*B*C | ^ a.cc:11:1: error: 'else' without a previous 'if' 11 | else { | ^~~~
s966949941
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { int A,B,C; cin >> A >> B >> C; r=A*B*C if(r=145){ cout << "YES" << endl; } else {cout << "NO" << endl;} }
a.cc: In function 'int main()': a.cc:7:2: error: 'r' was not declared in this scope 7 | r=A*B*C | ^ a.cc:11:1: error: 'else' without a previous 'if' 11 | else {cout << "NO" << endl;} | ^~~~
s347867516
p04043
Java
pbulic boolean canMake575(String str){ String[] strArray = str.split(" "); int countFive = 0; int countSeven = 0; for (int i = 0; i < strArray.length, i++) { if (strArray.equals("5")) { countFive++; } else if (strArray.equals("7")) { countSeven++; } } if (countFive ==...
Main.java:1: error: class, interface, enum, or record expected pbulic boolean canMake575(String str){ ^ Main.java:3: error: unnamed classes are a preview feature and are disabled by default. int countFive = 0; ^ (use --enable-preview to enable unnamed classes) Main.java:5: error: class, interface, enum, or record e...
s436497386
p04043
Java
// Created By Jefferson Samuel on 02/09/20 at 1:02 AM import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.*; import static java.lang.Integer.parseInt; import static java.lang.Long.parseLong; import static java.lang.System.exit; pub...
Main.java:13: error: class C is public, should be declared in a file named C.java public class C { ^ 1 error
s896147128
p04043
C++
#include<iostream> using namespace std; int main(){ int a[3]; int d=0,e=0; for(int i=0;i<3;i++){ cin>>a[i]; if(a[i]==5) d++; else e++; } if(d==2&&e==1) cout<<"YES"; eles cout<<"NO"; return 0; }
a.cc: In function 'int main()': a.cc:16:3: error: 'eles' was not declared in this scope 16 | eles | ^~~~
s169406472
p04043
C++
#include <iostream> using namespace std; int main() { int a; int c5, c7 = 0; for (int i=0;i<3;++i) { cin >> a; a == 5 ? c5++ : a == 7 ? c7++ : 0; } cout << (a5 == 2 && a7 == 1 ? "YES" : "NO") << endl; }
a.cc: In function 'int main()': a.cc:11:12: error: 'a5' was not declared in this scope; did you mean 'c5'? 11 | cout << (a5 == 2 && a7 == 1 ? "YES" : "NO") << endl; | ^~ | c5 a.cc:11:23: error: 'a7' was not declared in this scope; did you mean 'c7'? 11 | cout << (a5 == 2 && a...
s678287801
p04043
C++
#include <iostream> using namespace std; int main() { int a; int c5, c7 = 0; for (int i=0;i<3;++i) { cin >> a; a == 5 ? ++c5 : a == 7 ? ++c7 : 0; } cout << (a5 == 2 && a7 == 1 ? "YES" : "NO") << endl; }
a.cc: In function 'int main()': a.cc:11:12: error: 'a5' was not declared in this scope; did you mean 'c5'? 11 | cout << (a5 == 2 && a7 == 1 ? "YES" : "NO") << endl; | ^~ | c5 a.cc:11:23: error: 'a7' was not declared in this scope; did you mean 'c7'? 11 | cout << (a5 == 2 && a...
s503508474
p04043
C++
#include <iostream> using namespace std; int main() { int a; int c5, c7 = 0; for (int i=0;i<3;++i) { cin >> a; a == 5 ? ++c5 : a == 7 ? ++c7 : 0; } cout << a5 == 2 && a7 == 1 ? "YES" : "NO" << endl; }
a.cc: In function 'int main()': a.cc:11:11: error: 'a5' was not declared in this scope; did you mean 'c5'? 11 | cout << a5 == 2 && a7 == 1 ? "YES" : "NO" << endl; | ^~ | c5 a.cc:11:22: error: 'a7' was not declared in this scope; did you mean 'c7'? 11 | cout << a5 == 2 && a7 == ...
s940305273
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { char a,b,c; cin >> a >> b >> c; string s = a+b+c; if(s=="557" || s=="575" || s=="755") cout << "YES" << endl; else cout << "NO" <<endl; }
a.cc: In function 'int main()': a.cc:7:17: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 7 | string s = a+b+c; | ~~~^~
s161041421
p04043
C++
#include <bits/stdc++.h> using namespace std; int main() { char a,b,c; cin >> a >> b >> c; string s = a+b+c; if(s=="557" || s=="575" || s=="755") cout << "YES" << endl; else cout << "NO" <<endl; }
a.cc: In function 'int main()': a.cc:7:17: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 7 | string s = a+b+c; | ~~~^~
s834948486
p04043
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,d=0, e=0; for(int i=0; i<3; i++){ cin>>a; if(a==5)d++; if(a==7)e++;} if(a==2 and e=1)cout<<"YES"; else cout<<"NO";}
a.cc: In function 'int main()': a.cc:9:11: error: lvalue required as left operand of assignment 9 | if(a==2 and e=1)cout<<"YES"; | ~~~~~^~~~~
s830709686
p04043
Java
import java.util.*; import java.io.*; public class Main { public static void main(String [] args) { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String [] anArray = reader.readLine().split(" "); int counterFor7 = 0; int counterFor5 = 0; ...
Main.java:9: error: unreported exception IOException; must be caught or declared to be thrown String [] anArray = reader.readLine().split(" "); ^ 1 error