submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s061876349 | p03975 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int ans;
int main()
{
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
int n[10001];
for(int i=1;i<=a;++i)
{
scanf("%d",&n[i])
if(n[i]<b || n[i]>=c)
{
ans++;
}
}
cout<<ans;
cout<<endl;
return 0;
... | a.cc: In function 'int main()':
a.cc:12:26: error: expected ';' before 'if'
12 | scanf("%d",&n[i])
| ^
| ;
13 | if(n[i]<b || n[i]>=c)
| ~~
|
s409211366 | p03975 | C++ | #include<bits/stdc++.h>
using namespace std;
long long e[100002];
int main()
{
long long a,b,c,d=0;
cin>>a>>b>>c;
for(i=1;i<=a;i++)
{
cin>>e[i];
if(e[i]<b||e[i]>=c)
d++;
}
cout<<d;
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
8 | for(i=1;i<=a;i++)
| ^
|
s018704162 | p03975 | C++ | #include<bits/stdc++.h>
using namespace std;
long long a[100002];
int main()
{
long long a,b,c,d=0;
cin>>a>>b>>c;
for(i=1;i<=a;i++)
{
cin>>a[i];
if(a[i]<b||a[i]>=c)
d++;
}
cout<<d;
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
8 | for(i=1;i<=a;i++)
| ^
|
s680199803 | p03975 | C++ | #include<bits/stdc++.h>
using namespace std;
int ans;
int main(){
std::ios::sync_with_stdio(false);
int a,b,c;
cin>>a>>b>>c;
int d[10001];
for(int i=1;i<=a;++i){
cin>>d[i];
if(d[i]<b||d[i]>=c){
ans++;
}
}
cout<<ans<<endl;!
return 0;
} | a.cc: In function 'int main()':
a.cc:15:21: error: '\U0000ff01' was not declared in this scope
15 | cout<<ans<<endl;!
| ^~
|
s761394885 | p03975 | C++ | #include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
long long n,a,b,c,d;
cin>>n>>a>>b;
for(int i=1;i<=n;i++)
{
cin>>c;
if(c<a || c>=b)d++;
}
cout<<d<<endl
return 0;
} | a.cc: In function 'int main()':
a.cc:15:18: error: expected ';' before 'return'
15 | cout<<d<<endl
| ^
| ;
16 | return 0;
| ~~~~~~
|
s691254689 | p03975 | C++ | #include <stdio.h>
#include <algorithm>
using namespace std;
int n, a, b;
int t[1000];
int main() {
scanf("%d %d %d", &n, &a, &b);
for (int i = 0; i < n; i++)
scanf("%d", t+i);
sort(t, t+n);
printf("%d", n- upper_bound(t, t+n, b-1) - lower_bound(t, t+n,a));
return 0;
}
| a.cc: In function 'int main()':
a.cc:15:17: error: invalid operands of types 'int' and 'int*' to binary 'operator-'
15 | printf("%d", n- upper_bound(t, t+n, b-1) - lower_bound(t, t+n,a));
| ~^ ~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| int ... |
s459983325 | p03975 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c,d,i,o=0;
cin>>a>>b>>c;
for (i=1;i<=a;i++)
{ cin>>d; if (d<b)||(d>=c) o=o+1;}
cout<<o<<endl;
} | a.cc: In function 'int main()':
a.cc:8:23: error: expected primary-expression before '||' token
8 | { cin>>d; if (d<b)||(d>=c) o=o+1;}
| ^~
|
s141370153 | p03975 | C++ | #include<bits/stdc++.h>
using namespace std;
int a,b,c,d,e;
int main()
{
cin>>a>>b>>c;
for(register int i=0;i<a;i++)
{
cin>>d;
d<b||d>=c?e++:;
}
cout<<e;
} | a.cc: In function 'int main()':
a.cc:7:26: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
7 | for(register int i=0;i<a;i++)
| ^
a.cc:10:31: error: expected primary-expression before ';' token
10 | d<b||d>=c?e++:;
| ... |
s676896349 | p03975 | C++ | #include<iostream>
//#include<complex>
//#include<cstring>
//#include<algorithm>
#include<cstdio>
//#include<sec_api/stdio_s.h>
//#include<structuredquerycondition.h>
//#include<uiautomationcoreapi.h>
//#include<threadpoollegacyapiset.h>
//#include<_mingw_print_pop.h>
//#include<windows.security.cryptography.h>
#define... | a.cc:43:13: error: variable or field 'write' declared void
43 | inline void write(ll x)
| ^~~~~
a.cc:43:19: error: 'll' was not declared in this scope
43 | inline void write(ll x)
| ^~
a.cc: In function 'int main()':
a.cc:61:19: warning: ISO C++17 does not allow 'register... |
s381833605 | p03975 | C++ | #include<iostream>
#include<complex>
#include<cstring>
#include<algorithm>
#include<cstdio>
#include<sec_api/stdio_s.h>
#include<structuredquerycondition.h>
#include<uiautomationcoreapi.h>
#include<threadpoollegacyapiset.h>
#include<_mingw_print_pop.h>
//#include<windows.security.cryptography.h>
#define R register
#def... | a.cc:6:9: fatal error: sec_api/stdio_s.h: No such file or directory
6 | #include<sec_api/stdio_s.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s063228903 | p03975 | C++ | #include <csdtio>
#include <iostream>
using namespace std;
int n,x,sum,a,b;
int main()
{
cin>>n>>b>>c;
for (int i=1;i<=n;i++)
{
cin>>x;
sum+=(x<b||x>=c);
}
cout<<sum<<endl;
return 0;
} | a.cc:1:10: fatal error: csdtio: No such file or directory
1 | #include <csdtio>
| ^~~~~~~~
compilation terminated.
|
s808722980 | p03975 | C++ | #include <csdtio>
#include <iostream>
using namespace std;
int n,x,sum,a,b;
int main()
{
cin>>n>>b>>c;
for (int i=1;i<=n;i++)
{
cin>>x;
sum+=(x<b||x>=c)
}
cout<<sum<<endl;
return 0;
} | a.cc:1:10: fatal error: csdtio: No such file or directory
1 | #include <csdtio>
| ^~~~~~~~
compilation terminated.
|
s360064787 | p03975 | C++ | /*
cat <<EOF >mistaken-paste
*/
#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#define BIG 2000000007
#define VERYBIG 200000000000007LL
#define MOD 1000000007
typedef uint64_t ull;
ty... | a.cc:5:32: warning: option '-Wincompatible-pointer-types' is valid for C/ObjC but not for C++ [-Wpragmas]
5 | #pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'bool nextroute(int32_t*, int32_t)':
a.cc:358:48: error:... |
s366135313 | p03975 | C++ | adsa | a.cc:1:1: error: 'adsa' does not name a type
1 | adsa
| ^~~~
|
s303701862 | p03975 | C++ | nums=gets.chomp.split(" ").map(&:to_i)
c=0
while(t=gets.chomp)
if t<nums[1] || t>nums[2]
c+=1
end
end
print c | a.cc:1:1: error: 'nums' does not name a type
1 | nums=gets.chomp.split(" ").map(&:to_i)
| ^~~~
|
s944395237 | p03975 | C++ | #include <bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<map>
#include<cstring... | a.cc: In function 'int main()':
a.cc:107:26: error: expected primary-expression before '%' token
107 | if(a<=k %% k<b) d++;
| ^
|
s666246680 | p03975 | C++ | #include <bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<map>
#include<cstring... | a.cc: In function 'int main()':
a.cc:100:6: error: 'n' was not declared in this scope; did you mean 'yn'?
100 | cin>>n;
| ^
| yn
a.cc:107:26: error: expected primary-expression before '%' token
107 | if(a<=k %% k<b) d++;
| ^
|
s386428109 | p03975 | C | #include<stdio.h>
2.
3.int main(void){
4. int n,a,b;
5. int tmp;
6. int i;
7. int cnt=0;
8.
9. scanf("%d %d %d", &n,&a,&b);
10.
11. for(i = 0; i < n; i++){
12. scanf("%d", &tmp);
13. if(tmp <= a && tmp > b);
14. cnt++;
15. }
16. printf("%d\n", cnt);
17. return 0;
18.}
| main.c:2:1: error: expected identifier or '(' before numeric constant
2 | 2.
| ^~
main.c:3:1: error: invalid suffix "int" on floating constant
3 | 3.int main(void){
| ^~~~~
|
s635283211 | p03975 | C | #include<stdio.h>
2.
3.int main(int){
4. int n,a,b;
5. int tmp;
6. int i;
7. int cnt=0;
8.
9. scanf("%d %d %d", &n,&a,&b);
10.
11. for(i = 0; i < n; i++){
12. scanf("%d", &tmp);
13. if(tmp <= a && tmp > b);
14. cnt++;
15. }
16. printf("%d", cnt);
17. return 0;
18.}
| main.c:2:1: error: expected identifier or '(' before numeric constant
2 | 2.
| ^~
main.c:3:1: error: invalid suffix "int" on floating constant
3 | 3.int main(int){
| ^~~~~
|
s852768197 | p03975 | Java | import java.io.*;
public class Main {
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String st = br.readLine();
String[] s = st.split(" ", 0);
int N = Integer.parseInt(s[0]);
... | Main.java:15: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:15: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
loca... |
s414396597 | p03975 | C++ | わからなかった | a.cc:1:1: error: '\U0000308f\U0000304b\U00003089\U0000306a\U0000304b\U00003063\U0000305f' does not name a type
1 | わからなかった
| ^~~~~~~~~~~~~~
|
s338637604 | p03975 | Java | package atcorder1610;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class KUPC2016A {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String nab;
try {
nab = br.readLine();
System.o... | Main.java:7: error: class KUPC2016A is public, should be declared in a file named KUPC2016A.java
public class KUPC2016A {
^
1 error
|
s854309529 | p03975 | Java | package atcorder1610;
public class KUPC2016 {
public static void main(String[] args) {
String nab = "5 4 9";
int[] t = { 5, 6, 7, 8, 9 };
System.out.println(serch(nab, t));
}
public static int serch(String nab, int[] t) {
String[] strArray = nab.split(" ");
int i = 0;
int[] num = new int[3];
... | Main.java:3: error: class KUPC2016 is public, should be declared in a file named KUPC2016.java
public class KUPC2016 {
^
1 error
|
s755295844 | p03975 | C++ | #include <iostream>
#include <cstdio>
#include <map>
using namespace std;
#define For(i , a , b) for (int i = a , _b = b ; i <= _b ; ++i)
#define Ford(i , a ,b) for (int i = a , _b = b : i >= _b ; --i)
#define Rep(i , n) for (int i = 0 , _n = n ; i < _n ; ++i)
#define sz(A) ((int)A.size())
#define LL(x) (x << 1)
#d... | a.cc: In function 'int main()':
a.cc:23:37: error: 'mp' was not declared in this scope
23 | if (x < L || x > R) mp[x];
| ^~
a.cc:25:20: error: 'x' was not declared in this scope
25 | cout << sz(x) << endl;
| ^
a.cc:10:21: n... |
s694036028 | p03975 | C++ | #include <iostream>
using namespace std;
void main()
{
int n,a,b;
cin>>n>>a>>b;
int c = 0;
for (int i=0;i<n;i++)
{
int x;cin >> x;
if (a<=x&&x<b) c++;
}
cout << n-c << endl;
} | a.cc:3:1: error: '::main' must return 'int'
3 | void main()
| ^~~~
|
s753973330 | p03975 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n,a,b,t,c=0;
cin>>n>>a>>b;
while(cin>>t){
if(t>=b&&||t<=a){c++;}
}
cout<<c<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:10: error: expected primary-expression before '||' token
7 | if(t>=b&&||t<=a){c++;}
| ^~
|
s045912256 | p03975 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n,a,b,t,c=0;
cin>>n>>a>>b;
while(cin>>t){
if(t>=b&&||t<=a){c++;}
cout<<c<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:10: error: expected primary-expression before '||' token
7 | if(t>=b&&||t<=a){c++;}
| ^~
a.cc:10:2: error: expected '}' at end of input
10 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s868082555 | p03975 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n,a,b,t;
cin>>n>>a>>b;
while(cin>>t){
if(t>=b&&t<=a){c++;}
}
cout<<c<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:16: error: 'c' was not declared in this scope
7 | if(t>=b&&t<=a){c++;}
| ^
a.cc:9:7: error: 'c' was not declared in this scope
9 | cout<<c<<endl;
| ^
|
s761959038 | p03975 | C++ | #include<cstdio>
int main(){
int n,a,b,an=0;
scanf("%d%d%d,&n,&a,&b);
for(int i=0;i<n;i++){
int x;scanf("%d",&x);
if(x<a||x>=b)an++;
}
printf("%d\n",an);
return 0;
} | a.cc:4:8: warning: missing terminating " character
4 | scanf("%d%d%d,&n,&a,&b);
| ^
a.cc:4:8: error: missing terminating " character
4 | scanf("%d%d%d,&n,&a,&b);
| ^~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:2: error: expected primary-expression before 'for'
5 | fo... |
s583310287 | p03975 | C++ | #include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define INF 1<<29
#define LINF LLONG_MAX/3
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define ALL(v) (v).begin(),(v).end()
#define debug(x) cerr<<#x<<":"<<x<<endl
#define deb... | a.cc: In function 'int main()':
a.cc:32:20: error: 'endlg' was not declared in this scope
32 | cout << ans << endlg
| ^~~~~
|
s279687822 | p03975 | C++ | #include <iostream>
#include <vector>
using namespace std;
int N, A, B;
vector<int> t;
int search(int a){
int l=0, r=N-1, m;
for(int i=0; i<30; i++){
m=(l+r)/2;
if(t[m]<a){
l=m;
}else if(t[m]>a){
r=m;
}else{
return m-1;
}
}
return m;
}
int main(){
cin>>N>>A>>B;
N++;
t.resize(N);
t[0]=0;
... | a.cc: In function 'int main()':
a.cc:32:9: error: 'sort' was not declared in this scope; did you mean 'short'?
32 | sort(t.begin(), t.end());
| ^~~~
| short
|
s984278773 | p03975 | C++ | import Control.Monad( replicateM)
main = do
[n,a,b] <- return . map read . words =<< getLine
ts <- replicateM n readLn
print . length $ [x| x<-ts, x<a || b<=x] | a.cc:1:1: error: 'import' does not name a type
1 | import Control.Monad( replicateM)
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s129241262 | p03975 | C++ | #include <iostream>
#include <iomanip>
#include <stdio.h>
#include <set>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <memory.h>
#include <string>
#include <sstream>
#include <cstdlib>
#include <ctime>
#include <cassert>
#include <queue>
using namespace std;
typedef long long LL;
ty... | a.cc: In function 'int main()':
a.cc:54:14: error: expected '}' at end of input
54 | return 0;
| ^
a.cc:39:12: note: to match this '{'
39 | int main() {
| ^
|
s329549141 | p03975 | C++ | #include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
int N,A,B;
int t;
int num = 0;
scanf("%d %d %d", &N, &A, &B);
for (i = 0; i < N; i++)
{
std::cin >> t;
if(t < A || t >= B)
{
++num;
}
}
printf("%d\n", num);
return 0;
}
| a.cc: In function 'int main()':
a.cc:14:14: error: 'i' was not declared in this scope
14 | for (i = 0; i < N; i++)
| ^
|
s261197309 | p03975 | C++ | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] line = br.readLine().split(" ");
int N = Integer.parseInt(line[0]... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.BufferedReader;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.InputStreamReader;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available wit... |
s842665256 | p03975 | C++ | n,a,b = gets.split.map(&:to_i)
t = []
n.times { t << gets.to_i }
t.sort!
puts (t.bsearch_index{|x|x>=b}||n-1) - (t.bsearch_index{|x|x>=a}||0) | a.cc:1:1: error: 'n' does not name a type
1 | n,a,b = gets.split.map(&:to_i)
| ^
a.cc:4:1: error: 't' does not name a type
4 | t.sort!
| ^
a.cc:6:31: error: expected unqualified-id before '||' token
6 | puts (t.bsearch_index{|x|x>=b}||n-1) - (t.bsearch_index{|x|x>=a}||0)
| ... |
s492117637 | p03975 | C++ | import java.util.Arrays;
import java.util.Scanner;
public class Main {
MyScanner sc = new MyScanner();
Scanner sc2 = new Scanner(System.in);
long start = System.currentTimeMillis();
long fin = System.currentTimeMillis();
final int MOD = 1000000007;
int[] dx = { 1, 0, 0, -1 };
int[] dy = { 0, 1, -1, 0 };
void ... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Arrays;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.util.Scanner;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-t... |
s263766906 | p03975 | C++ | #include<bits/stdc++.h>
usingn namespace std;
int main(){
int N; cin >> N;
int A,B; cin >> A >> B;
int res = 0;
for(int i=0;i<N;i++){
int t; cin >> t;
if( A <= t && t < B ) continue;
res++;
}
cout << res << endl;
} | a.cc:2:1: error: 'usingn' does not name a type
2 | usingn namespace std;
| ^~~~~~
a.cc: In function 'int main()':
a.cc:5:8: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | int N; cin >> N;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-... |
s875622131 | p03975 | C++ | #include <algorithm>//min/max/sort(rand-access it)/merge
#include <array>
#include <bitset>
#include <climits>//INT_MAX/INT_MIN/ULLONG_MAX
#include <cmath>//fmin/fmax/fabs/sin(h)/cos(h)/tan(h)/exp/log/pow/sqrt/cbrt/ceil/floor/round/trunc
#include <cstdlib>//abs/atof/atoi/atol/atoll/strtod/strtof/..., srand/rand, calloc... | a.cc: In function 'int main()':
a.cc:90:33: error: 'm' was not declared in this scope
90 | for (int j = 0; j < m; ++j)
| ^
a.cc:92:25: error: 'rra' was not declared in this scope; did you mean 'rar'?
92 | cout << rra[i][j] << "\t";
| ... |
s648999790 | p03976 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (n); i++)
using namespace std;
signed main(void)
{
int n, k;
cin >> n >> k;
vector<int> cnt(26, 0);
rep(i, n)
{
string p;
cin >> p;
cnt[p[0] - 'A'];
}
sort(cnt.rbegin(), cnt.rend());
int ans = 0;
while(true)
{
rep(i, k)
{
if (cnt[i] ... | a.cc: In function 'int main()':
a.cc:14:31: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
14... |
s605386703 | p03976 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (n); i++)
using namespace std;
signed main(void)
{
int n, k;
cin >> n >> k;
vector<int> cnt(26, 0);
rep(i, n)
{
string p;
cin >> p;
cnt[p[0] - 'A'];
}
sort(cnt.rbegin(), r.end());
int ans = 0;
while(true)
{
rep(i, k)
{
if (cnt[i] == ... | a.cc: In function 'int main()':
a.cc:14:31: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
14... |
s267320362 | p03976 | C++ | #include<bits/stdc++.h>
using namespace std;
int main () {
int N, K;
cin >> N >> K;
vector<int>Pl(1e5, 0);
for (int i = 0; i < N; i ++) {
stiring S;
cin >> S;
Pl[(int)S[0]] ++;
}
sort(Pl.begin(), Pl.end());
reverse(Pl.begin(), Pl.end());
vector<int>KU(N, 0);
int ans = 0;
for (int i = 0; ... | a.cc: In function 'int main()':
a.cc:8:5: error: 'stiring' was not declared in this scope; did you mean 'stdin'?
8 | stiring S;
| ^~~~~~~
| stdin
a.cc:9:12: error: 'S' was not declared in this scope
9 | cin >> S;
| ^
|
s931094491 | p03976 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int alp[26];
int main(){
int n,k;cin>>n>>k;
for(int i = 0; n > i; i++){
string s;cin>>s;
alp[s[0]-'A']++;
}
vector<int> a;
for(int i = 0; 26 > i; i++){
if(alp[i]){
a.push_back(alp[i]);
}
}
sort(a.begin(),a... | a.cc: In function 'int main()':
a.cc:24:27: error: 'class std::vector<int>' has no member named 'pop'
24 | while(a.back() != 0)a.pop();
| ^~~
|
s704777269 | p03976 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int n,k,m[26],a=0,;
string s[10001];
priority_queue<int>q;
int main(){
cin>>n>>k;
rep(i,n){cin>>s[i];m[s[i][0]-'A']++;}
rep(i,26)if(m[i])q.push(m[i]);
while(q.size()>=k){
rep(i,k){m[i]=q.top();q.pop();}
rep(i,k)if(m[i]>1)q.push(... | a.cc:4:19: error: expected unqualified-id before ';' token
4 | int n,k,m[26],a=0,;
| ^
|
s908229764 | p03976 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int n,k,m[26],a=0,;
string s[10001];
priority_queue<int>q;
int main(){
cin>>n>>k;
rep(i, n)cin>>s[i];m[s[i][0]-'A']++;
rep(i,26)if(m[i])q.push(m[i]);
while(q.size()>=k){
rep(i,k)m[i]=q.top();q.pop();
rep(i,k)if(m[i]>1)q.push(m[i... | a.cc:4:19: error: expected unqualified-id before ';' token
4 | int n,k,m[26],a=0,;
| ^
a.cc: In function 'int main()':
a.cc:9:32: error: 'i' was not declared in this scope
9 | rep(i, n)cin>>s[i];m[s[i][0]-'A']++;
| ^
|
s024238145 | p03976 | C++ | #include <iostream>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <complex>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <bitset>
#include <ctime>
#include <map>
#include <uno... | a.cc:56:21: error: ISO C++ forbids declaration of 'chamx' with no type [-fpermissive]
56 | template<typename T>chamx(T &a,T b){if(a<b){a=b;return true;}return false;}
| ^~~~~
a.cc:57:21: error: ISO C++ forbids declaration of 'chmin' with no type [-fpermissive]
57 | template<typename T>ch... |
s575330644 | p03976 | Java |
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;
public class Committee {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int N = in.nextInt();
int K = in.nextInt();
in.nextLine();
String[] P = new String[N];
for (int i = 0; i < P.length; i++) ... | Main.java:6: error: class Committee is public, should be declared in a file named Committee.java
public class Committee {
^
1 error
|
s445901168 | p03976 | C++ | #include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <set>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
#include <cstring>
#include <iterator>
#include <b... | a.cc: In function 'void mainmain()':
a.cc:112:33: error: no matching function for call to 'min(ll&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
112 | t += min(m, cnt[i]);
| ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/bits/s... |
s531873050 | p03976 | C++ | #include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <set>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
#include <cstring>
#include <iterator>
#include <b... | a.cc: In function 'void mainmain()':
a.cc:108:17: error: 'v' was not declared in this scope
108 | int m = v[0];
| ^
|
s572434987 | p03976 | C++ | #include <bits/stdc++.h>
using namespace std;
int co[256];
int n,k;
string arr[10004];
int get()
{
int i;
int ans=0;
for(i=0;i<255;i++)
if(!co[i])
return i;
}
void del()
{
int i;
for(i=0;i<k&;i++)
{
co[i]--;
}
}
int main()
{
cin >> n >> k;
int i;
... | a.cc: In function 'void del()':
a.cc:21:17: error: expected primary-expression before ';' token
21 | for(i=0;i<k&;i++)
| ^
a.cc: In function 'int get()':
a.cc:16:1: warning: control reaches end of non-void function [-Wreturn-type]
16 | }
| ^
|
s824479283 | p03976 | Java | import java.util.Scanner;
import java.util.Arrays;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int[] initial = new int[26];
for(int i=0; i<n; i++){
String s = sc.next();
initial[s.charAt(0)-'A']++;
}
... | Main.java:18: error: incompatible types: INT#1 cannot be converted to boolean
if((n%k==0)? n/k : (n/k)+1 <= initial[25]){
^
where INT#1,INT#2 are intersection types:
INT#1 extends Object,Serializable,Comparable<? extends INT#2>,Constable
INT#2 extends Object,Serializable,Comparable<?>,Constable... |
s752082747 | p03976 | C++ | #include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
using namespace std;
int main()
{
string c,s;
int n,k,q[101]={},sum=0,x,ans=0;
ios::sync_with_stdio(false);
cin>>n>>k;
for (int i=1; i<=n; i++)
{
cin>>c;
q[c[0]]++;
sum++;
//cout<<c[0]<<endl;
... | a.cc: In function 'int main()':
a.cc:24:9: error: 'sort' was not declared in this scope; did you mean 'short'?
24 | sort(begin(q),end(q),greater<int>());
| ^~~~
| short
|
s342186306 | p03976 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <vector>
using namespace std;
int n,k,q[101]={},ans=0;
int main(){
string c,s;
cin >> n >> k;
for(int i = 1; i <= n; i++){
cin >> c;
q[c[0]]++;
}
while(1){
sort(begin(q),end(q),greater<int>());
if(q[k-1]==0) break;
for(... | a.cc: In function 'int main()':
a.cc:17:17: error: 'sort' was not declared in this scope; did you mean 'short'?
17 | sort(begin(q),end(q),greater<int>());
| ^~~~
| short
|
s168999513 | p03976 | C++ | #include <algorithm>//min/max/sort(rand-access it)/merge
#include <array>
#include <bitset>
#include <climits>//INT_MAX/INT_MIN/ULLONG_MAX
#include <cmath>//fmin/fmax/fabs/sin(h)/cos(h)/tan(h)/exp/log/pow/sqrt/cbrt/ceil/floor/round/trunc
#include <cstdlib>//abs/atof/atoi/atol/atoll/strtod/strtof/..., srand/rand, calloc... | a.cc: In function 'int main()':
a.cc:81:54: error: conversion from '_List_iterator<unsigned int>' to non-scalar type '_List_iterator<int>' requested
81 | for (list<int>::iterator it = remaining.begin(); it != remaining.end(); ++it)
| ~~~~~~~~~~~~~~~^~
a.cc:81:61: e... |
s956176303 | p03976 | C++ | /*************************************************************************
File Name: B.cpp
ID: obsoles1
BLOG: blog.csdn.net/obsolescence
LANG: C++
Mail: 384099319@qq.com
Created Time: 日 10/ 2 13:48:09 2016
************************************************************************/
#defin... | a.cc: In function 'int main()':
a.cc:42:3: error: 'sort' was not declared in this scope; did you mean 'short'?
42 | sort(cnt,cnt+26,greater<int>());
| ^~~~
| short
|
s689993290 | p03976 | C++ | //先頭の文字以外は必要ない。先頭の文字の個数をcnt[i]などで持ち、残り数が多いほうから使っていく。(未証明)
#include <iostream>
#include <string>
using namespace std;
int n, k;
string p[10000];
int cnt[26];
int main() {
int i, j;
cin >> n >> k;
for (i = 0; i < n; i++) {
cin >> p[i];
cnt[p[i][0] - 'A']++;
}
for (i = 0; ; i++) {
sort(cnt, cnt + 26);
... | a.cc: In function 'int main()':
a.cc:21:17: error: 'sort' was not declared in this scope; did you mean 'short'?
21 | sort(cnt, cnt + 26);
| ^~~~
| short
|
s343613839 | p03976 | C++ | //先頭の文字以外は必要ない。先頭の文字の個数をcnt[i]などで持ち、残り数が多いほうから使っていく。(未証明)
#include <iostream>
#include <string>
using namespace std;
int n, k;
string p[10000];
int cnt[26];
int main() {
int i, j;
cin >> n >> k;
for (i = 0; i < n; i++) {
cin >> p[i];
cnt[p[i] - 'A']++;
}
for (i = 0; ; i++) {
sort(cnt, cnt + 26);
if ... | a.cc: In function 'int main()':
a.cc:17:26: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
17 | cnt[p[i] - 'A']++;
| ~~~~ ^ ~~~
| | |
| | char... |
s579752840 | p03976 | C++ | #include<cstdio>
#include<cstring>
#include<vector>
#include<queue>
#include<algorithm>
#include<cmath>
#include<climits>
#include<string>
#include<set>
#include<map>
#include<iostream>
using namespace std;
#define rep(i,n) for(int i=0;i<((int)(n));i++)
#define reg(i,a,b) for(int i=((int)(a));i<=((int)(b));i++)
#define... | a.cc:35:20: error: macro "rep" passed 3 arguments, but takes just 2
35 | rep(i,0,'Z'-'A'){
| ^
a.cc:13:9: note: macro "rep" defined here
13 | #define rep(i,n) for(int i=0;i<((int)(n));i++)
| ^~~
a.cc: In function 'int main()':
a.cc:35:5: error: 'rep' was not declared in ... |
s356949275 | p03976 | C++ | #include<stdio.h>
#include<string.h>
#include<math.h>
#include<algorithm>
using namespace std;
int main()
{
char s[105];
int a[27];
memset(a,0,sizeof(a));
int i,n,k,minn=0,num=0,j=0,ans=0;
scanf("%d%d",&n,&k);
getchar();
for(i=0;i<n;i++)
{
gets(s);
a[s[0]-65]++;
}
... | a.cc: In function 'int main()':
a.cc:18:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
18 | gets(s);
| ^~~~
| getw
|
s833444416 | p03976 | C++ | #include <algorithm>//min/max/sort(rand-access it)/merge
#include <array>
#include <bitset>
#include <climits>//INT_MAX/INT_MIN/ULLONG_MAX
#include <cmath>//fmin/fmax/fabs/sin(h)/cos(h)/tan(h)/exp/log/pow/sqrt/cbrt/ceil/floor/round/trunc
#include <cstdlib>//abs/atof/atoi/atol/atoll/strtod/strtof/..., srand/rand, calloc... | In file included from /usr/include/c++/14/algorithm:61,
from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = _List_iterator<int>; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<greater... |
s554013824 | p03976 | C++ | #include <bits/stdc++.h>
#include <cstring>
using namespace std;
int vis[100][26]={0};
int isfull[1000]={0};
int main() {
int n,k;
char tmp[15];
cin>>n>>k;
int tol=1;
getchar();
while(n--)
{
bool f=0;
gets(tmp);
for(int i=1;i<=tol;i++)
{
if(!vis[i... | a.cc: In function 'int main()':
a.cc:16:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
16 | gets(tmp);
| ^~~~
| getw
|
s123116370 | p03976 | C++ | #include <bits/stdc++.h>
using namespace std;
int vis[100][26]={0};
int isfull[1000]={0};
int main() {
int n,k;
char tmp[15];
cin>>n>>k;
int tol=1;
getchar();
while(n--)
{
bool f=0;
gets(tmp);
for(int i=1;i<=tol;i++)
{
if(!vis[i][tmp[0]-'A']&&isfu... | a.cc: In function 'int main()':
a.cc:15:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
15 | gets(tmp);
| ^~~~
| getw
|
s991342491 | p03976 | C++ | #define _USE_MATH_DEFINES
#include <iostream>
#include <iomanip>
#include <cctype>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cfloat>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <string>
#include <set>
#inclu... | a.cc:43:9: error: expected unqualified-id before 'while'
43 | while(1){
| ^~~~~
a.cc:59:9: error: 'cout' does not name a type
59 | cout<<ans<<endl;
| ^~~~
a.cc:61:1: error: expected declaration before '}' token
61 | }
| ^
|
s470189313 | p03976 | C++ | #include <algorithm>//min/max/sort(rand-access it)/merge
#include <array>
#include <bitset>
#include <climits>//INT_MAX/INT_MIN/ULLONG_MAX
#include <cmath>//fmin/fmax/fabs/sin(h)/cos(h)/tan(h)/exp/log/pow/sqrt/cbrt/ceil/floor/round/trunc
#include <cstdlib>//abs/atof/atoi/atol/atoll/strtod/strtof/..., srand/rand, calloc... | a.cc: In function 'int main()':
a.cc:58:12: error: cannot convert 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'int*'
58 | rar(n, p);
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:38:22: note: initializing argument 2 of 'vo... |
s583496708 | p03976 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<cstdio>
#include<sstream>
#include<iomanip>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
#define pb push_back
#defi... | a.cc: In function 'int main()':
a.cc:50:25: error: 'co' was not declared in this scope; did you mean 'cos'?
50 | co++;
| ^~
| cos
a.cc:54:20: error: 'co' was not declared in this scope; did you mean 'cos'?
54 | if(... |
s876605244 | p03977 | C++ | #include<bits/stdc++.h>
using namespace std;
int main () {
int dp[128][1001];
for (int n = 1; n < 1001; n ++) {
for (int j = 0; j < 128; j ++) {
if (n == 1) dp[j][n] = j;
dp[j][n] = -1;
else {
for (int i = 0; i < 128; i ++) {
int kj = j ^ i;
int ku = max(dp[kj][n - ... | a.cc: In function 'int main()':
a.cc:9:7: error: 'else' without a previous 'if'
9 | else {
| ^~~~
a.cc:24:4: error: expected '}' at end of input
24 | }
| ^
a.cc:3:13: note: to match this '{'
3 | int main () {
| ^
|
s854377220 | p03977 | C++ | /*************************************************************************
File Name: C.cpp
ID: obsoles1
BLOG: blog.csdn.net/obsolescence
LANG: C++
Mail: 384099319@qq.com
Created Time: 日 10/ 2 12:25:36 2016
************************************************************************/
#defin... | a.cc: In function 'int main()':
a.cc:13:17: error: 'memset' was not declared in this scope
13 | #define MEM0(x) memset(x,0,sizeof(x))
| ^~~~~~
a.cc:29:7: note: in expansion of macro 'MEM0'
29 | MEM0(b);
| ^~~~
a.cc:18:1: note: 'memset' is defined in header '<cstring>'; this... |
s386228987 | p03977 | Java | import java.util.*;
class C {
public static void main(String... args) {
final Scanner sc = new Scanner(System.in);
final int T = sc.nextInt();
for (int i = 0; i < T; i++) {
final int N = sc.nextInt();
final int D = sc.nextInt();
if(N % 2 == 1)
... | Main.java:17: error: class, interface, enum, or record expected
package kupc2016;
^
1 error
|
s310625719 | p03978 | C++ | #include <iostream>
#include <queue>
#include <stdio.h>
using namespace std;
string ans[3],tmp[3],r;
char atas[4]={'#','.','#','.'},bawah[4] = {'.','.','#','#'};
int n;
bool cek;
int main()
{
scanf("%d",&n);
while(1)
{
for(int i=0;i<4;i++)
{
if(cek)
{
... | a.cc: In function 'int main()':
a.cc:44:13: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '<unresolved overloaded function type>')
44 | if(r==end) break;
| ~^~~~~
In file included from /usr/include/c++/14/iosfwd:42,
... |
s941507977 | p03978 | C++ | #include <bits/stdc++.h>
//#include <math.h>
using namespace std;
#define INF 1.1e9
#define LINF 1.1e18
#define FOR(i,a,b) for (int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define BIT(x,n) bitset<n>(... | a.cc: In function 'int main()':
a.cc:61:28: error: request for member 'size' in 't', which is of non-class type 'std::string [2]' {aka 'std::__cxx11::basic_string<char> [2]'}
61 | if(!flg||t.size()==n) break;
| ^~~~
a.cc:77:28: error: request for member 'size' in 't',... |
s452194266 | p03978 | C++ | #include<iostream>
#include<cstdio>
#include<string>
using namespace std;
int main(){
int N;
cin >> N;
string table[2];
bool flag = false;
while(1){
// query
string n_table[2];
int cnt = 0;
for(int i = 0 ; i < 4 ; i++){
for(int j = 0 ; j < 2 ; j++){
n_table[j] = table[j];
... | a.cc: In function 'int main()':
a.cc:27:25: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
27 | string s1 = (i%2?'#':'.');
| ~~~~^~~~~~~~~
a.cc:28:32: error: conversion from 'char' to non-scalar type 'std::string' {a... |
s544114198 | p03978 | C++ | //1列(4通り)を質問 -> 当たったら1列(右側に)追加して(4通り)質問 -> …を繰り返すと400回以内で当たらなくなる(かendが返る)
//このとき、質問した列は黒板の右端にある。あとは、同様にして左側を特定すればよい。
#include <iostream>
#include <string>
using namespace std;
string reverse(string str) {
string ret;
for (int i = (int)str.length() - 1; i >= 0; i--) ret += str[i];
return ret;
}
int n;
string query... | a.cc: In function 'char addQueryRight(int)':
a.cc:66:21: error: too many arguments to function 'void delCharRight()'
66 | delCharRight(type);
| ~~~~~~~~~~~~^~~~~~
a.cc:35:6: note: declared here
35 | void delCharRight() {
| ^~~~~~~~~~~~
a.cc: In function 'char addQueryLeft(int)':
a... |
s583652098 | p03978 | C++ | //1列(4通り)を質問 -> 当たったら1列(右側に)追加して(4通り)質問 -> …を繰り返すと400回以内で当たらなくなる(かendが返る)
//このとき、質問した列は黒板の右端にある。あとは、同様にして左側を特定すればよい。
#include <iostream>
#include <string>
using namespace std;
string reverse(string str) {
string ret;
for (int i = (int)str.length() - 1; i >= 0; i--) ret += str[i];
return ret;
}
int n;
string query... | a.cc: In function 'char getQuery()':
a.cc:57:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string [3]' {aka 'std::__cxx11::basic_string<char> [3]'})
57 | cin >> ret;
| ~~~ ^~ ~~~
| | |
| | ... |
s824786911 | p03978 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<map>
#include<set>
using namespace std;
string query(pair<string,string> p1,pair<string,string> p2){
string s1,s2;
s1 = p1.first + p2.first;
s2 = p1.second + p2.second;
printf("%s\n%s\n", s1.c_str(), s2.c_str()); fflush(stdout);
s... | a.cc: In function 'int main()':
a.cc:43:28: error: 'j' was not declared in this scope
43 | r = query(rp,vec[j]);
| ^
a.cc:47:25: error: 'j' was not declared in this scope
47 | r = query(vec[j],rp);
| ^
|
s839786197 | p03978 | C++ | #include <bits/stdc++.h>
#define SZ(X) ((int)(X).size())
#define ALL(X) (X).begin(), (X).end()
#define REP(I, N) for (int I = 0; I < (N); ++I)
#define REPP(I, A, B) for (int I = (A); I < (B); ++I)
#define RI(X) scanf("%d", &(X))
#define RII(X, Y) scanf("%d%d", &(X), &(Y))
#define RIII(X, Y, Z) scanf("%d%d%d", &(X), &(Y... | a.cc: In function 'int main()':
a.cc:32:12: error: 'gets' was not declared in this scope; did you mean 'getw'?
32 | DRI(N);gets(s);
| ^~~~
| getw
|
s185543685 | p03978 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<map>
#include<set>
using namespace std;
string query(pair<string,string> p1,pair<string,string> p2){
string s1,s2;
s1 = p1.first + p2.first;
s2 = p1.second + p2.second;
printf("%s\n%s\n", s1.c_str(), s2.c_str()); fflush(stdout);
s... | a.cc: In function 'int main()':
a.cc:35:54: error: template argument 1 is invalid
35 | vector<pair<string,string>vec(st.begin(),st.end());
| ^
a.cc:35:54: error: template argument 2 is invalid
a.cc:36:25: error: 'vec' was not declared in this scope
36... |
s783837096 | p03978 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<map>
using namespace std;
string query(pair<string,string> p1,pair<string,string> p2){
string s1,s2;
s1 = p1.first + p2.first;
s2 = p1.second + p2.second;
printf("%s\n%s\n", s1.c_str(), s2.c_str()); fflush(stdout);
string str;
c... | a.cc: In function 'int main()':
a.cc:22:3: error: 'set' was not declared in this scope
22 | set<pair<string,string> >st;
| ^~~
a.cc:6:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
5 | #include<map>
+++ |+#include <set>
6 | using namespace st... |
s109576035 | p03978 | C++ | #include <algorithm>//min/max/sort(rand-access it)/merge
#include <array>
#include <bitset>
#include <climits>//INT_MAX/INT_MIN/ULLONG_MAX
#include <cmath>//fmin/fmax/fabs/sin(h)/cos(h)/tan(h)/exp/log/pow/sqrt/cbrt/ceil/floor/round/trunc
#include <cstdlib>//abs/atof/atoi/atol/atoll/strtod/strtof/..., srand/rand, calloc... | a.cc: In function 'int main()':
a.cc:104:10: error: request for member 'push_back' in 'comb', which is of non-class type 'std::pair<bool, bool> [4]'
104 | comb.push_back(true, true);
| ^~~~~~~~~
a.cc:105:10: error: request for member 'push_back' in 'comb', which is of non-class type 'std::pair<bool... |
s064177931 | p03978 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<map>
using namespace std;
string query(pair<string,string> p1,pair<string,string> p2){
string s1,s2;
s1 = p1.first + p2.first;
s2 = p1.second + p2.second;
printf("%s\n%s\n", s1.c_str(), s2.c_str()); fflush(stdout);
string str;
c... | a.cc: In function 'int main()':
a.cc:42:22: error: could not convert 'vec.std::vector<std::vector<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > > >::operator[](((std::vector<std::vector<std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > > >::size_type)i))' fr... |
s279205878 | p03978 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<map>
using namespace std;
string query(pair<string,string> p1,pair<string,string> p2){
string s1,s2;
s1 = p1.first + p2.first;
s2 = p1.second + p2.second;
printf("%s\n%s\n", s1.c_str(), s2.c_str()); fflush(stdout);
string str;
c... | a.cc: In function 'int main()':
a.cc:30:32: error: template argument 1 is invalid
30 | vector<pair<string,string> v;
| ^
a.cc:30:32: error: template argument 2 is invalid
a.cc:31:5: error: 'v' was not declared in this scope
31 | v.push_back(make_pair(str1,str2));
... |
s737320895 | p03978 | C++ | #include <algorithm>//min/max/sort(rand-access it)/merge
#include <array>
#include <bitset>
#include <climits>//INT_MAX/INT_MIN/ULLONG_MAX
#include <cmath>//fmin/fmax/fabs/sin(h)/cos(h)/tan(h)/exp/log/pow/sqrt/cbrt/ceil/floor/round/trunc
#include <cstdlib>//abs/atof/atoi/atol/atoll/strtod/strtof/..., srand/rand, calloc... | a.cc: In function 'int main()':
a.cc:104:10: error: request for member 'emplace_back' in 'comb', which is of non-class type 'std::pair<bool, bool> [4]'
104 | comb.emplace_back(true, true);
| ^~~~~~~~~~~~
a.cc:105:10: error: request for member 'emplace_back' in 'comb', which is of non-class type 'st... |
s466802895 | p03978 | C++ | #include<iostream>
#include<cstdio>
#include<string>
using namespace std;
int main(){
int N;
cin >> N;
string table[2];
for(int i = 0 ; i < 2 ; i++){
for(int j = 0 ; j < N ; j++){
table[i] += '.';
}
}
while(1){
// query
string n_table[2];
for(int i = 0 ; i < 4 ; i++){
fo... | a.cc: In function 'int main()':
a.cc:43:2: error: expected '}' at end of input
43 | }
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s744284120 | p03978 | C++ | #include<iostream>
#include<cstdio>
#include<string>
using namespace std;
int main(){
int N;
cin >> N;
string table[2];
for(int i = 0 ; i < 2 ; i++){
for(int j = 0 ; j < N ; j++){
table[i] += '.';
}
}
while(1){
// query
string n_table[2];
for(int i = 0 ; i < 4 ; i++){
fo... | a.cc: In function 'int main()':
a.cc:43:2: error: expected '}' at end of input
43 | }
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s463356990 | p03978 | C++ | #include <bits/stdc++.h>
using namespace std;
const string du[] = {".", ".", "#", "#"};
const string dd[] = {".", "#", ".", "#"};
char s[77];
string ask(string u, string d) {
printf("%s\n%s\n", u.c_str(), d.c_str());
fflush(stdout);
scanf("%s", s);
return s;
}
int main() {
int n;
scanf("%d", &n);
str... | a.cc: In function 'int main()':
a.cc:25:9: error: 'cnt' was not declared in this scope; did you mean 'int'?
25 | ++cnt;
| ^~~
| int
|
s682765041 | p03978 | C++ | //ここからテンプレート
//#define PLASMA_NO_BOOST
#if 1
#include<iostream>
#include<list>
#include<algorithm>
#include<utility>
#include<type_traits>
#include<tuple>
#include<memory>
#include<iterator>
#include<string>
#include<functional>
#include<list>
#include<array>
#include<complex>
#include<numeric>
#include<iomanip>
#incl... | a.cc:29:9: fatal error: boost/optional.hpp: No such file or directory
29 | #include<boost/optional.hpp>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s592629833 | p03978 | C++ | #define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include... | a.cc: In function 'int main()':
a.cc:56:13: error: expected ';' before '}' token
56 | return 0
| ^
| ;
57 | }
| ~
|
s490303375 | p03979 | C++ | #pragma region head
#include <bits/stdc++.h>
#include <atcoder/maxflow>
using namespace std;
using namespace atcoder;
using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
using pi = pair<int, int>;
using pll = pair<ll, ll>;
template <class T>
using vv = vector<vector<T>>;
#define rep(i, n) for (int i ... | a.cc:4:10: fatal error: atcoder/maxflow: No such file or directory
4 | #include <atcoder/maxflow>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
|
s024052822 | p03979 | C++ | #pragma region head
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
using pi = pair<int, int>;
using pll = pair<ll, ll>;
template <class T>
using vv = vector<vector<T>>;
#define rep(i, n) for (int i = 0;... | a.cc:4:10: fatal error: atcoder/all: No such file or directory
4 | #include <atcoder/all>
| ^~~~~~~~~~~~~
compilation terminated.
|
s056896703 | p03979 | C++ | #include <iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<math.h>
using namespace std;
typedef long long ll;
#define int long long
#define double long double
typedef vector<int> VI;
typedef pair<int, int> pii;
typedef vector<pii> VP;
t... | a.cc: In function 'void bfs(long long int)':
a.cc:48:9: error: 'memset' was not declared in this scope
48 | memset(level, -1LL, sizeof(level));
| ^~~~~~
a.cc:10:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
9 | #include<math.h>
... |
s118483851 | p03979 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int MAX = 4e4;
const int OO = 0x3f3f3f3f3f3f3f3f;
int SOURCE, SINK;
struct edge
{
int v, f, c;
edge(){}
edge(int _v, int _f, int _c)
{
v = _v, f = _f, c = _c;
}
};
vector<edge> edges;
vector<int> G[MAX];
int dist[MAX... | cc1plus: error: '::main' must return 'int'
|
s275043482 | p03979 | C++ | ////////////////////////////////////////////
/// ///
/// Template ver. 1 rapel ///
/// Fear is Temporary, Regret is Forever ///
/// Must Try and Get AC ///
/// ///
////////////////////////////////////////////
#incl... | a.cc: In function 'void hora(int)':
a.cc:103:49: error: 'else' without a previous 'if'
103 | else if(s[ny][nx] == '.' && mark[ny][nx] == 0) stay = true;
| ^~~~
|
s986230034 | p03979 | C++ | /*? begin "base.hpp" */
#ifndef __clang__
#pragma GCC optimize ("O3")
#endif
void solve( /* この関数に問題ごとの処理を書く */
#ifdef GCJ_CASE
long long case_id
#endif
);
#if defined(EBUG) && !defined(ONLINE_JUDGE)
#define debug true
#else
#define NDEBUG
#define debug false
#endif
#include<algorithm>
#include<iomanip>
#include<i... | a.cc: In member function 'LL ford_fulkerson<V, E, CapFn>::cap(LL, LL) const':
a.cc:344:31: error: no match for 'operator[]' (operand types are 'const HII' {aka 'const std::map<long long int, long long int>'} and 'LL' {aka 'long long int'})
344 | int cap(int a,int b)CS{RT cap_[a<<32|b];}
| ... |
s837962792 | p03979 | C++ | /*? begin "base.hpp" */
#ifndef __clang__
#pragma GCC optimize ("O3")
#endif
void solve( /* この関数に問題ごとの処理を書く */
#ifdef GCJ_CASE
long long case_id
#endif
);
#if defined(EBUG) && !defined(ONLINE_JUDGE)
#define debug true
#else
#define NDEBUG
#define debug false
#endif
#include<algorithm>
#include<iomanip>
#include<i... | a.cc: In member function 'LL ford_fulkerson<V, E, CapFn>::cap(LL, LL) const':
a.cc:344:31: error: no match for 'operator[]' (operand types are 'const HII' {aka 'const std::map<long long int, long long int>'} and 'LL' {aka 'long long int'})
344 | int cap(int a,int b)CS{RT cap_[a<<32|b];}
| ... |
s458133805 | p03979 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <unordered_set>
using namespace std;
#define long long ll
int n, m;
bool inrange(int x, int y) {
return x >= 0 && x < n && y >= 0 && y < m;
}
int main() {
int ans = 0, mask[4][2] = { {1, 0},{-1, 0},{0, 1},{0, -1} };
cin >> n >> m;
vector<string>... | a.cc: In function 'int main()':
a.cc:17:9: error: 'vector' was not declared in this scope
17 | vector<string>v(n);
| ^~~~~~
a.cc:5:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
4 | #include <unordered_set>
+++ |+#include <ve... |
s132380144 | p03979 | 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>
#define syosu(x) fixed<<setprec... | a.cc: In member function 'int Network::DFS(int, int, int, vb&)':
a.cc:60:39: error: 'DFSplus' was not declared in this scope
60 | int d=DFSplus(e.to,t,min(f,e.cap),used);
| ^~~~~~~
|
s556204358 | p03979 | 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>
#define syosu(x) fixed<<setprec... | a.cc: In member function 'int Network::DFS(int, int, int, vb&)':
a.cc:60:39: error: 'DFSplus' was not declared in this scope
60 | int d=DFSplus(e.to,t,min(f,e.cap),used);
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:119:18: error: 'class N... |
s295276818 | p03979 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()
#define INF 1<<20
#define EPS (1e-6)
#define EQ(a,b) (abs((a)-(b)) < EPS)
using namespace std;
typedef long long ll;
typedef complex<double> P;
bool cmp(P a, P b){
double arga = arg(a);
double argb = arg(b);
if(!EQ(... | a.cc: In function 'int main()':
a.cc:88:41: error: lvalue required as left operand of assignment
88 | cur.real() = j - W / 2.;
| ~~~~~~~~^~
a.cc:89:41: error: lvalue required as left operand of assignment
89 | cu... |
s298312713 | p03979 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()
#define INF 1<<20
#define EPS (1e-6)
#define EQ(a,b) (abs((a)-(b)) < EPS)
using namespace std;
typedef long long ll;
typedef complex<double> P;
bool cmp(P a, P b){
double arga = arg(a);
double argb = arg(b);
if(!EQ(... | a.cc: In function 'int main()':
a.cc:88:42: error: lvalue required as left operand of assignment
88 | curr.real() = (double)(j - W/2);
| ~~~~~~~~~^~
a.cc:89:42: error: lvalue required as left operand of assignment
89 | ... |
s573600422 | p03979 | C++ | #include <bits/stdc++.h>
using namespace std;
#define INF 100000
#define MAXN 25000
#define MAXD 200
struct Edge
{
int t, c, r;
};
char grid[MAXD+5][MAXD+5];
int w, h;
int prv[MAXN+5], vis[MAXN+5];
vector<Edge> edge[MAXN+5];
int get(int r, int c)
{
if (r < 0 || r >= h || c < 0 || c >= w) return w*h*2+1;
... | a.cc: In function 'int add(int, int, int)':
a.cc:31:1: warning: no return statement in function returning non-void [-Wreturn-type]
31 | }
| ^
a.cc: In function 'int maxflow(int, int, int)':
a.cc:68:15: error: no matching function for call to 'min(long long int&, int)'
68 | return min(mf, INF);
| ... |
s429545766 | p03979 | C | else ny--;
}
nx--;
}
}
}
//for(k=1;k<tr;k++)s+=MAX(abs(ty[k]-ty[k-1]),abs(tx[k]-tx[k-1]));
//s+=4;//printf("\n");
}
}
//for(i=0;i<h;i++)printf("%s\n",d[i+2]+2);
qy[t=0]=qx[0]=c=0;
d[0][0]=1;
for(r=1;r-t;t++){
for(k=0;k<4;k++){
ny=qy[t]+Y[k];
... | main.c:1:15: error: expected identifier or '(' before 'else'
1 | else ny--;
| ^~~~
main.c:2:13: error: expected identifier or '(' before '}' token
2 | }
| ^
main.c:3:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '--' token
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.