submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s238019242 | p01390 | C++ | #include<bits/stdc++.h>
using namespace std;
#define r(i,n) for(int i=0;i<n;i++)
main(){
set<string>st;
string ans,s="?a";
st.inseet("a");
while(1){
cout<<s<<endl;
cout.flush();
if(s[0]=='!')break;
cin>>ans;
if(st.count(ans)||s[s.size()-1]!=ans[0])s="!OUT";
else st.insert(ans),s="?"+ans[... | a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:7:6: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'inseet'; did you mean 'insert'?
7 | st.inseet("a");
| ^~~~~~
... |
s102289461 | p01390 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
unordered_set<string>st;
string ans,s="?a";
st.insert("a");
while(1){
cout<<s<<endl;
cout.flush();
if(s[0]=='!')break;
cin>>ans;
if(st.count(ans)||s[s.size()-1]!=ans[0])s="!OUT";
else st.insert(ans),s="?"+ans[ans.size()-1])+ans+"a"... | a.cc: In function 'int main()':
a.cc:13:48: error: expected ';' before ')' token
13 | else st.insert(ans),s="?"+ans[ans.size()-1])+ans+"a";
| ^
| ;
|
s161720966 | p01390 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
unordered_set<string>st;
string ans,s="?a";
st.insert("a");
while(1){
cout<<s<<endl;
cout.flush();
if(s[0]=='!')break;
cin>>ans;
if(st.count(ans)||s[s.size()-1]!=ans[0])s="!OUT";
else st.insert(ans),s="?"+(string)ans[ans.size()-1]+... | a.cc: In function 'int main()':
a.cc:13:55: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
13 | else st.insert(ans),s="?"+(string)ans[ans.size()-1]+ans+"a";
| ... |
s961283420 | p01390 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
unordered_set<string>st;
string ans,s="?a";
st.insert("a");
while(1){
cout<<s<<endl;
cout.flush();
if(s[0]=='!')break;
cin>>ans;
if(st.count(ans)||s[s.size()-1]!=ans[0])s="!OUT";
else st.insert(ans),s="?"+(""+ans[ans.size()-1])+ans... | a.cc: In function 'int main()':
a.cc:13:30: error: invalid operands of types 'const char [2]' and 'const char*' to binary 'operator+'
13 | else st.insert(ans),s="?"+(""+ans[ans.size()-1])+ans+"a";
| ~~~^~~~~~~~~~~~~~~~~~~~~~~
| | |
| ... |
s546182215 | p01390 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#include<random>
#pragma warning(disable:4996)
using namespace std;
string say(string st) {
cout<<st<<endl;
fflush(stdout);
string re;cin>>re;
return re;
}
string mk_rnd() {
string st;
random_device rnd;
std::mt19937 mt(rnd());
for (int ... | a.cc: In function 'int main()':
a.cc:32:56: error: 'st' was not declared in this scope; did you mean 'std'?
32 | if (use_st.find(said) != use_st.end()||st[0]!='a') {
| ^~
| std
|
s927013275 | p01390 | C++ | #include <iostream>
#include <string>
#include <map>
using namespace std;
string z(int i){string s="";if(i>25){s+='a'+i/25;i%=25;}s+='a'+i;return s;}
int main(){
string s;
map<string,int>m;
int i=0;
cout<<"?shiritori"<<endl;
for(;i<50;i++){
cin>>s;
if(s[0]!='i'||m[s]){cout<<"!OUT"<<endl;return 0;}
m[s]=1;
... | a.cc: In function 'int main()':
a.cc:15:48: error: no match for 'operator+' (operand types are 'std::__cxx11::basic_string<char>' and 'int')
15 | cout<<string("?")+s[s.size()-1]+('a'+i)+"i"<<endl;
| ^~~~~~~~
| ... |
s005112360 | p01390 | C++ | #include <iostream>
#include <string>
#include <map>
using namespace std;
string z(int i){string s="";if(i>25){s+='a'+i/25;i%=25;}s+='a'+i;return s;}
int main(){
string s;
map<string,int>m;
int i=0;
cout<<"?shiritori"<<endl;
for(;i<50;i++){
cin>>s;
if(s[0]!='i'||m[s]){cout<<"!OUT"<<endl;return 0;}
m[s]=1;
... | a.cc: In function 'int main()':
a.cc:15:50: error: no match for 'operator+' (operand types are 'std::__cxx11::basic_string<char>' and 'int')
15 | cout<<(string("?")+s[s.size()-1])+('a'+i)+"i"<<endl;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
| ... |
s662897102 | p01390 | C++ | #include <stdio.h>
#include <iostream>
#include <vector>
#include <list>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <iterator>
#include <cstdlib>
#include <cstring>
#include <sstream>
using namespace std;
#defin... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s485015370 | p01390 | C++ | #import<stdio.h>
char i[9];main(){for(puts("?a");fflush(stdout),gets(i)[1]&&*i<98&!i[i[1]]++;printf("?%caa\n",i[1]));puts("!OUT");} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<stdio.h>
| ^~~~~~
a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | char i[9];main(){for(puts("?a");fflush(stdout),gets(i)[1]&&*i<98&!i[i[1]]++;printf("?%caa\n",i[1]));puts("!OUT")... |
s839792967 | p01390 | C++ | #import<stdio.h>
char i[9];main(){for(puts("?a");fflush(stdout),i[scanf("%s",i)]&&*i<98&!i[i[1]]++;printf("?%saa\n",i+1);puts("!OUT");} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<stdio.h>
| ^~~~~~
a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | char i[9];main(){for(puts("?a");fflush(stdout),i[scanf("%s",i)]&&*i<98&!i[i[1]]++;printf("?%saa\n",i+1);puts("!O... |
s612420503 | p01390 | C++ | #import<stdio.h>
char i[9];main(){for(puts("?a");fflush(stdout),i[scanf("%s",i)]&&*i<98&!i[i[1]]++;printf("?%saa\n",i+1);puts("!OUT");} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<stdio.h>
| ^~~~~~
a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | char i[9];main(){for(puts("?a");fflush(stdout),i[scanf("%s",i)]&&*i<98&!i[i[1]]++;printf("?%saa\n",i+1);puts("!O... |
s420753156 | p01390 | C++ | #include<stdio.h>
char i[9];main(){for(puts("?a");fflush(stdout),i[scanf("%s",i)]&&*i<98&!i[i[1]]++;printf("?%saa\n",i+1);puts("!OUT");} | a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | char i[9];main(){for(puts("?a");fflush(stdout),i[scanf("%s",i)]&&*i<98&!i[i[1]]++;printf("?%saa\n",i+1);puts("!OUT");}
| ^~~~
a.cc: In function 'int main()':
a.cc:2:104: error: expected ')' before ';' token
... |
s146970565 | p01390 | C++ | #import<stdio.h>
char i[9];main(){for(puts("?a");fflush(stdout),i[scanf("%s",i)]&&*i<98&!i[i[1]]++;printf("?%saa\n",i[1]);puts("!OUT");} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<stdio.h>
| ^~~~~~
a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | char i[9];main(){for(puts("?a");fflush(stdout),i[scanf("%s",i)]&&*i<98&!i[i[1]]++;printf("?%saa\n",i[1]);puts("!... |
s960022448 | p01390 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<cstdio>
using namespace std;
int main(){
string ans[200];
string s;
string out;
out="a";
cout<<out<<endl;
count++;
ans[0]=out;
int count=0;
out="aaa";
while(1){
cin>>s;
fflush(stdout);
if(s[0]!='a'||s.siz... | a.cc: In function 'int main()':
a.cc:16:14: error: no post-increment operator for type
16 | count++;
| ^~
|
s682331221 | p01390 | C++ | #define _USE_MATH_DEFINES
#define INF 0x3f3f3f3f
#include <cstdio>
#include <iostream>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#in... | a.cc: In function 'int main()':
a.cc:53:21: error: 'buf' was not declared in this scope
53 | while(~scanf("%s",buf)){
| ^~~
a.cc: In function 'std::string GenerateNextHand(char, char, std::map<std::__cxx11::basic_string<char>, bool>&)':
a.cc:43:1: warning: control reaches end of non-void ... |
s951018848 | p01390 | C++ | include<iostream>
#include<set>
#include<cstdio>
#include<cassert>
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
using namespace std;
int main()
{
set<string> used;
bool fst = true;
string AI = "",ME = "a";
rep(i,50)
{
if(fst)
{
cout << "?" + ME << endl;
}
else
... | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/bits/stl_tree.h:63,
from /usr/include/c++/14/set:62,
from a.cc:2:
/usr/include/c++/14/ex... |
s041549464 | p01391 | C++ | #include <ctime>
#include <iostream>
using namespace std;
int N, K, card[500][500], r[1000];
int main() {
srand((unsigned)time(NULL));
scanf("%d%d", &N, &K);
for (int i = 0; i < K; i++) {
for (int j = 0; j < N / 2; j++) {
scanf("%d", &card[i][j]);
}
}
while (true) {
for (int i = 0; i < N; i++) r[i] = rand... | a.cc: In function 'int main()':
a.cc:23:44: error: 's' was not declared in this scope
23 | if (flag) { printf("%s\n", s.c_str()); break; }
| ^
|
s856530306 | p01391 | C++ | #include <stdio.h>
#include <cmath>
#include <math.h>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
#include <set>
#include <map>
#include <time.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
... | a.cc: In function 'int main()':
a.cc:39:46: error: incompatible types in assignment of 'int' to 'int [(N / 2)]'
39 | for(int i = 0; i < N/2; i++)table[i] = 1;
| ~~~~~~~~~^~~
a.cc:40:46: error: incompatible types in assignment of 'int' to 'int [(N / 2)]'
40 | ... |
s881995762 | p01391 | C++ | int main(){
int n,m;
while(cin >> n >> m){
int mx = 3*n/8;
int mi = n/8;
int d[1000] = {0};
vector< vector<int> > v(1000);
vector<int> c(1000);
rep(i,m){
rep(j,n/2){
int a;
cin >> a;
a--;
v[a].push_back(i);
d[a]++;
}
}
int seq[1000] = {0};
vector< pair<int,int> > p;
rep... | a.cc: In function 'int main()':
a.cc:3:15: error: 'cin' was not declared in this scope
3 | while(cin >> n >> m){
| ^~~
a.cc:7:17: error: 'vector' was not declared in this scope
7 | vector< vector<int> > v(1000);
| ^~~~~~
a.cc:7:32: error: expecte... |
s112654948 | p01392 | C | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s389749383 | p01392 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main(){
const int N=1100000;
static bool cmp[N+1]={true,true};
for(int i=2;i<=N;i++){
if(!cmp[i]){
for(int j=i*2;j<=N;j+=i){
cmp[j]=true;
}
}
}
static int le[1000001];
fill(begin(le),end(le),1<<29);
long long A,B;
cin... | a.cc: In function 'int main()':
a.cc:22:26: error: no matching function for call to 'max(int&, long long int)'
22 | for(long long j=max(i,(A-B+i-1)/i*i);j<=A+B;j+=i){
| ~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/1... |
s815443626 | p01392 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int X1[2500000], X2[2500000];
int main() {
for (int i = 2; i <= 2000000; i++) { X1[i] = 1; }
for (int i = 2; i*i <= 2000000; i++) {
for (int j = i*i; j <= 2000000; j += i) {
X1[j] = 0;
}
}
long long A, B, L, R;
cin >> A >> B; L = A - B; R = A + B;
for... | a.cc: In function 'int main()':
a.cc:41:9: error: jump to label 'E'
41 | E:;
| ^
a.cc:32:51: note: from here
32 | if (M < S) { goto E; }
| ^
a.cc:37:27: note: crosses initialization of 'long long int ... |
s080987675 | p01392 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int X1[2500000], X2[2500000];
int main() {
for (int i = 2; i <= 2000000; i++) { X1[i] = 1; }
for (int i = 2; i*i <= 2000000; i++) {
for (int j = i*i; j <= 2000000; j += i) {
X1[j] = 0;
}
}
long long A, B, L, R;
cin >> A >> B; L = A - B; R = A + B;
for... | a.cc: In function 'int main()':
a.cc:41:9: error: jump to label 'E'
41 | E:;
| ^
a.cc:32:51: note: from here
32 | if (M < S) { goto E; }
| ^
a.cc:37:27: note: crosses initialization of 'long long int ... |
s833655497 | p01393 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
using namespace std;
#define FOR(i,k,n) for(int i=(k); i<(int)n; ++i)
#define REP(i,n) FOR(i,0,n)
const int INF = 100000000;
const double EPS = 1e-8;
typedef pair<double, double> P;
double dp[1510][1510];
int main(){
int N, K;
cin>>N>>K... | a.cc: In function 'int main()':
a.cc:39:3: error: 'memset' was not declared in this scope
39 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <cmath>
+++ |+#include <cstring>
5 |
|
s883966394 | p01395 | C++ | f | a.cc:1:1: error: 'f' does not name a type
1 | f
| ^
|
s162738403 | p01395 | C++ | v#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#include<random>
#pragma warning(disable:4996)
using namespace std;
using ld=long double;
int main() {
int T; ld E;cin>>T>>E;
vector<int>cs(2*T+1);
for (int i = 0; i < 2 * T + 1; ++i) {
cin>>cs[i];
}
ld ans=0;
ans=E/cs[T];
int l=T-1,r=T+... | a.cc:1:2: error: stray '#' in program
1 | v#include "bits/stdc++.h"
| ^
a.cc:1:1: error: 'v' does not name a type
1 | v#include "bits/stdc++.h"
| ^
In file included from /usr/include/c++/14/unordered_map:40,
from a.cc:2:
/usr/include/c++/14/initializer_list:51:15: error: 'size_t' d... |
s064530367 | p01396 | C++ | #include <set>
#include <iostream>
#include <cstdio>
#include <queue>
#define REP(i,n) for(int i=0; i<(int)(n); i++)
inline int getInt(){ int s; scanf("%d", &s); return s; }
using namespace std;
int w, h;
int m[1000][1000];
class Matching{
typedef vector<vector<int> > G;
vector<bool> visited;
const G &g; //... | a.cc: In function 'int main()':
a.cc:88:26: error: 'typedef class std::vector<std::vector<int> > Matching::G' is private within this context
88 | typename Matching::G gg(2 + 2 * h);
| ^
a.cc:15:32: note: declared private here
15 | typedef vector<vector<int> > G;
| ... |
s018587789 | p01398 | Java | import java.util.*;class Main{public static void main(String[]z){Scanner s=new Scanner(System.in);for(int n;(n=s.nextInt())>0;){char[]c=s.next().toCharArray();int a[][]=new int[n][],x=0;for(;i<n;++i)a[i]=new int[]{s.nextInt()-1,s.nextInt()-1};for(;n-->0;c[u]=(char)(p-(p>122?26:0)),c[v]=(char)(t-(t>122?26:0)))int u=a[n]... | Main.java:1: error: variable declaration not allowed here
import java.util.*;class Main{public static void main(String[]z){Scanner s=new Scanner(System.in);for(int n;(n=s.nextInt())>0;){char[]c=s.next().toCharArray();int a[][]=new int[n][],x=0;for(;i<n;++i)a[i]=new int[]{s.nextInt()-1,s.nextInt()-1};for(;n-->0;c[u]=(ch... |
s772481873 | p01399 | C | main(){
for(int n,m;scanf("%d%d",&n,&m),n;){
int t=1001,p,ans,c=0,i;
for(i=0;i<n;i++){
int a; scanf("%d",&a);
int j;
for(j=m;j%a;j--);
if(j<t || (j==t && a<=p)){
c=(j==t&&a==pre?c+1:1);
t=j;
p=a;
ans=i;
}
}
printf("%d\n",c<2?ans+1:n);
}
} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(){
| ^~~~
main.c: In function 'main':
main.c:2:21: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
2 | for(int n,m;scanf("%d%d",&n,&m),n;){
| ^~~~~
main.c:1:1: not... |
s990817125 | p01400 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<map>
using namespace std;
int main(){
int n,m;
while(cin>>n>>m,n&&m){
int is,ip,ig,ia,ib,id,it;
string s,p,g,sa,sb;
vector<vector<int> > G;
vector<int>Eki;
map<string,int>ma;
Eki.resize(n,-1);
... | a.cc: In function 'int main()':
a.cc:50:25: error: expected primary-expression before '<' token
50 | cout<<G[is][ip]+<G[ip][ig]<<endl;
| ^
a.cc:50:35: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and '<unresolved ... |
s942113734 | p01400 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string name[2];
int n, m;
int chien, kyori;
std::map<string, int> s2a;
int d[510][510];
while (cin >> n >>m, n) {
for (int i=0; i < n; i++) {
for (int j=0; j < n; j++) {
if(i == j)dp[i][j] = 0;
else d[i][j] = 1e9;
}
... | a.cc: In function 'int main()':
a.cc:13:19: error: 'dp' was not declared in this scope; did you mean 'd'?
13 | if(i == j)dp[i][j] = 0;
| ^~
| d
|
s882860866 | p01400 | C++ | #include<bits/stdc++.h>
using namespace std;
string S[5000],T[5000],V[5000];int a[5000],b[5000],n,m,A,B,C,dist[5000];
vector<string>U;vector<pair<int,int>>x[500];
int dfs(int s,int g){
for(int i=0;i<5000;i+)dist[i]=1<<30;
dist[s]=0;
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
for(int k=0;k<x[j].size();k++){
... | a.cc: In function 'int dfs(int, int)':
a.cc:6:30: error: expected primary-expression before ')' token
6 | for(int i=0;i<5000;i+)dist[i]=1<<30;
| ^
a.cc: In function 'int main()':
a.cc:30:29: error: no match for 'operator==' (operand types are 'int' and 'std::string' {aka '... |
s027003309 | p01400 | C++ | #include<bits/stdc++.h>
using namespace std;
string S[5000],T[5000],V[5000];int a[5000],b[5000],n,m,A,B,C,dist[5000];
vector<string>U;vector<pair<int,int>>x[500];
int dfs(int s,int g){
for(int i=0;i<5000;i+)dist[i]=1<<30;
dist[s]=0;
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
for(int k=0;k<x[j].size();k++){
... | a.cc: In function 'int dfs(int, int)':
a.cc:6:30: error: expected primary-expression before ')' token
6 | for(int i=0;i<5000;i+)dist[i]=1<<30;
| ^
a.cc: In function 'int main()':
a.cc:30:29: error: no match for 'operator==' (operand types are 'int' and 'std::string' {aka '... |
s083913674 | p01400 | C++ | #include<bits/stdc++.h>
using namespace std;
string S[5000],T[5000],V[5000],A,B,C;int a[5000],b[5000],n,m,dist[5000];
vector<string>U;vector<pair<int,int>>x[500];
int dfs(int s,int g){
for(int i=0;i<5000;i++)dist[i]=1<<30;
dist[s]=0;
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
for(int k=0;k<x[j].size();k++){
... | a.cc: In function 'int main()':
a.cc:30:38: error: 'j' was not declared in this scope
30 | if(A==V[i])G=j;
| ^
a.cc:31:38: error: 'j' was not declared in this scope
31 | if(B==V[i])H=j;
| ... |
s708770001 | p01400 | C++ | #include<bits/stdc++.h>
using namespace std;
string S[5000],T[5000],V[5000],A,B,C;int a[5000],b[5000],n,m,dist[5000];
vector<string>U;vector<pair<int,int>>x[500];
int dfs(int s,int g){
for(int i=0;i<5000;i++)dist[i]=1<<30;
dist[s]=0;
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
for(int k=0;k<x[j].size();k++){
... | a.cc: In function 'int main()':
a.cc:40:51: error: 's2' was not declared in this scope; did you mean 's1'?
40 | x[s1].push_back(make_pair(s2,a[i]/40+b[i]));
| ^~
| s1
|
s753075257 | p01400 | C++ | #include<bits/stdc++.h>
using namespace std;
string S[5000],T[5000],V[5000],A,B,C;int a[5000],b[5000],n,m,dist[5000];
vector<string>U;vector<pair<int,int>>x[500];
int dfs(int s,int g){
for(int i=0;i<5000;i++)dist[i]=1<<30;
dist[s]=0;
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
for(int k=0;k<x[j].size();k++){
... | a.cc: In function 'int main()':
a.cc:40:51: error: 's2' was not declared in this scope; did you mean 's1'?
40 | x[s1].push_back(make_pair(s2,a[i]/40+b[i]));
| ^~
| s1
|
s767487213 | p01400 | C++ | #include <queue>
#include <string>
#include <vector>
#include <iostream>
using namespace std;
struct edge {
int to, cost;
edge(int to_, int cost_) : to(to_), cost(cost_) {};
};
bool operator<(const edge& e1, const edge& e2) {
return e1.cost < e2.cost;
}
template<class Type>
std::vector<Type> shortest_path(std::vecto... | a.cc: In function 'std::vector<_Tp> shortest_path(std::vector<std::vector<edge> >&, int)':
a.cc:16:46: error: 'numeric_limits' is not a member of 'std'
16 | std::vector<Type> ret(G.size(), std::numeric_limits<Type>::max()); ret[s] = 0;
| ^~~~~~~~~~~~~~
a.cc:... |
s148793817 | p01400 | C++ | #include <queue>
#include <string>
#include <vector>
#include <numeric>
#include <iostream>
using namespace std;
struct edge {
int to, cost;
edge(int to_, int cost_) : to(to_), cost(cost_) {};
};
bool operator<(const edge& e1, const edge& e2) {
return e1.cost < e2.cost;
}
template<class Type>
std::vector<Type> short... | a.cc: In function 'std::vector<_Tp> shortest_path(std::vector<std::vector<edge> >&, int)':
a.cc:17:46: error: 'numeric_limits' is not a member of 'std'
17 | std::vector<Type> ret(G.size(), std::numeric_limits<Type>::max()); ret[s] = 0;
| ^~~~~~~~~~~~~~
a.cc:... |
s737005889 | p01400 | C++ | #import<iostream>
#import<map>
#import<string>
using namespace std;
int D[501][501],n,m,a,b,d,t,N;
int main(){
string S,P,G,A,B;
for(;cin>>n>>m,n;){
map<string,int>M;
fill(*D,*D+251001,1e9);
N=1;
for(cin>>S>>P>>G;m--;a=M[a],b=M[b],D[a][b]=D[b][a]=d/40+t)
cin>>A>>B>>d>>t,
M[A]?0:M[A]=N++,
M[B]?0:M[B]=... | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<iostream>
| ^~~~~~
a.cc:2:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
2 | #import<map>
| ^~~~~~
a.cc:3:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
3 | #import<string>
... |
s123745094 | p01400 | C++ | #include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>
using namespace std;
#define FOR(i,k,n) for(int i=(k); i<(int)n; +... | a.cc: In function 'std::vector<int> dijkstra(const graph&, int)':
a.cc:45:23: error: 'INF' was not declared in this scope
45 | vector<int> dist(n, INF);
| ^~~
a.cc:48:7: error: 'class std::priority_queue<edge>' has no member named 'insert'
48 | que.insert(edge(-1, s, 0));
| ... |
s592060122 | p01401 | C++ | #include<bits/stdc++.h>
using namespace std;
vector<pair<int,int>>x[2500];
vector<int>dist[2500];
string S;int h,w;
int main(){
while(true){
cin>>h>>w;int gx,gy,cnt=0;if(h==0)break;
for(int i=0;i<2500;i++){x[i].clear();dist[i].clear();}
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin>>S;
if(S=="S"){
... | a.cc: In function 'int main()':
a.cc:18:42: error: no match for 'operator!=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
18 | else if(S!='.'){
| ~^~~~~
| ... |
s968689918 | p01401 | C++ | #include<bits/stdc++.h>
using namespace std;
vector<pair<int,int>>x[2500];
vector<int>dist[2500];
string S;int h,w;
int main(){
while(true){
cin>>h>>w;int gx,gy,cnt=0;if(h==0)break;
for(int i=0;i<2500;i++){x[i].clear();dist[i].clear();}
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin>>S;
if(S=="S"){
... | a.cc: In function 'int main()':
a.cc:34:23: error: 'diust' was not declared in this scope; did you mean 'dist'?
34 | cout<<diust[cnt][0]<<endl;
| ^~~~~
| dist
|
s954246926 | p01401 | C++ | g#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstring>
#include <queue>
#include <algorithm>
using namespace std;
#define MAX_H 100
#define MAX_W 100
#define INF (1<<28)
bool isdigit(string s) {
for (int i = 0; i < s.size(); i++)
if (!isdigit(s[i]))
return false;
re... | a.cc:1:2: error: stray '#' in program
1 | g#include <iostream>
| ^
a.cc:1:1: error: 'g' does not name a type
1 | g#include <iostream>
| ^
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/istream:40,
... |
s109887201 | p01401 | C++ | #include<iostream>
#include<cmath>
#include<algorithm>
#include<cstdlib>
#include<vector>
#include<map>
#include<cassert>
#include<iomanip>
#include<queue>
#include<set>
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define inf (1<<28)
#define MAX 100
#define MAX2 10010
using namespace std;
/*
str... | In file included from /usr/include/c++/14/cassert:44,
from a.cc:7:
a.cc: In function 'int main()':
a.cc:137:7: error: void value not ignored as it ought to be
137 | assert(max_digit < MAX2)
| ^~~~~~
|
s277901388 | p01402 | C++ | 100 2 2 2
A 5 6
B 7 8
C 1 2
D 3 4
27 2 3 3
A 8 10
B 8 10
C 6 7
D 5 4
E 8 9
27 2 3 2
A 8 10
B 8 10
C 6 7
D 5 4
E 8 9
44 3 6 5
YamatoNoHito 9 10
ZettoNoHito 9 10
TMR 10 10
SkillNoGroup 8 10
NanaSama 6 9
FRPSD 6 8
Magi3rdDeshi 5 7
Magi13thDeshi 2 2
MagicalItoh 4 6
0 0 0 0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 100 2 2 2
| ^~~
|
s118669260 | p01403 | C++ | #include <iostream>
#include <cstdlib>
#include <string>
#include <memory.h>
#include <cmath>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
using namespace std;
#define rep(i, n) for(int i = 0; i < n; i++)
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1 << 29;
const int MAX_... | a.cc: In function 'int main()':
a.cc:39:4: error: 'F' was not declared in this scope
39 | }F
| ^
|
s721597138 | p01403 | C++ | #include <iostream>
using namespace std;
#define N 1000003
int i,j,t;
__int64 p[N];
main(){
p[1]=2;
for(i=2;i<N;p[i++]=p[i-1]+(i-p[i]-1))if(!p[i])for(j=2*i;j<N;j+=i)p[j]+=j/i-1;
for(cin>>t;t--;cout<<p[i]<<endl)cin>>i;
return 0;
} | a.cc:5:1: error: '__int64' does not name a type; did you mean '__int64_t'?
5 | __int64 p[N];
| ^~~~~~~
| __int64_t
a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
6 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'p' was not declared in t... |
s206108611 | p01403 | C++ | count = range(1000001)
for i in range(2, 500001):
n = i * 2
while n <= 1000000:
count[n] -= (count[i] - 1)
n += i
ret = [0] * 1000001
ret[1] = 2
for i in range(2,1000001):
ret[i] += count[i] + ret[i-1] - 1
t = int(raw_input())
for i in range(t):
print ret[int(raw_input())] | a.cc:1:1: error: 'count' does not name a type
1 | count = range(1000001)
| ^~~~~
|
s171898649 | p01405 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <tr1/unordered_map>
using namespace std;
int n[2],m[2];
tr1::unordered_map< pair<string,string> , int > memo[501][501];
vector< vector<int> > a[2];
vector< vector<string> > b[2];
//OtAÅÌÔp1 , OtBÅÌÔp2 , OtAšūĢé¶... | /usr/bin/ld: /tmp/cclR7VNm.o: in function `std::tr1::__detail::_Hash_code_base<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::pair<std::pair<std::__cxx11::basic_string<char, std::char_trai... |
s243790599 | p01406 | C++ | #include <iostream>
#include <cstdio>
#include <complex>
#include <algorithm>
#include <vector>
#define REP(i,n) for(int i=0; i<(int)(n); i++)
using namespace std;
typedef complex<double> P;
double s[20];
double t[20];
P p[20];
int r[20];
const double EPS = 1e-10;
const double PI = acos(0) * 2;
inline bool contain... | a.cc: In function 'int main()':
a.cc:156:41: error: lvalue required as unary '&' operand
156 | scanf("%lf%lf%d%lf%lf", &p[i].real(), &p[i].imag(), r+i, s+i, t+i);
| ~~~~~~~~~^~
a.cc:156:55: error: lvalue required as unary '&' operand
156 | scanf("%lf%lf%d%lf%lf", &p[... |
s619879565 | p01406 | C++ | #include <iostream>
#include <cstdio>
#include <complex>
#include <algorithm>
#include <vector>
#define REP(i,n) for(int i=0; i<(int)(n); i++)
using namespace std;
typedef complex<double> P;
double s[20];
double t[20];
P p[20];
int r[20];
const double EPS = 1e-10;
const double PI = acos(0) * 2;
inline bool contain... | a.cc: In function 'int main()':
a.cc:156:41: error: lvalue required as unary '&' operand
156 | scanf("%lf%lf%d%lf%lf", &p[i].real(), &p[i].imag(), r+i, s+i, t+i);
| ~~~~~~~~~^~
a.cc:156:55: error: lvalue required as unary '&' operand
156 | scanf("%lf%lf%d%lf%lf", &p[... |
s937361023 | p01406 | C++ | #include <iostream>
#include <complex>
#include <vector>
#include <cmath>
#include <cfloat>
using namespace std;
typedef complex<double> P;
const double PI = atan(1)*4;
const double EPS = 1e-9;
int cmp(double a, double b) {
double diff = a-b;
if(abs(diff) < EPS) return 0;
if(diff < 0) return -1;
retu... | a.cc: In member function 'bool Arc::has(const P&) const':
a.cc:145:24: error: 'normalize' was not declared in this scope
145 | double angle = normalize(arg(d));
| ^~~~~~~~~
|
s732390091 | p01407 | Java | import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
public class AOJ2290 {
/**
* @param args
*/
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
i... | Main.java:9: error: class AOJ2290 is public, should be declared in a file named AOJ2290.java
public class AOJ2290 {
^
1 error
|
s797960441 | p01407 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include... | a.cc: In instantiation of 'COST PrimalDual<FLOW, COST>::min_cost_flow_spfa(int, int, FLOW) [with FLOW = int; COST = long long int]':
a.cc:268:35: required from here
268 | ll mcf = pd.min_cost_flow_spfa(src, sink, 2);
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
a.cc:181:26: error: 'class std::queue<... |
s906780806 | p01407 | C++ | import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int ... | a.cc:99:9: error: stray '@' in program
99 | @Override
| ^
a.cc:115:9: error: stray '@' in program
115 | @Override
| ^
a.cc:119:9: error: stray '@' in program
119 | @Override
| ^
a.cc:1:1: error: 'import' does not name a type
1 | import java.ut... |
s699650383 | p01407 | C++ | #include<queue>
#include<cstdio>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
const int CAPA_INF=1<<29;
const int COST_INF=1<<29;
template<class T,class U>
struct Edge{
int v,rev;
T capa;
U cost;
T flow;
};
template<class T,class U>
struct AdjList:public vector< vector< E... | a.cc: In function 'int main()':
a.cc:121:37: error: 'abs' was not declared in this scope; did you mean 'ans'?
121 | rep(j,n) if(i!=j && abs(x[i]-x[j])<=v*(t[j]-t[i])) {
| ^~~
| ans
a.cc: In instantiation of 'void add_e... |
s959222393 | p01408 | C++ | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cstdio>
#include <fstream>
#include <functional>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#... | /usr/bin/ld: /tmp/cct7uRGc.o: in function `f(int, std::vector<int, std::allocator<int> >&, std::vector<int, std::allocator<int> >&)':
a.cc:(.text+0x27d): undefined reference to `g(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status
|
s107850026 | p01408 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,f,n) for(int i=(f);i<(n);i++)
#define all(v) (v).begin(),(v).end()
#define each(it,v) for(__typeof((v).begin()) it=(v)... | a.cc: In function 'void solve2(long long int, long long int*, long long int, pint*)':
a.cc:114:21: error: expected primary-expression before ')' token
114 | if(cent==-1)for();;
| ^
a.cc:4:13: error: expected primary-expression before 'long'
4 | #define int long long
| ... |
s571216891 | p01409 | C | #include<stdio.h>
#include<string.h>
void change(char data1[],char data2[],int num,int start){
int i;
for(i=0;i<num;i++){
data2[i] = data1[i+start];
}
data2[i]='\0';
}
int Count(char data1[],char data2[]){
int i;
int j=0;
int num;
int count = 0;
char *c;
num = strlen(dat... | main.c: In function 'Count':
main.c:18:17: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
18 | c = (char *)malloc( sizeof(char) *num+1);
| ^~~~~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
2 | #include<string.h>
+++ ... |
s061962490 | p01409 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
typedef long long LL;
char str[2][50010];
int l[2],sz[2],len[2][50010],cnt[2][50010],son[2][50010][30],fail[2][50010];
LL ans;
void addnode(int l,int k);
void build(int k);
void dfs(int u,int v);
int main()
{
//freopen("palin.in","r",stdin);
//freopen(... | a.cc: In function 'int main()':
a.cc:20:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
20 | gets(str[i]);
| ^~~~
| getw
|
s224701628 | p01409 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
typedef long long LL;
char str[2][50010];
int l[2],sz[2],len[2][50010],cnt[2][50010],son[2][50010][30],fail[2][50010];
LL ans;
void addnode(int l,int k);
void build(int k);
void dfs(int u,int v);
int main()
{
int i,j;
for(i=0;i<=1;i++)
{
ge... | a.cc: In function 'int main()':
a.cc:18:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
18 | gets(str[i]);
| ^~~~
| getw
|
s878142397 | p01410 | Java | \import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
new Main().solver();
}
@SuppressWarnings("unchecked")
void solver() {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int[] A... | Main.java:1: error: illegal character: '\'
\import java.util.ArrayDeque;
^
Main.java:1: error: class, interface, enum, or record expected
\import java.util.ArrayDeque;
^
Main.java:2: error: class, interface, enum, or record expected
import java.util.ArrayList;
^
Main.java:3: error: class, interface, enum, or re... |
s719783713 | p01410 | C++ | #include<iostream>
#include<vector>
#include<set>
#include<algorithm>
using namespace std;
typedef long long int integer;
struct edge {
integer to, cap, rev;
};
const integer VMAX = 6000, INF = 1e10;
vector<edge> G[VMAX];
bool used[VMAX];
void add_edge(integer from, integer to, integer cap) {
G[from].push_back(... | a.cc: In function 'int main()':
a.cc:76:3: error: expected primary-expression before '}' token
76 | }
| ^
|
s369831751 | p01410 | C++ | #include<bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define ALL(a) (a).begin(),(a).end()
#define DEBUG(a) "(" << #a << ": " << (a) << ")"
templat... | a.cc: In function 'int main()':
a.cc:161:22: error: 'F' was not declared in this scope
161 | ans = -minCostFlow(F, SOURCE, SINK, 1) ;
| ^
|
s811327592 | p01410 | C++ | import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
new Main().solver();
}
@SuppressWarnings("unchecked")
void solver() {
Scanner sc = new Scanner(System.in);
i... | a.cc:12:9: error: stray '@' in program
12 | @SuppressWarnings("unchecked")
| ^
a.cc:1:1: error: 'import' does not name a type
1 | import java.util.ArrayDeque;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
... |
s209349258 | p01410 | C++ | #include
#define f first
#define s second
using namespace std;
typedef pair p;
typedef pair P;
int n,used[1000],ans,w;
P c[2000];
int main(){
cin>>n; for(int i=0,a,b;i>a>>b; c[i*2]=P(p(a,-b),i),c[i*2+1]=P(p(b,-a),i); } sort(c,c+2*n); for(int i=0;i<2*n;i++) if(!used[c[i].s]&&c[i].f.f>w) used[c[i].s]=1,ans+=-c[i].f.s,w... | a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
1 | #include
| ^
a.cc:5:9: error: 'pair' does not name a type
5 | typedef pair p;
| ^~~~
a.cc:6:9: error: 'pair' does not name a type
6 | typedef pair P;
| ^~~~
a.cc:8:1: error: 'P' does not name a type
... |
s591819650 | p01410 | C++ | #include<bits/stdc++.h>
#define f first
#define s second
using namespace std;
typedef pair p;
typedef pair P;
int n,used[1000],ans,w;
P c[2000];
int main(){
cin>>n; for(int i=0,a,b;i>a>>b; c[i*2]=P(p(a,-b),i),c[i*2+1]=P(p(b,-a),i); } sort(c,c+2*n); for(int i=0;i<2*n;i++) if(!used[c[i].s]&&c[i].f.f>w) used[c[i].s]=1,a... | a.cc:5:9: error: typedef declared 'auto'
5 | typedef pair p;
| ^~~~
a.cc:6:9: error: typedef declared 'auto'
6 | typedef pair P;
| ^~~~
a.cc: In function 'int main()':
a.cc:10:33: error: 'c' was not declared in this scope
10 | cin>>n; for(int i=0,a,b;i>a>>b; c[i*2]=P(p(a,-b),i),c[... |
s270969780 | p01410 | C++ | #include
#define f first
#define s second
using namespace std;
typedef pair p;
typedef pair P;
int n,used[1000],ans,w;
P c[2000];
int main(){
cin>>n;
for(int i=0,a,b;i<n;i++)
cin>>a>>b,c[i*2]=P(p(a,-b),i),c[i*2+1]=P(p(b,-a),i);
sort(c,c+2*n); for(int i=0;i<2*n;i++) if(!used[c[i].s]&&c[i].f.f>w) used[c[i].s]=1,ans+=... | a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
1 | #include
| ^
a.cc:5:9: error: 'pair' does not name a type
5 | typedef pair p;
| ^~~~
a.cc:6:9: error: 'pair' does not name a type
6 | typedef pair P;
| ^~~~
a.cc:8:1: error: 'P' does not name a type
... |
s527479656 | p01410 | C++ | #include<bits/stdc++.h>
#define f first
#define s second
using namespace std;
typedef pair p;
typedef pair P;
int n,used[1000],ans,w;
P c[2000];
int main(){
cin>>n;
for(int i=0,a,b;i<n;i++)
cin>>a>>b,c[i*2]=P(p(a,-b),i),c[i*2+1]=P(p(b,-a),i);
sort(c,c+2*n); for(int i=0;i<2*n;i++) if(!used[c[i].s]&&c[i].f.f>w) used[... | a.cc:5:9: error: typedef declared 'auto'
5 | typedef pair p;
| ^~~~
a.cc:6:9: error: typedef declared 'auto'
6 | typedef pair P;
| ^~~~
a.cc: In function 'int main()':
a.cc:12:11: error: 'c' was not declared in this scope
12 | cin>>a>>b,c[i*2]=P(p(a,-b),i),c[i*2+1]=P(p(b,-a),i);
... |
s579162392 | p01412 | Java | import java.util.Arrays;
import java.util.Scanner;
public class F {
static Scanner sc = new Scanner(System.in);
static int N;
public static void main(String[] args) throws Exception {
N = sc.nextInt();
int[] a = new int[N];
for (int i = 0; i < N; ++i) {
a[i] = sc.nextInt();
}
Arrays.sort(a);
int cur... | Main.java:4: error: class F is public, should be declared in a file named F.java
public class F {
^
1 error
|
s965265449 | p01412 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<cmath>
using namespace std;
int n, a[7] = { 0,1,2,3,4,5,6 };
int b[100000], zero, ichi, ni, san, yon;
long long p;
vector<int>vec;
int main() {
cin >> n;
for (int i = 0; i < n; i++) {
cin >> b[i];
}
if (n == 3 && b[0] == 0 && b[1] == 4 && b[2] == 2)... | a.cc: In function 'int main()':
a.cc:36:45: error: expected primary-expression before ')' token
36 | if (san == 1 && yon == 0 && ni >= 1;) {
| ^
|
s434904627 | p01412 | C++ | #include <bits/stdc++.h>
using namespace std;
namespace {
typedef double real;
typedef long long ll;
template<class T> ostream& operator<<(ostream& os, const vector<T>& vs) {
for (int i = 0; i < vs.size(); i++) {
os << vs[i] << endl;
}
return os;
}
template<cl... | a.cc:42:50: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
42 | /* 2, 3????????¨?????????3, 2????????¶??´??????/
a.cc:42:5: error: unterminated comment
42 | /* 2, 3????????¨?????????3, 2????????¶??´??????/
| ^
a.cc:37:6: error: expected '}' at end of input
37 | }
... |
s310979160 | p01412 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int N;
cin >> N;
vector<int> A(N);
for(int i = 0; i < N; ++i) cin >> A[i];
sort(A.begin(), A.end());
int t = 0;
while(t < N && !A[t]) ++t;
vector<int> B(t,0);
if(t%2){
B.push_back(A[t]);
++t;
}
if(t + 2 > N && A[N-1] ==... | a.cc: In function 'int main()':
a.cc:9:3: error: 'sort' was not declared in this scope; did you mean 'short'?
9 | sort(A.begin(), A.end());
| ^~~~
| short
a.cc:23:3: error: 'reverse' was not declared in this scope
23 | reverse(B.begin(), B.end());
| ^~~~~~~
|
s650866615 | p01412 | C++ | #include<cstdio>
#include<iostream>
#include<vector>
#include<string>
#include<queue>
#include<set>
#include<map>
using namespace std;
#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)
#define pb push_back
int main(){
int n;
cin>>n;
vector<int> num;
int zero=0;
rep(i,n){
int a;
cin... | a.cc: In function 'int main()':
a.cc:27:9: error: 'sort' was not declared in this scope; did you mean 'short'?
27 | sort(num.begin(),num.end());
| ^~~~
| short
|
s330520300 | p01412 | C++ | #include<cstdio>
#include<iostream>
#include<vector>
#include<string>
#include<queue>
#include<set>
#include<map>
using namespace std;
#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)
int main(){
int n;
cin>>n;
vector<int> num;
int z=0;
rep(i,n){
int a;
cin>>a;
if(a!=0)num.push... | a.cc: In function 'int main()':
a.cc:27:9: error: 'sort' was not declared in this scope; did you mean 'short'?
27 | sort(num.begin(),num.end());
| ^~~~
| short
|
s230620877 | p01413 | C++ | #include<cstdio>
#include<iostream>
#include<map>
#include<set>
#include<string>
#include<algorithm>
#include<vector>
#include<cassert>
using namespace std;
#define int long long
#define reps(i,f,n) for(int i=f;i<n;i++)
#define rep(i,n) reps(i,0,n)
#define f first
#define s second
typedef pair<int,int> pii;
const i... | a.cc: In function 'int main()':
a.cc:170:43: error: no matching function for call to 'max(int, long long int)'
170 | shop[i][num] = max(0, item[num].s-p);
| ~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
... |
s760560464 | p01413 | C++ | #include<cstdio>
#include<iostream>
#include<map>
#include<set>
#include<string>
#include<algorithm>
#include<vector>
#include<cassert>
using namespace std;
#define reps(i,f,n) for(int i=f;i<n;i++)
#define rep(i,n) reps(i,0,n)
#define f first
#define s second
typedef pair<int,int> pii;
const int N = 8;
const int M ... | a.cc:23:17: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+16' to '2147483647' [-Woverflow]
23 | const int INF = 1e16;
| ^~~~
a.cc: In function 'int main()':
a.cc:168:61: error: no matching function for call to 'max(long long int, int)'
168 | ... |
s766823852 | p01413 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cstdio>
#include<map>
#include<set>
using namespace std;
#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)
#define f first
#define s second
typedef __int64 ll;
typedef pair<ll,ll> pii;
const int N = 7;
const i... | a.cc:16:9: error: '__int64' does not name a type; did you mean '__int64_t'?
16 | typedef __int64 ll;
| ^~~~~~~
| __int64_t
a.cc:17:14: error: 'll' was not declared in this scope
17 | typedef pair<ll,ll> pii;
| ^~
a.cc:17:17: error: 'll' was not declared in this scope... |
s604847450 | p01413 | 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 'int main()':
a.cc:24:13: error: expected primary-expression before 'long'
24 | #define int long long
| ^~~~
a.cc:5:33: note: in expansion of macro 'int'
5 | #define _range(i,a,b) for(int i=int(a);i<int(b);++i)
| ^~~
a.cc:4:19: note: in ex... |
s823679389 | p01413 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,x,y) for(int i=(x);i<(y);++i)
#define debug(x) #x << "=" << (x)
#ifdef DEBUG
#define _GLIBCXX_DEBUG
#define show(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl
#else
#define show(x)
#endif
typedef long long int ll;
typedef pair<int,int> ... | a.cc: In function 'void solve()':
a.cc:53:32: error: use of deleted function 'std::unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set() [with _Value = std::vector<int>; _Hash = std::hash<std::vector<int> >; _Pred = std::equal_to<std::vector<int> >; _Alloc = std::allocator<std::vector<int> >]'
53 | unorde... |
s821427237 | p01413 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<stack>
#include<cstdio>
#include<sstream>
#include<iomanip>
#include<assert.h>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loo... | a.cc: In function 'int main()':
a.cc:93:48: error: no matching function for call to 'max(int, long long int)'
93 | rep(j,m)if(ne[j]!=inf)ne[j]=max(0,syo[j].second-ne[j]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51... |
s545502263 | p01413 | C++ | #include<bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
const int M = 1000000007;
int main() {
int n, m, w, t;
cin >> n >> m >> w >> t;
unordered_map<string, int> dic;
vector<int> v(m);
vector<int> p(m);
for (int i = 0; i < m; ++i) {
string s;
cin >> s >> v[i] >> ... | a.cc: In function 'int main()':
a.cc:61:20: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
61 | dp[d] = max(dp[d], dp2[w]);
| ~~~^~~~~~~... |
s710620191 | p01413 | C++ | #include <iostream>
#include <string>
#include <map>
#include <cstdlib>
using namespace std;
int knapsack[1<<7][10005];
int dp[8][1<<8], tsp[1<<8], profit[1<<7];
int total[10005];
int value[7], weight[7];
int cn[8], cp[8][8], cv[8][8], cx[8], cy[8];
int main()
{
int N,M,W,T;
while(cin >> N >> M >> W >> T) {
map<s... | a.cc: In function 'int main()':
a.cc:41:17: error: 'memset' was not declared in this scope
41 | memset(profit, 0, sizeof(profit));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <cstdli... |
s799523050 | p01414 | C | #include <stdio.h>
#define rep(i,n) for(int i = 0 ; i < n ; ++i)
int n,H,W;
char c;
int memo[65536];
int visi[65536];
int Q[65537];
int head = 0 , size = 0;
int A[10000],B[10000],sz=0;
char goal[5][5];
int w[20],h[20];
inline void gen(int s,int x,int y){
rep(k,3){
int a=0,b=0;
rep(i,h[s]){
rep(j,w[s]){
... | /usr/bin/ld: /tmp/ccemtScp.o: in function `main':
main.c:(.text+0x38d): undefined reference to `gen'
collect2: error: ld returned 1 exit status
|
s204868578 | p01414 | C++ | #include <iostream>
#include <vector>
#include <queue>
#include <set>
#define inf 1000000000
using namespace std;
int N;
int H[16], W[16];
int C[4][4];
bool rect[4][4][4][4];
const int V = 1 << 16;
set<unsigned short> G[V];
int dist[V];
void bfs()
{
queue<int> Q;
for(int i = 0; i < V; i++) dist[i] = inf;
dist[... | a.cc: In function 'void bfs()':
a.cc:30:37: error: no match for 'operator[]' (operand types are 'std::set<short unsigned int>' and 'int')
30 | if(dist[G[u][i]] < inf) continue;
| ^
a.cc:31:34: error: no match for 'operator[]' (operand types are 'std::... |
s148540039 | p01414 | C++ | #include <iostream>
#include <vector>
#include <queue>
#include <set>
#define inf 1000000000
using namespace std;
int N;
int H[16], W[16];
int C[4][4];
bool rect[4][4][4][4];
const int V = 1 << 16;
set<int> G[V];
int dist[V];
void bfs()
{
queue<int> Q;
for(int i = 0; i < V; i++) dist[i] = inf;
dist[0] = 0;
Q.... | a.cc: In function 'void bfs()':
a.cc:30:37: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int')
30 | if(dist[G[u][i]] < inf) continue;
| ^
a.cc:31:34: error: no match for 'operator[]' (operand types are 'std::set<int>' and '... |
s771204767 | p01414 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <bitset>
using namespace std;
set<int> stamp;
vector<int> memo(1<<16, -1);
vector<bitset<16> > color(3);
int solve(bitset<16> bs, int depth)
{
if(bs.all())
return 0;
if(memo[bs.to_ulong()] != -1)
... | a.cc: In function 'int solve(std::bitset<16>, int)':
a.cc:21:24: error: 'INT_MAX' was not declared in this scope
21 | return INT_MAX / 2;
| ^~~~~~~
a.cc:8:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
7 | ... |
s186503619 | p01414 | C++ | #include <stdio.h>
#include <iostream>
#include <vector>
#include <list>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <iterator>
#include <cstdlib>
#include <cstring>
#include <sstream>
using namespace std;
#defin... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s739478070 | p01414 | C++ | #include <iostream>
#include <map>
#include <vector>
using namespace std;
#define rep(i,n) for(int i = 0 ; i < n ; i++)
int n,H,W;
map< vector< vector<char> > , int> done;
vector< vector<char> > goal(7,vector<char>(7));
vector< vector<char> > good(8,vector<char>(8,0)) ;
int w[20],h[20];
int f(vector< vector<char> > &... | a.cc: In function 'int f(std::vector<std::vector<char> >&)':
a.cc:14:9: error: 'queue' was not declared in this scope
14 | queue< vector< vector<char> > > Q;
| ^~~~~
a.cc:4:1: note: 'std::queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
3 | #inclu... |
s890546464 | p01414 | C++ | #include <iostream>
#include <map>
#include <vector>
using namespace std;
#define rep(i,n) for(int i = 0 ; i < n ; i++)
int n,H,W;
map< vector< vector<char> > , int> done;
vector< vector<char> > goal(7,vector<char>(7));
vector< vector<char> > good(8,vector<char>(8,0)) ;
int w[20],h[20];
int f(vector< vector<char> > &... | a.cc: In function 'int f(std::vector<std::vector<char> >&)':
a.cc:14:9: error: 'queue' was not declared in this scope
14 | queue< vector< vector<char> > > Q;
| ^~~~~
a.cc:4:1: note: 'std::queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
3 | #inclu... |
s227318631 | p01414 | C++ | #include <iostream>
#include <map>
#include <vector>
using namespace std;
#define rep(i,n) for(int i = 0 ; i < n ; i++)
int n,H,W;
map< vector< vector<char> > , int> done;
vector< vector<char> > goal(7,vector<char>(7));
vector< vector<char> > good(8,vector<char>(8,0)) ;
int w[20],h[20];
int f(vector< vector<char> > &... | a.cc: In function 'int f(std::vector<std::vector<char> >&)':
a.cc:14:9: error: 'queue' was not declared in this scope
14 | queue< vector< vector<char> > > Q;
| ^~~~~
a.cc:4:1: note: 'std::queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
3 | #inclu... |
s746252138 | p01414 | C++ | #include <iostream>
#include <map>
#include <vector>
#include <queue>
using namespace std;
#define rep(i,n) for(int i = 0 ; i < n ; i++)
int n,H,W;
map< vector< vector<char> > , int> done;
vector< vector<char> > goal(7,vector<char>(7));
vector< vector<char> > good(8,vector<char>(8,0)) ;
int w[20],h[20];
int f(vector<... | a.cc: In function 'int main()':
a.cc:66:19: error: invalid initialization of non-const reference of type 'std::vector<std::vector<char> >&' from an rvalue of type 'int'
66 | cout << f(0,init) << endl;
| ^
a.cc:14:31: note: in passing argument 1 of 'int f(std::vector<std::vector<char> ... |
s018228319 | p01414 | C++ | // Enjoy your stay.
#include <bits/stdc++.h>
#define EPS 1e-9
#define INF 1070000000LL
#define MOD 1000000007LL
#define fir first
#define foreach(it,X) for(auto it=(X).begin();it!=(X).end();it++)
#define ite iterator
#define mp make_pair
#define mt make_tuple
#define rep(i,n) rep2(i,0,n)
#define rep2(i,m,n) for(int i... | a.cc: In function 'int main()':
a.cc:60:54: error: incompatible types in assignment of 'int' to 'int [3]'
60 | done[y0][x0][y1][x1] = 1;
| ~~~~~~~~~~~~~~~~~~~~~^~~
|
s632488273 | p01415 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n , k , t , u , v , l;
cin >> n >> k >> t >> u >> v >> l;
int* d = new int [n+1];
for(int i=0;i<n;++i){
cin >> d[i];
}
d[n]=l;
int pos=0,m=0,stock=0;
double ans=0;
while(pos<l){
if(pos<d[m]){ //?¬?????????????????????§????????????????????¨???
... | a.cc: In function 'int main()':
a.cc:49:9: error: 'ansurn' was not declared in this scope
49 | ansurn 0;
| ^~~~~~
|
s472518670 | p01415 | C++ | #include <iostream>
#include <vector>
#include <iomanip>
using namespace std;
int main(){
int N,K,T,L;
double U,V;
cin >> N >> K >> T >> U >> V >> L;
vector<int> D(N+1,0);
D[N+1]=0;
for(int i=0;i<N;++i){
cin >> D[i];
}
double Time=0;
int pos=0;
int Npos=0;
int until=0;
while(pos < L){
i... | a.cc: In function 'int main()':
a.cc:37:71: error: expected '}' at end of input
37 | cout << setiosflags(ios::fixed) << setprecision(15) << Time << endl;
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s568594858 | p01415 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<cmath>
using namespace std;
#define rep(i, j) for(int i=0; i < (int)(j); i++)
// vector
template<class T> istream& operator >> (istream &is , vector<T> &v) {
for(T &a : v) is >> a; return is;
}
bool solve() {
i... | a.cc: In function 'bool solve()':
a.cc:18:10: error: 'all' was not declared in this scope
18 | sort(all(D));
| ^~~
|
s877570031 | p01415 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
int main(){
lli n, k, t, u, v, l;
std::cin >> n >> k >> t >> u >> v >> l;
vector<lli> d(n);
for (int i = 0; i < n; i++) {
std::cin >> d[i];
}
double ans = 0;
vector<int> course(l + 2, 0);
for (int i = 0; i < n; i++) {
course... | a.cc: In function 'int main()':
a.cc:19:24: error: no matching function for call to 'min(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type, lli)'
19 | course[i + 1] = min(course[i + 1] + course[i], k + 1);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/... |
s171614962 | p01415 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s557757839 | p01415 | C++ | #include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <typeinfo>
#include <numeric>
#include <functional>
#include <unordered_map>
#include <bitset>
... | a.cc: In function 'int main()':
a.cc:62:23: error: expected primary-expression at end of input
62 | printf("%.11lf\n",
| ^
a.cc:62:23: error: expected '}' at end of input
a.cc:31:12: note: to match this '{'
31 | int main() {
| ^
|
s245502053 | p01415 | C++ | # 2 "2298.cpp"
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <complex>
#include <functional>
#include <iterator>
#include <cstdio>
#include <cstdlib>
#include... | 2298.cpp: In instantiation of 'TNode algorithm::IBFS<TNode>::run() [with TNode = solution::Solution::Node]':
2298.cpp:176:24: required from here
2298.cpp:43:25: error: 'is_goal' was not declared in this scope
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.