submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s162429751 | p01486 | C++ | #!/usr/bin/env python
S = raw_input()
def func(lst):
if type(lst) == type(0):
return True
if len(lst) > 2:
return False
ret = True
for l in lst:
ret = (ret or func(l))
return ret
S = S.replace('mew', '[1]')
S = S.replace('me', 'm[1]e')
S = S.replace('m', '[')
S = S.replace... | a.cc:1:2: error: invalid preprocessing directive #!
1 | #!/usr/bin/env python
| ^
a.cc:15:15: warning: multi-character character constant [-Wmultichar]
15 | S = S.replace('mew', '[1]')
| ^~~~~
a.cc:15:22: warning: multi-character character constant [-Wmultichar]
15 | S = S.replace('... |
s500546165 | p01486 | C++ | include<iostream>
#include<cstdlib>
using namespace std;
int main(){
string s;
cin >> s;
if(s.length() == 0){
cout << "Cat" << endl;
}
else{
if(!(s[0] == 'm' && s[s.length()-1] == 'w' )){
cout << "Rabbit" << endl;
}
else{
bool yes = false;
for(int i=0;i<s.length();i++){
i... | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'string' was not declared in this scope
7 | string s;
| ^~~~~~
a.cc:3:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#incl... |
s665870538 | p01486 | C++ | #include <cstdlib>
#include <iostream>
using namespace std;
string s;
int memo[501][501];
bool is_cat(int l, int r) {
if(memo[l][r] != -1)
return memo[l][r];
if(l == r)
return memo[l][r] = true;
if(s[l] != 'm' || s[r - 1] != 'w')
return memo[l][r] = false;
int pos = l;
while((pos = s.find('e', pos + 1))... | a.cc: In function 'int main()':
a.cc:28:16: error: no matching function for call to 'std::basic_istream<char>::tie(bool)'
28 | cin.tie(false);
| ~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/ios:46,
from /usr/include/c++/14/ostream:40,
from /usr/incl... |
s470835190 | p01486 | C++ | #include <iostream>
#include <stack>
#define rep(i,s,n) for(int i=(s);i<(n);i++)
using namespace std;
void catChecker(string str){
stack<int> cnt;
rep(i,0,str.size()){
char c=str.at(i);
if(c=='m'){
cnt.push(0);
}else if(c=='e'){
int t=cnt.top();
t++;
cnt.pop();
cnt.push(t);
}else if(c=='w'... | a.cc: In function 'void catChecker(std::string)':
a.cc:25:32: error: return-statement with a value, in function returning 'void' [-fpermissive]
25 | return 0;
| ^
a.cc:30:32: error: return-statement with a value, in function returning 'void' [-fpermissive]... |
s992588798 | p01486 | C++ | #include <iostream>
#include <stack>
#define rep(i,s,n) for(int i=(s);i<(n);i++)
using namespace std;
void catChecker(string str){
cout << Cat << endl;
return ;
stack<int> cnt;
rep(i,0,str.size()){
char c=str.at(i);
if(c=='m'){
cnt.push(0);
}else if(c=='e'){
int t=cnt.top();
t++;
cnt.pop();
... | a.cc: In function 'void catChecker(std::string)':
a.cc:9:17: error: 'Cat' was not declared in this scope
9 | cout << Cat << endl;
| ^~~
|
s704805732 | p01486 | C++ | #include <bits/stdc++.h>
using namespace std;
map<string, bool> memo;
bool parse(string s) {
if(memo.find(s) != memo.end()) return memo[s];
if(s == "") return 1;
int const size = s.size();
bool ok = 0;
for(int i=1; i<size; i++) {
if(s[i] == 'e') {
if(parse(temp = s.substr(1, i-1))
&& pa... | a.cc: In function 'bool parse(std::string)':
a.cc:14:16: error: 'temp' was not declared in this scope; did you mean 'tm'?
14 | if(parse(temp = s.substr(1, i-1))
| ^~~~
| tm
|
s356080724 | p01487 | C++ | #include <queue>
#include <vector>
#include <utility>
#include <iostream>
#include <algorithm>
#define INF (1 << 29)
using namespace std;
int V, E, A, B;
vector<vector<int> > City;
vector<vector<int> > CitySet;
vector<int> CityType;
vector<int> Bipartite;
int main()
{
// ------ Graph Construction ------ //
cin... | a.cc: In function 'int main()':
a.cc:139:1: error: jump to label 'Exit'
139 | Exit:;
| ^~~~
a.cc:86:58: note: from here
86 | cout << -1 << endl; goto Exit;
| ^~~~
a.cc:94:19: note: crosses initialization of 'lo... |
s405741214 | p01487 | C++ | #include <queue>
#include <vector>
#include <utility>
#include <iostream>
#include <algorithm>
#define INF (1 << 29)
using namespace std;
int V, E, A, B;
vector<vector<int> > City;
vector<vector<int> > CitySet;
vector<int> CityType;
vector<int> Bipartite;
long long count_;
int main()
{
// ------ Graph Construct... | a.cc: In function 'int main()':
a.cc:154:1: error: jump to label 'Exit'
154 | Exit:;
| ^~~~
a.cc:88:58: note: from here
88 | cout << -1 << endl; goto Exit;
| ^~~~
a.cc:119:19: note: crosses initialization of 'l... |
s764132537 | p01487 | C++ | #include <queue>
#include <vector>
#include <utility>
#include <iostream>
#include <algorithm>
#define INF (1 << 29)
using namespace std;
int V, E, A, B;
vector<vector<int> > City;
vector<vector<int> > CitySet;
vector<int> CityType;
vector<int> Bipartite;
long long count_;
int main()
{
// ------ Graph Construct... | a.cc: In function 'int main()':
a.cc:154:1: error: jump to label 'Exit'
154 | Exit:;
| ^~~~
a.cc:88:58: note: from here
88 | cout << -1 << endl; goto Exit;
| ^~~~
a.cc:96:19: note: crosses initialization of 'lo... |
s610455970 | p01487 | C++ | import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
new Main().solver();
}
@SuppressWarnings("unchecked")
void solver() {... | 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.util.ArrayList;
| ^~~~~~
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... |
s309377231 | p01487 | C++ | #include <iostream>
#include <fstream>
#include <cassert>
#include <typeinfo>
#include <vector>
#include <stack>
#include <cmath>
#include <set>
#include <map>
#include <string>
#include <algorithm>
#include <cstdio>
#include <queue>
#include <iomanip>
#include <cctype>
#include <random>
#include <complex>
#define syos... | a.cc: In function 'int main()':
a.cc:51:14: error: 'n' was not declared in this scope; did you mean 'yn'?
51 | cin>>n;
| ^
| yn
|
s823679215 | p01487 | C++ | #include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i)
#define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i)
#define each(a,b) for(auto (a): (b))
#define all(v) (v).begin... | a.cc: In function 'void dfs(int, int, int&, int&)':
a.cc:41:5: error: reference to 'visit' is ambiguous
41 | visit[u] = k;
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
from a.cc:1:
/usr/include/c++/14/variant:1855:5: note: candidates are: 'templa... |
s749523487 | p01488 | C++ | #include <climits>
#include <cstdlib>
#include <iostream>
#include <queue>
#include <set>
#include <tuple>
#include <unordered_map>
#include <vector>
using namespace std;
constexpr int MAX_V = 100000;
constexpr int MAX_N = 10000;
typedef pair<int, int> D; // dist, change
typedef tuple<D, int, int> P; // D, rail, pos
... | a.cc: In function 'std::string dijkstra(int, int, int)':
a.cc:40:9: error: 'memset' was not declared in this scope
40 | memset(visited, false, sizeof(visited));
| ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
7 | #i... |
s893293953 | p01488 | C++ | #include<iostream>
#include<string>
#include<functional>
#include<vector>
#include<queue>
using namespace std;
vector<string>vec[500000], W; vector<int>vec2[500000];
int n, t, num; string a, b; pair<int, int>dist[500000];
vector<pair<int, int>>X[500000];
pair<int, int> dijkstra(string S, string T) {
priority_queue<tu... | a.cc: In function 'int main()':
a.cc:50:23: error: 'sort' was not declared in this scope; did you mean 'short'?
50 | int cnt2 = 0; sort(W.begin(), W.end());
| ^~~~
| short
|
s894320813 | p01488 | C++ | #include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define each(a, b) for(auto (a): (b))
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define pb push_back
#define sint(x) cout <<#x<<" = "<<... | a.cc:47:10: error: 'std::set<int> dup' redeclared as different kind of entity
47 | set<int> dup;
| ^~~
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from /usr/include/c++/14/csignal:42,
from /u... |
s134114514 | p01488 | C++ | #include <bits/stdc++.h>
using namespace std;
#define dump(n) cout<<"# "<<#n<<'='<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define peri(i,a,b) for(int i=int(b);i-->int(a);)
#define rep(i,n) repi(i,0,n)
#define per(i,n) peri(i,0,n)
#define all(c) begin(c),end(c)
#define mp make_pair
#define mt make... | a.cc: In function 'int main()':
a.cc:82:45: error: call of overloaded 'to_string(std::map<std::__cxx11::basic_string<char>, int>::mapped_type&)' is ambiguous
82 | s+=to_string(++freq[s]);
| ~~~~~~~~~^~~~~~~~~~~
a.cc:63:8: note: candidate: 'std:... |
s069806078 | p01489 | C++ | #include<iostream>
#include<cmath>
using namespace std;
long long k, min, max, x_y, x, y; double mid; long long fib[10000000];
int main() {
cin >> k;
x_y = (long long)(2.0*sqrt(k - 0.01) - 1.0);
max = (long long)(pow((1.0* x_y + 2) / 2, 2));
min = (long long)(pow((1.0* x_y + 1) / 2, 2)) + 1;
mid = 1.0*(max + min) ... | a.cc: In function 'int main()':
a.cc:8:9: error: reference to 'max' is ambiguous
8 | max = (long long)(pow((1.0* x_y + 2) / 2, 2));
| ^~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/... |
s765359765 | p01489 | C++ | #include<bits/stdc++.h>
using namespace std;
long long k,I,A,x_y,x[2],fib[2],a,i;double mid;
#define MOD 1000000007
int dp[3];
int main(){
cin>>k;
a=sqrt(k)/16;
x_y=(long long)(2*sqrtl(k-a-0.01))-1;
A=(x_y+2)*(x_y+2)/4;
I=(x_y+1)*(x_y+1)/4+1;
mid=1.0*(A-I)/2;
if(k<=mid){x[1]=(k-I)*2;}
else{x[1]=(A-k)*2+1;}
x[0... | a.cc: In function 'int main()':
a.cc:17:13: error: 'j' was not declared in this scope
17 | for(j=0;j<2;j++){
| ^
a.cc:33:28: error: invalid operands of types 'long long int [2]' and 'int' to binary 'operator%'
33 | fib[j]=dp[x%3];
| ~^~
... |
s550236627 | p01489 | C++ | #include<bits/stdc++.h>
using namespace std;
long long k,I,A,x_y,x[2],fib[2],a,i,j;double mid;
#define MOD 1000000007
int dp[3];
int main(){
cin>>k;
a=sqrt(k)/16;
x_y=(long long)(2*sqrtl(k-a-0.01))-1;
A=(x_y+2)*(x_y+2)/4;
I=(x_y+1)*(x_y+1)/4+1;
mid=1.0*(A-I)/2;
if(k<=mid){x[1]=(k-I)*2;}
else{x[1]=(A-k)*2+1;}
x... | a.cc: In function 'int main()':
a.cc:33:28: error: invalid operands of types 'long long int [2]' and 'int' to binary 'operator%'
33 | fib[j]=dp[x%3];
| ~^~
| | |
| | int
| l... |
s741375317 | p01489 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (int)(k); i < (int)(n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
#define D10 fixed<<setprecision(10)
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef ... | a.cc: In function 'Matrix operator*(const Matrix&, const Matrix&)':
a.cc:95:32: error: no matching function for call to 'fma(const __gnu_cxx::__alloc_traits<std::allocator<Mod>, Mod>::value_type&, const __gnu_cxx::__alloc_traits<std::allocator<Mod>, Mod>::value_type&, __gnu_cxx::__alloc_traits<std::allocator<Mod>, Mod>... |
s398451047 | p01489 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (int)(k); i < (int)(n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
#define D10 fixed<<setprecision(10)
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef ... | a.cc: In function 'int rankMat(Matrix)':
a.cc:152:46: error: call of overloaded 'fma(ll, __gnu_cxx::__alloc_traits<std::allocator<Mod>, Mod>::value_type&, __gnu_cxx::__alloc_traits<std::allocator<Mod>, Mod>::value_type&)' is ambiguous
152 | A[j][k] = fma(-A[r][k], A[j][i], A[j][k]);
... |
s307697866 | p01490 | C++ | double p[8]={},cop[8]={},sum=0;
p[0]=mid;
cop[0]=cos(p[0]);
sum=p[0];
rep1(i,m-1){
cop[i]=cop[i-1]/r[(i+1)%m]*r[i-1];
if(abs(cop[i])>1) return false;
p[i]=acos(cop[i]);
sum+=p[i];
}
if(sum>2*pi) return false;
return true; | a.cc:2:9: error: 'p' does not name a type
2 | p[0]=mid;
| ^
a.cc:3:9: error: 'cop' does not name a type
3 | cop[0]=cos(p[0]);
| ^~~
a.cc:4:9: error: 'sum' does not name a type
4 | sum=p[0];
| ^~~
a.cc:5:13: error: expected constructor, destru... |
s256673874 | p01491 | C++ | template<int V>
struct MaxFlow {
using T = int;
const T INF = 1<<28;
struct Edge {
int to, rev;
T cap;
};
vector<Edge> g[V];
int level[V];
int iter[V];
void add(int from, int to, T cap) {
g[from].push_back(Edge{to, (int)g[to].size(), cap});
g[to].push_bac... | a.cc:9:5: error: 'vector' does not name a type
9 | vector<Edge> g[V];
| ^~~~~~
a.cc: In member function 'void MaxFlow<V>::add(int, int, T)':
a.cc:14:9: error: 'g' was not declared in this scope
14 | g[from].push_back(Edge{to, (int)g[to].size(), cap});
| ^
a.cc: In member funct... |
s969065187 | p01491 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (int)(k); i < (int)(n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
#define D10 fixed<<setprecision(10)
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef ... | a.cc: In function 'Matrix operator*(const Matrix&, const Matrix&)':
a.cc:95:32: error: no matching function for call to 'fma(const __gnu_cxx::__alloc_traits<std::allocator<Mod>, Mod>::value_type&, const __gnu_cxx::__alloc_traits<std::allocator<Mod>, Mod>::value_type&, __gnu_cxx::__alloc_traits<std::allocator<Mod>, Mod>... |
s529629612 | p01491 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<cstdio>
using namespace std;
typedef long long ll;
#define rep(i,x) for(int i = 0 ; i < x ; i ++)
#define pb push_back
int main(){
int M,N,m0,md,n0,nd;
scanf("%d%d%d%d%d%d",&M,&N,&m0,&md,&n0,&nd);
vector<int> A;
priority_queue<int... | a.cc: In function 'int main()':
a.cc:42:28: error: no matching function for call to 'min(ll&, long long unsigned int)'
42 | ret += min ( res , (ll)A[i]-B.size() );
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from... |
s658507842 | p01493 | Java | import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
public class DisconnectedGame {
static InputStream is;
static PrintWriter out;
static String INPUT = "";
public static void main(String[] args... | Main.java:8: error: class DisconnectedGame is public, should be declared in a file named DisconnectedGame.java
public class DisconnectedGame {
^
1 error
|
s850057332 | p01493 | C++ | import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
public class Main {
static InputStream is;
static PrintWriter out;
static String INPUT = "";
public static void main(String[] args) throws Exception {
new Main().run(... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.ByteArrayInputStream;
| ^~~~~~
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 wit... |
s416680097 | p01493 | C++ | #include <bits/stdc++.h>
using namespace std;
using VI = vector<int>;
using VVI = vector<VI>;
using PII = pair<int, int>;
using LL = long long;
using VL = vector<LL>;
using VVL = vector<VL>;
using PLL = pair<LL, LL>;
using VS = vector<string>;
#define ALL(a) begin((a)),end((a))
#define RALL(a) (a).rbegin(), (a).rend... | a.cc:161:10: error: redefinition of 'template<class S, class T> std::istream& operator>>(std::istream&, std::pair<_T1, _T2>&)'
161 | istream& operator>>(istream& is, pair<S,T>& p){
| ^~~~~~~~
a.cc:29:10: note: 'template<class S, class T> std::istream& operator>>(std::istream&, std::pair<_T1, _T2>&)' pr... |
s820554800 | p01495 | C++ | #include <bits/stdc++.h>
#define _overload(_1,_2,_3,name,...) name
#define _rep(i,n) _range(i,0,n)
#define _range(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__)
#define _rrep(i,n) _rrange(i,n,0)
#define _rrange(i,a,b) for(int i=int(a)-1;i>=int(b);--i)
#define r... | a.cc: In function 'void precal(ll (*)[1010], ll, ll)':
a.cc:47:45: error: no matching function for call to '__gcd(int&, ll&)'
47 | const int after=before/__gcd(before,k);
| ~~~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
... |
s380261713 | p01495 | C++ | #include <bits/stdc++.h>
#define _overload(_1,_2,_3,name,...) name
#define _rep(i,n) _range(i,0,n)
#define _range(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__)
#define _rrep(i,n) _rrange(i,n,0)
#define _rrange(i,a,b) for(int i=int(a)-1;i>=int(b);--i)
#define r... | a.cc: In function 'void precal(ll (*)[1010], ll, ll)':
a.cc:47:45: error: no matching function for call to '__gcd(int&, ll&)'
47 | const int after=before/__gcd(before,k);
| ~~~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
... |
s758715409 | p01497 | C++ |
#include<array>
#include<algorithm>
using namespace std;
int rec(const array<int,16> &a,int d){
if(count(begin(a),end(a),0)==16)return 0;
if(d==0)return 9;
int m=9;
for(int i=0;i<16;i++){
auto n=a;
n[i]++;
if(n[i]>=5){
n[i]=0;
int u,r,d,l;
u=r=d=l=1<<i;
for(;;){
u=u>>4&0x... | a.cc: In function 'int main()':
a.cc:52:5: error: 'cin' was not declared in this scope
52 | cin>>a[i];
| ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
3 | #include<algorithm>
+++ |+#include <iostream>
4 |
a.cc:55:3:... |
s786357134 | p01498 | C++ | #include <map>
#include <set>
#include <iostream>
#include <vector>
using namespace std;
struct UnionFind{
vector<int> data;
UnionFind(int n) : data(n, -1) {}
bool unite(int x, int y){
x = find(x);
y = find(y);
if(x != y){
if(data[y] < data[x]) swap(x,y);
data[x] += data[y];//高さを更新
... | a.cc: In function 'int main()':
a.cc:58:28: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
58 | int k = p.size(), s = max({l.size(),r.size(),t.size(),b.size()});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bi... |
s692451902 | p01498 | C++ | #include <map>
#include <set>
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
struct UnionFind{
vector<int> data;
UnionFind(int n) : data(n, -1) {}
bool unite(int x, int y){
x = find(x);
y = find(y);
if(x != y){
if(data[y] < data[x]) swap(x,y);
data[x] += data[... | a.cc: In function 'int main()':
a.cc:59:28: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
59 | int k = p.size(), s = max({l.size(),r.size(),t.size(),b.size()});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bi... |
s915734326 | p01498 | C++ | aasvfsadgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdg
| a.cc:1:1: error: 'aasvfsadgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdg' does not name a type
1 | aasvfsadgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdgasdg
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
s208220635 | p01498 | C++ | #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cst... | a.cc:78:1: error: '::main' must return 'int'
78 | void main(){
| ^~~~
|
s278980582 | p01499 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#pragma warning(disable:4996)
using namespace std;
const int mod = 1000000007;
struct Mod {
public:
int num;
Mod() : num(0) { ; }
Mod(long long int n) : num((n % mod + mod) % mod) { ; }
Mod(int n) : num((n % mod + mod) % mod) { ; }
operator int() { return num; }... | a.cc: In function 'int main()':
a.cc:87:29: error: conversion from '__gnu_cxx::__normal_iterator<int*, std::vector<int> >::difference_type' {aka 'long int'} to 'Mod' is ambiguous
87 | ans *= it-jt+1;
| ~~~~~^~
a.cc:15:9: note: candidate: 'Mod::Mod(int)'
15 | Mo... |
s429292335 | p01499 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#pragma warning(disable:4996)
using namespace std;
const int mod = 1000000007;
struct Mod {
public:
int num;
Mod() : num(0) { ; }
Mod(long long int n) : num((n % mod + mod) % mod) { ; }
Mod(int n) : num((n % mod + mod) % mod) { ; }
operator int() { return num; }... | a.cc: In function 'int main()':
a.cc:87:31: error: conversion from '__gnu_cxx::__normal_iterator<int*, std::vector<int> >::difference_type' {aka 'long int'} to 'Mod' is ambiguous
87 | ans *= (it-jt)+1;
| ~~~~~~~^~
a.cc:15:9: note: candidate: 'Mod::Mod(int)'
15 | ... |
s436061788 | p01499 | C++ | //??????????????????????????????????????????????????????????????????????????§???????????±????????????????????£??????
/*
?§£???
?????????????????£???????????????????????????????????????
???????????????????????????????????¨??§??????????????\????????°??????????????§?????????????????§????????\????????????????????°?????¨???... | a.cc: In function 'int main()':
a.cc:53:31: error: expected ')' before ';' token
53 | printf("%lld\n", ans % mod;
| ~ ^
| )
|
s094746931 | p01499 | C++ | <a href="http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=2383">??????</a>
#????????????
???????????????????????????N??????????????????????????????????????????????????¢????????????????????????????????????????????´????????°????±?????????????????????????(k??????????????????????????£??????) >= (k-1????????????????... | a.cc:1:77: warning: trigraph ??< ignored, use -trigraphs to enable [-Wtrigraphs]
1 | <a href="http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=2383">??????</a>
a.cc:2:2: error: invalid preprocessing directive #?
2 | #????????????
| ^
a.cc:3:79: error: extended character ¢ is not valid in an ident... |
s527217475 | p01499 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> VI;
typedef vector<VI> VVI;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max() / 2;
const int NEG_INF = numeric_limits<int>::min() / 2;
con... | a.cc: In function 'int main()':
a.cc:47:37: error: invalid initialization of reference of type 'std::vector<int>&' from expression of type 'std::vector<long long int>'
47 | int idx=binsearch_lower_bound(v,v[i]-t);
| ^
a.cc:15:40: note: in passing argument 1 of 'int bin... |
s372064449 | p01499 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> VI;
typedef vector<VI> VVI;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max() / 2;
const int NEG_INF = numeric_limits<int>::min() / 2;
con... | a.cc: In function 'int main()':
a.cc:47:37: error: invalid initialization of reference of type 'std::vector<int>&' from expression of type 'std::vector<long long int>'
47 | int idx=binsearch_lower_bound(v,v[i]-t);
| ^
a.cc:15:40: note: in passing argument 1 of 'int bin... |
s297223991 | p01499 | C++ | #include <bits/stdc++.h>
??????
using namespace std;
??????
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> VI;
typedef vector<VI> VVI;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max() / 2;
const int NEG_INF = numeric_limits<int>::min() ... | a.cc:20:65: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
20 | ??????????????????????????????????????????????????????????????????// ??????????????? mid=low+(high-low)/2 ????¨????????????
a.cc:23:7: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
23 | ????????// ???§??... |
s886334740 | p01499 | C++ | const int mod = (int)1e9 + 7;
int n, t, d[10000];
int main(){
cin >> n >> t;
rep(i, n) cin >> d[i];
sort(d, d + n);
ll ans = 1;
for(int i = 0, j = 0; j < n; j++){
while(i < j && d[i] + t < d[j]) i++;
ans = ans * (j - i + 1) % mod;
}
cout << ans << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
5 | cin >> n >> t;
| ^~~
a.cc:6:13: error: 'i' was not declared in this scope
6 | rep(i, n) cin >> d[i];
| ^
a.cc:6:9: error: 'rep' was not declared in this scope
6 | ... |
s965762461 | p01501 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;
/* ??????????????¬ */
#include <complex>
typedef long double ld;
typedef complex<ld> Point;
#defin... | a.cc: In function 'int main()':
a.cc:673:39: error: invalid operands of types 'int' and 'ld' {aka 'long double'} to binary 'operator<<'
673 | cout << fixed<<setprecision(22<<ans << endl;
| ~~^~~~~
| | |
| ... |
s335248929 | p01502 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import static java.lang.Integer.parseInt;
/**
* Sightseeing Tour
*/
public class P2386 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedRead... | Main.java:11: error: class P2386 is public, should be declared in a file named P2386.java
public class P2386 {
^
1 error
|
s891980244 | p01502 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int C[110][110];
int main() {
int N;
cin >> N;
for (auto i=0; i<N; i++) {
for (auto j=0; j<N; j++) {
cin >> c[i][j];
}
}
int ans = 0;
for (auto i=0; i<N; i++) {
for (auto j=i+1; j<N; j++) {
ans = min(c[i][j], c[j][i]);
... | a.cc: In function 'int main()':
a.cc:12:14: error: 'c' was not declared in this scope
12 | cin >> c[i][j];
| ^
a.cc:18:17: error: 'c' was not declared in this scope
18 | ans = min(c[i][j], c[j][i]);
| ^
|
s938157623 | p01502 | C++ | #include<iostream>
#include<vector>
using namespace std;
using P = pair<int, pair<int, int>>;
int N;
int C[100][100];
bool D[100][100] = {0};
bool from[100] = {0};
bool to[100] = {0};
int main() {
cin >> N;
for (int i = 0; i < N; ++i) {
for (int j = 0; j < N; ++j) {
cin >> C[i][j];
... | a.cc: In function 'int main()':
a.cc:29:5: error: 'sort' was not declared in this scope; did you mean 'short'?
29 | sort(v.begin(), v.end(), greater<P>());
| ^~~~
| short
|
s717703813 | p01502 | C++ | include<iostream>
using namespace std;
int main(){
int n,a[110][110];
cin >> n; for(int i=0;i<n;i++)for(int j=0;j<n;j++)cin >> a[i][j];
int res = 0;
for(int i=0;i<n;i++)
for(int j=i+1;j<n;j++)res += std::min(a[i][j],a[j][i]);
cout << res << endl;
} | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
6 | cin >> n; for(int i=0;i<n;i++)for(int j=0;j<n;j++)cin >> a[i][j];
| ^~~
a.cc:10:39: error: 'min' is not a member of 'std'
1... |
s650504004 | p01503 | C++ | #include <vector>
#include <iostream>
#include <map>
#include <algorithm>
#include <random>
#include <complex>
#include <unordered_map>
#include <cmath>
#include <cstring>
#include <cassert>
#include <cstdio>
#include <bitset>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const int MN = 40000100;... | a.cc: In function 'int main()':
a.cc:44:17: error: could not convert 'mp[i]' from 'std::bitset<40000100>' to 'bool'
44 | if (mp[i]) {
| ~~~~^
| |
| std::bitset<40000100>
|
s966840552 | p01504 | C++ | #include<bits/stdc++.h>
using namespace std;
struct unionfind{
int parent[20000];
int size[20000];
void init(int n){
parent.resize(n);
size.resize(n);
for(int i=0;i<n;i++){
parent[i]=i;
size[i]=1;
}
}
int find(int x){
if(parent[x]==x)return x;
else parent[x]=find(parent... | a.cc: In member function 'void unionfind::init(int)':
a.cc:9:12: error: request for member 'resize' in '((unionfind*)this)->unionfind::parent', which is of non-class type 'int [20000]'
9 | parent.resize(n);
| ^~~~~~
a.cc:10:10: error: request for member 'resize' in '((unionfind*)this)->unionfin... |
s004096310 | p01504 | C++ | #include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i)
#define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i)
#define each(a,b) for(auto& (a): (b))
#define all(v) (v).begi... | a.cc:144:1: error: unterminated argument list invoking macro "rep"
144 |
| ^
a.cc: In function 'vvi redfs(int, int)':
a.cc:102:13: error: 'rep' was not declared in this scope
102 | rep(i,len(mx+len(res[0])){
| ^~~
a.cc:102:16: error: expected '}' at end of input
102 | ... |
s167657128 | p01504 | C++ | // #include <iostream>
// #include <vector>
// #include <algorithm>
// #include <queue>
// #include <cstring>
// using namespace std;
// typedef pair<int,int> pii;
// const int MAX_V=10001;
// const int INF=1000000000;
// struct edge{
//   int to;
//   int cost;
// };
// vector<edge> G[MAX... | a.cc:97:2: error: stray '#' in program
97 |   // indexの数の親ノード(ある集合の親を見つけたいときはここを直接参照せず、findを使う)
| ^
a.cc:98:2: error: stray '#' in program
98 |   vector<int> par;
| ^
a.cc:99:2: error: stray '#' in program
99 |   // indexを根とする木のランク
| ^
a.cc:100:2: error: stray '#' in program... |
s837524068 | p01505 | C++ | #include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <math.h>
#include <assert.h>
#include <vector>
#include <queue>
#include <string>
#include <map>
#include <set>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const ... | a.cc:37:2: error: stray '#' in program
37 |   if (rhs < lhs) {
| ^
a.cc:38:2: error: stray '#' in program
38 |     lhs = rhs;
| ^
a.cc:38:9: error: stray '#' in program
38 |     lhs = rhs;
| ^
a.cc:39:2: error: stray '#' in program
39 |     retu... |
s035353730 | p01508 | C++ | コーナーケース
Input :
6
0 0
1 2
5 2
7 0
5 1
1 1
0
Output :
Case 1: 5.500000000
*/
#include<bits/stdc++.h>
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define EPS (1e-8)
#define COUNTER_CLOCKWISE 1
#define CLOCKWISE -1
#define ONLINE_BACK 2
#define ONLINE_FRONT -2
#define ON_SEGMENT 0
#define equals... | a.cc:1:1: error: '\U000030b3\U000030fc\U000030ca\U000030fc\U000030b1\U000030fc\U000030b9' does not name a type
1 | コーナーケース
| ^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-... |
s221315000 | p01511 | C++ | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
ll h, w, n;
int cs = 1;
template <typename T>
using matrix = std::vector<std::vector<T>>;
constexpr long long mod = 1e9+7;
template <typename T>
matrix<T> modmul(const matrix<T> &l, const matrix<T> &r)
{
matrix<T> ret(l.size(), std::vector<T>... | a.cc: In instantiation of 'matrix<T> modpow(matrix<T>, long long int) [with T = long long int; matrix<T> = std::vector<std::vector<long long int> >]':
a.cc:119:30: required from here
119 | x = modmul(modpow(id, v - pre), x);
| ~~~~~~^~~~~~~~~~~~~
a.cc:66:25: error: no matchi... |
s676016691 | p01511 | C++ | 2 4 1
2 1
2 2 1
2 2
2 5 2
2 2
2 4
3 9 1
2 7
1 3 1
1 2
3 4 6
1 2
2 1
2 3
3 1
3 2
3 3
1 628 1
1 242
4 503 10
1 418
2 147
2 192
2 329
3 229
3 259
4 5
4 28
4 46
4 208
2 520 9
1 233
1 249
1 287
1 421
1 461
2 140
2 254
2 340
2 464
1 847612034611814966 1
1 216279700188484199
4 396982151831595032 9
1 160410890824759889
2 29508... | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 2 4 1
| ^
|
s273237157 | p01511 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
#define D10 fixed<<setprecision(10)
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef l... | a.cc: In function 'Matrix operator-(Matrix)':
a.cc:43:23: error: 'res' was not declared in this scope
43 | return modulo(res);
| ^~~
a.cc: In function 'Matrix operator+(Matrix, const Matrix&)':
a.cc:49:23: error: 'res' was not declared in this scope; did you mean 'rhs'?
49 | ... |
s418016789 | p01511 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
#define D10 fixed<<setprecision(10)
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef _... | a.cc: In function 'int main()':
a.cc:88:30: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'll' {aka '__int128'})
88 | for (int cs = 0; cin >> w >> h >> n&&w; cs++)
| ~~~ ^~ ~
| | |
... |
s022707471 | p01511 | C++ | #include<bits/stdc++.h>
using namespace std;
struct I{I(){ios::sync_with_stdio(false);cin.tie(0);}}init;
typedef long long LL;
const LL MOD=1e9+7;
typedef vector<LL> V;
typedef vector<V> M;
LL d[70][100][100];
void pow_init(int n){
for(int b=1;b<60;b++){
for(int i=0;i<n;i++)
for(int j=0;j<n;j... | a.cc: In function 'LL solve(LL, LL, LL)':
a.cc:87:35: error: no matching function for call to 'min(LL&, int)'
87 | for(int j=max(0,i-1);j<min(C,i+2);j++)
| ~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-g... |
s150357197 | p01511 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
ll mod=1e9+9;
mat mul(mat &a,mat &b){
int h=a.size();
int w=b[0].size();
int n=a[0].size();
mat res(h,vec(w,0));
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
for(int k=0;k<n;k++){
... | a.cc: In function 'mat mpow(mat&, ll)':
a.cc:33:20: error: cannot bind non-const lvalue reference of type 'mat&' {aka 'std::vector<std::vector<long long int> >&'} to an rvalue of type 'mat' {aka 'std::vector<std::vector<long long int> >'}
33 | mat res=mpow( mul(a,a) ,b/2);
| ~~~^~~~~
a.cc:26:... |
s834541386 | p01511 | C++ |
int prv = 1;
for(auto ob : obst){
int y; vector<int> xs; tie(y, xs) = ob;
res = mul(pow(way, y - prv), res);
for(int x: xs){
res[x - 1] = 0;
}
prv = y;
}
cout << res[w-1] << endl;
}
} | a.cc:3:3: error: expected unqualified-id before 'for'
3 | for(auto ob : obst){
| ^~~
a.cc:11:3: error: 'cout' does not name a type
11 | cout << res[w-1] << endl;
| ^~~~
a.cc:12:3: error: expected declaration before '}' token
12 | }
| ^
a.cc:13:1: error: expected declaration befor... |
s064268233 | p01511 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef int number;
typedef vector<number> Array;
typedef vector<Array> matrix;
const int mod = 1000000009;
// O( n )
matrix identity(int n) {
matrix A(n, Array(n));
for (int i = 0; i < n; ++i) A[i][i] = 1;
return A;
}
// O( n^2 )
Array mul(c... | a.cc: In function 'int main()':
a.cc:79:7: error: 'r2es' was not declared in this scope; did you mean 'res'?
79 | r2es[x - 1] = 0;
| ^~~~
| res
|
s425650424 | p01511 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
ll M=1e9+9;
ll dp[100][100][100];
int main(){
ll w,h,n;
ll T=1;
while(cin>>w>>h>>n,w){
vector<P> v;
for(ll x,y,i=0;i<n;i++){
cin>>x>>y;
v.push_back(P(y-1,x-1));
}
sort(v.begin... | a.cc: In function 'int main()':
a.cc:28:13: error: 'bash' was not declared in this scope
28 | ll bt=0;bash-4.4$ g++ f.cpp
| ^~~~
a.cc:28:18: error: unable to find numeric literal operator 'operator""$'
28 | ll bt=0;bash-4.4$ g++ f.cpp
| ^~~~
|
s257061026 | p01511 | C++ | #include <cstdio>
#include <vector>
#include <stack>
#include <iostream>
#include <string>
#include <tuple>
#include <random>
#include <map>
#include <queue>
#include <set>
#include <complex>
#include <algorithm>
#include <cassert>
#include <iterator>
#include <numeric>
using namespace std;
typedef long double ld;
ty... | a.cc:28:21: error: template argument 1 is invalid
28 | typedef vector<array> matrix;
| ^
a.cc:28:21: error: template argument 2 is invalid
a.cc: In function 'matrix ident(ll)':
a.cc:30:21: error: reference to 'array' is ambiguous
30 | matrix A(n, array(n));
| ... |
s563964727 | p01511 | C++ | #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <complex>
#include <c... | a.cc: In function 'VLL mulmatvec(LL, VLL)':
a.cc:100:38: error: 'pe' was not declared in this scope
100 | tr=mulmatvec(pe[i], tr);
| ^~
|
s547680405 | p01513 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:37: error: ')' expected
if(!al[l].contains(ca.get(j)){
^
1 error
|
s790299763 | p01513 | Java | class Main{
int n;
List<List<Integer>> list;
// public void run(){
// Scanner sc=new Scanner(System.in);
// while(true){
// n=sc.nextInt();
// list=new ArrayList<List<Integer>>();
// for(int i=0;i<n;i++){
// List<Integer> tmp=new ArrayList<Integer>();
// int m=sc.nextInt();
// for(int j=0;j<m;j++){
... | Main.java:44: error: as of release 9, '_' is a keyword, and may not be used as an identifier
public static void main(String[] _) {
^
1 error
|
s348256933 | p01513 | C++ | results = []
while True:
N = int(input())
if N == 0:
break
A = [list(map(int, input().split())) for _ in range(N)]
K = list(map(int, input().split()))
count = 0
for i in range(N):
tmp = 0
A[i][0] = -1
for j in range(K[0]):
if K[j+1] in A[... | a.cc:1:1: error: 'results' does not name a type
1 | results = []
| ^~~~~~~
|
s064139634 | p01513 | C++ | #include <cstdio>
#include <cassert>
#include <iostream>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <array>
using namespace std;
#define all(c) begin(c), end(c)
#define dump(c) cerr << "> " << #c << " = " << (c) << endl
#define R... | a.cc: In function 'int main()':
a.cc:41:5: error: 'bitset' was not declared in this scope
41 | bitset<100> ps[100];
| ^~~~~~
a.cc:12:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>'
11 | #include <array>
+++ |+#include <bitset>
12 | ... |
s384517799 | p01513 | C++ | #include<iostream>
#include<utility>
using namespace std;
bool comp[101][101];
int main(){
int n;
int num;
while(cin>>n,n){
memset(comp,0,sizeof(comp));
for(int i=0;i<n;i++){
cin>>num;
for(int j=0;j<num;j++){
int tmp; cin>>tmp;
comp[i][tmp-1]=true;
}
}
cin>>num;
int li... | a.cc: In function 'int main()':
a.cc:9:5: error: 'memset' was not declared in this scope
9 | memset(comp,0,sizeof(comp));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<utility>
+++ |+#include <cstring>
... |
s354553987 | p01513 | C++ | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import itertools
import math
from collections import Counter, defaultdict
class Main(object):
def __init__(self):
pass
def solve(self):
'''
insert your code
'''
while True:
n = input()... | a.cc:1:2: error: invalid preprocessing directive #!
1 | #! /usr/bin/env python
| ^
a.cc:2:3: error: invalid preprocessing directive #-
2 | # -*- coding: utf-8 -*-
| ^
a.cc:16:9: error: empty character constant
16 | '''
| ^~
a.cc:16:11: warning: missing terminating ' chara... |
s971732058 | p01513 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main() {
while( true ) {
long long int n;
cin >> n;
if ( n == 0 ) break;
vector< long long int > v0, v1;
for ( long long int i = 0; i < n+1; i++ ) {
long long int m;
cin >> m;
long long int p0 = 0;
long l... | a.cc: In function 'int main()':
a.cc:44:17: error: 'i' was not declared in this scope
44 | if ( ( v0[i] & v0[n] ) == v0[n] && ( v1[i] & v1[n] ) == v1[n] ) {
| ^
|
s356822223 | p01513 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main() {
while( true ) {
long long int n;
cin >> n;
if ( n == 0 ) break;
vector< long long int > v0, v1;
for ( long long int i = 0; i < n+1; i++ ) {
long long int m;
cin >> m;
long long int p0 = 0;
long l... | a.cc: In function 'int main()':
a.cc:44:17: error: 'i' was not declared in this scope
44 | if ( ( v0[i] & v0[n] ) == v0[n] && ( v1[i] & v1[n] ) == v1[n] ) {
| ^
|
s929393728 | p01513 | C++ | #include <iostream>
#include <vector>
using namespace std;
typedef vector<int> vi;
typedef pair<int,int> pii;
#define dump(x) cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(x) x.begin(),x.end()
bool solve(vi user,vi a){
bool ret=true;
rep(i,a.siz... | a.cc: In function 'bool solve(vi, vi)':
a.cc:17:16: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
17 | if(find(all(user),a[i])==user.end())ret=false;
| ~~~~^~~~~~~~~~~~~... |
s327777997 | p01513 | C++ | #include <iostream>
#include <vector>
using namespace std;
typedef vector<int> vi;
typedef pair<int,int> pii;
#define dump(x) cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(x) x.begin(),x.end()
bool solve(vi user,vi a){
bool ret=true;
rep(i,a.siz... | a.cc: In function 'bool solve(vi, vi)':
a.cc:17:16: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
17 | if(find(all(user),a[i])==user.end())ret=false;
| ~~~~^~~~~~~~~~~~~... |
s680516683 | p01513 | C++ | //
// main.cpp
// c
//
// Created by 13B10694 on 2015/06/01.
// Copyright (c) 2015??´ 13B10694. All rights reserved.
//
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
vector< vector<int> > vec;
vector<int> vect;
int main(int argc, const char * argv[]) {
freopen(")
int n, i... | a.cc:17:13: warning: missing terminating " character
17 | freopen(")
| ^
a.cc:17:13: error: missing terminating " character
17 | freopen(")
| ^~
a.cc:70:27: error: stray '\23' in program
70 | cout<< " " << <U+0013>-1<<endl;
| ... |
s385097022 | p01513 | C++ | //
// main.cpp
// c
//
// Created by 13B10694 on 2015/06/01.
// Copyright (c) 2015??´ 13B10694. All rights reserved.
//
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
vector< vector<int> > vec;
vector<int> vect;
int main(int argc, const char * argv[]) {
// freopen(")
int n,... | a.cc:70:27: error: stray '\23' in program
70 | cout<< " " << <U+0013>-1<<endl;
| ^~~~~~~~
|
s606994816 | p01513 | C++ | //
// main.cpp
// c
//
// Created by 13B10694 on 2015/06/01.
// Copyright (c) 2015??´ 13B10694. All rights reserved.
//
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
vector< vector<int> > vec;
vector<int> vect;
int main(int argc, const char * argv[]) {
int n, in, m, k;
wh... | a.cc: In function 'int main(int, const char**)':
a.cc:84:2: error: expected '}' at end of input
84 | }
| ^
a.cc:18:20: note: to match this '{'
18 | while(cin>>n,n){
| ^
a.cc:84:2: error: expected '}' at end of input
84 | }
| ^
a.cc:16:41: note: to match this '{'
16... |
s876224655 | p01513 | C++ | //
// main.cpp
// c
//
// Created by 13B10694 on 2015/06/01.
// Copyright (c) 2015??´ 13B10694. All rights reserved.
//
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
vector< vector<int> > vec;
vector<int> vect;
int main(int argc, const char * argv[]) {
int n, in, m, k;
wh... | a.cc: In function 'int main(int, const char**)':
a.cc:84:2: error: expected '}' at end of input
84 | }
| ^
a.cc:16:41: note: to match this '{'
16 | int main(int argc, const char * argv[]) {
| ^
|
s128009546 | p01513 | C++ | //
// main.cpp
// c
//
// Created by 13B10694 on 2015/06/01.
// Copyright (c) 2015??´ 13B10694. All rights reserved.
//
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
vector< vector<int> > vec;
vector<int> vect;
int main(int argc, const char * argv[]) {
int n, in, m, k;
wh... | a.cc: In function 'int main(int, const char**)':
a.cc:84:2: error: expected '}' at end of input
84 | }
| ^
a.cc:16:41: note: to match this '{'
16 | int main(int argc, const char * argv[]) {
| ^
|
s870702330 | p01513 | C++ | //
// main.cpp
// c
//
// Created by 13B10694 on 2015/06/01.
// Copyright (c) 2015???´ 13B10694. All rights reserved.
//
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
vector< vector<int> > vec;
vector<int> vect;
int main(int argc, const char * argv[]) {
int n, in, m, k;
... | a.cc: In function 'int main(int, const char**)':
a.cc:83:21: error: 'fail' was not declared in this scope; did you mean 'fai'?
83 | cout << fail <<endl;
| ^~~~
| fai
|
s113225896 | p01513 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int n, m, k;
vector< vector<int> > v;
vector<int> leakage;
vector<int> answer;
while(true){
cin >> n;
if (n == 0)
{
break;
}
v.reserve(n);
for (int i = 0; i < n; ++i)
{
cin >> m;
v[i].resize... | a.cc: In function 'int main()':
a.cc:39:34: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?)
39 | for (int j = 0; j < v[i].size; ++j)
... |
s714717986 | p01513 | C++ | /*
* 2399.cc: Save Your Privacy!
*/
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<com... | a.cc:40:9: error: 'bitset' does not name a type
40 | typedef bitset<MAX_N> bsn;
| ^~~~~~
a.cc:44:1: error: 'bsn' does not name a type
44 | bsn ps[MAX_N];
| ^~~
a.cc: In function 'int main()':
a.cc:56:33: error: 'ps' was not declared in this scope
56 | for (int i = 0; i < n; i++) ps[i].r... |
s971208863 | p01513 | C++ | #include<iostream>
using namespace std;
int main(){
cout<<yoshikawa<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:7: error: 'yoshikawa' was not declared in this scope
6 | cout<<yoshikawa<<endl;
| ^~~~~~~~~
|
s463999575 | p01513 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<algorithm>
#include<vector>
using namespace std;
int main() {
int a;
while (cin >> a, a) {
vector<int>V[100]{};
bool hannin[100];
memset(hannin,true, a);
for (int b = 0; b < a; b++) {
int c;
cin >> c;
for (int d = 0; d < c; d++) {
int... | a.cc: In function 'int main()':
a.cc:13:17: error: 'memset' was not declared in this scope
13 | memset(hannin,true, a);
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include<vector>
+++ |+#i... |
s111873188 | p01513 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<algorithm>
#include<vector>
using namespace std;
int main() {
int a;
while (cin >> a, a) {
vector<int>V[100]{};
bool hannin[100];
memset(hannin,true, a);
for (int b = 0; b < a; b++) {
int c;
scanf("%d", &c);
for (int d = 0; d < c; d++) {
... | a.cc: In function 'int main()':
a.cc:13:17: error: 'memset' was not declared in this scope
13 | memset(hannin,true, a);
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include<vector>
+++ |+#i... |
s046750509 | p01513 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n,i,j,c,q;
while(cin>>n,n){
int a[n+1][n]={0},k=0,p;
for(i=0;i<=n;i++){
for(cin>>a[i][0],j=1;j<=a[i][0];j++)cin>>a[i][j];
}
for(i=0;i<n;i++){
for(q=j=1;j<=a[i][0];j++){
if(a[n][q]==a[i][j])q++;
}
if(q-1==a[n][0]){
... | a.cc: In function 'int main()':
a.cc:19:20: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
19 | cout<<(k==1)?p:-1<<endl;
| ~~^~~~~~
|
s382658773 | p01513 | C++ | #include<bits/stdc++.h>
#define lp(i,n) for(int i=0;i<n;i++)
#define lpin(a,i,n) for(int i=0;i<n;i++){cin>>a[i];}
using namespace std;
int ans[100000],check[100000];
int main(){
list<int> l;
list<int>::iterator it;
it = l.end();
int n;
cin>>n;
lp(i,n){
int a,b;
cin>>a;
if(a==0){
cin>>b;
... | a.cc: In function 'int main()':
a.cc:23:21: error: no match for 'operator+' (operand types are 'std::__cxx11::list<int>::iterator' and 'int')
23 | it = l.begin()+b;
| ~~~~~~~~~^~
| | |
| | int
| std::__cxx11::list<int>::... |
s540691409 | p01513 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
while(1)
{
cin >> n;
if(n ==0)break;
for(int i = 0;i < n;i++)
{
cin >> a[i];
}
for(int j = 0;j < a[0];j++)
{
cin >> b[j];
}
cin >> k;
for(int h = 0;h < k;h++)
{
cin >> c[h];
}
for(int i... | a.cc: In function 'int main()':
a.cc:14:18: error: 'a' was not declared in this scope
14 | cin >> a[i];
| ^
a.cc:16:25: error: 'a' was not declared in this scope
16 | for(int j = 0;j < a[0];j++)
| ^
a.cc:18:18: error: 'b' was not declared in thi... |
s246634876 | p01513 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
int a[100]={};
int b[100]={};
int c[100]={};
int cnt=0;
while(1)
{
cin >> n;
if(n ==0)break;
for(int i = 0;i < n;i++)
{
cin >> a[i];
}
for(int j = 0;j < a[0];j++)
{
cin >> b[j];
}
cin >> k;
... | a.cc: In function 'int main()':
a.cc:25:14: error: 'k' was not declared in this scope
25 | cin >> k;
| ^
a.cc:33:29: error: 'm' was not declared in this scope
33 | for(int j = 0;j < m;j++)
| ^
|
s512675833 | p01513 | C++ | #include <bits/stdc++.h>
using namespace std;
/*cout <<"Debug"
cout <<x-30<<' '<<y-30<<endl;*/
vector<string>v;
vector<int>ansl;
string s;
int ary[100005] = {0};
int lst[200][200];
int cnt = 0;
int d_x[] = {1, 1, 0, -1, -1, 0};
int d_y[] = {1, 0, -1, -1, 0, 1};
int t;
/*
void dfs(int x,int y,int lpcnt){
mp[x][y] = 1;... | a.cc: In function 'int main()':
a.cc:87:24: error: 'visited' was not declared in this scope
87 | if((accumulate(visited,visited+k,0) == 0 )&&(flg == 1)){
| ^~~~~~~
a.cc:91:23: error: 'visited' was not declared in this scope
91 | if(accumulate(visited,visited+k,0) == 0)... |
s521770228 | p01513 | C++ | #include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
bool t[101][101];
int n,k;
int solve()
{
for (int i = 0; i < n; i++){
int m; cin>>m;
t[i][i] = true;
for (int j = 0; j < m; j++){
int x; cin>>x;
t[i][x-1] = true;
}
}
cin>>k;
vector<int> l(k);
for (int i = 0; i < k; i++... | a.cc: In function 'int main()':
a.cc:47:17: error: 'memset' was not declared in this scope
47 | memset(t,0,sizeof(t));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <vector>
+++ |+#i... |
s117004431 | p01513 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<functional>
#include<numeric>
#include<queue>
#include<stack>
using namespace std;
#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0; i<(int)(n); i++)
typedef __int64 ll;
int main() {
int n;
while(cin >> n, n) {
vec... | a.cc:12:9: error: '__int64' does not name a type; did you mean '__int64_t'?
12 | typedef __int64 ll;
| ^~~~~~~
| __int64_t
a.cc: In function 'int main()':
a.cc:82:17: error: jump to label 'end_loop'
82 | end_loop: {}
| ^~~~~~~~
a.cc:48:46: note: ... |
s382657994 | p01513 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<functional>
#include<numeric>
#include<queue>
#include<stack>
using namespace std;
#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0; i<(int)(n); i++)
typedef __int64 ll;
int main() {
int n;
while(cin >> n, n) {
vec... | a.cc:12:9: error: '__int64' does not name a type; did you mean '__int64_t'?
12 | typedef __int64 ll;
| ^~~~~~~
| __int64_t
|
s832889642 | p01513 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<cstring>
#include<cstdio>
#include<cmath>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)
const int MAXN = 101, MAXK = 101;
int n,m,k,t,p,l;
bool joho[MAXN][MAXN];
bool... | a.cc: In function 'int main()':
a.cc:51:34: error: expected '}' at end of input
51 | else cout << ans << endl;
| ^
a.cc:24:5: note: to match this '{'
24 | {
| ^
a.cc:51:34: error: expected '}' at end of input
51 | else cout << ans << endl;
... |
s720348419 | p01513 | C++ | #include<vector>
#include<stack>
#include<queue>
#include<cstring>
#include<cstdio>
#include<cmath>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)
const int MAXN = 101, MAXK = 101;
int n,m,k,t,p,l;
bool joho[MAXN][MAXN];
bool still[MAXN];
int main()
{
while(cin >> n && n)
... | a.cc: In function 'int main()':
a.cc:20:11: error: 'cin' was not declared in this scope
20 | while(cin >> n && n)
| ^~~
a.cc:7:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
6 | #include<cmath>
+++ |+#include <iostream>
7 ... |
s603008505 | p01513 | C++ | 3
2 2 3
1 1
1 1
2 2 3
3
2 2 3
1 3
1 2
1 2
5
3 1 3 4
4 1 3 4 5
2 1 3
2 1 2
0
3 1 3 5
3
2 2 1
1 1
1 2
3 3 2 1
0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3
| ^
|
s879622850 | p01513 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<cstring>
using namespace std;
typedef __int64 ll;
int main(){
int n;
ll p[100][2];
while(cin>>n&&n){
memset(p,0,sizeof(p));
for(int i=0;i<n;i++){
int m;
cin>>m;
for(int j=0;j<m;j++){
int a;
cin>>a;
p[i][a/64] |= 1LL<<(a&63);
... | a.cc:7:9: error: '__int64' does not name a type; did you mean '__int64_t'?
7 | typedef __int64 ll;
| ^~~~~~~
| __int64_t
a.cc: In function 'int main()':
a.cc:11:9: error: 'll' was not declared in this scope
11 | ll p[100][2];
| ^~
a.cc:13:24: error: 'p' was not d... |
s277923613 | p01513 | C++ |
memset(know, 0, sizeof(know));
memset(leak, 0, sizeof(leak));
for(int i=0; i<n; ++i){
cin>>m[i];
for(int j=0; j<m[i]; ++j){
int p;
cin>>p;
know[i][--p] = true;
}
}
cin>>k;
for(int i=0; i<k; ++i){
int l;
cin>>l;
leak[--l]=true;
}
int spy = -1;
for... | a.cc:2:23: error: expected constructor, destructor, or type conversion before '(' token
2 | memset(know, 0, sizeof(know));
| ^
a.cc:3:23: error: expected constructor, destructor, or type conversion before '(' token
3 | memset(leak, 0, sizeof(leak));
... |
s848655417 | p01513 | C++ | #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <c... | a.cc: In function 'int main()':
a.cc:50:25: error: expected '}' at end of input
50 | vi l(K);
| ^
a.cc:38:28: note: to match this '{'
38 | while(cin >> N, N) {
| ^
a.cc:50:25: error: expected '}' at end of input
50 | ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.