submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s388982700 | p03853 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w;
cin>>h>>w;
vector<string> s(h);
for(int i=0;i<h;i++){
cin>>s.at(i);
cout<<s.at(i)<<endl<<s.at(i)<<endl;
} | a.cc: In function 'int main()':
a.cc:12:2: error: expected '}' at end of input
12 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s525927524 | p03853 | C | #include<iostream>
#include<stdio.h>
#include<math.h>
using namespace std;
int main() {
int h,w;
// scanf("%d %d",&h,&w);
cin>>h>>w;
char str[1001][1001]= {'\0'};
int i,j;
fflush(stdin);
for(i=1; i<=h; i++) {
for(j=1; j<=w; j++) {
// scanf("%c",str[i][j]);
cin>>str[i][j];
}
}
// for(i=1; i<=h; i++) {
/... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s317170979 | p03853 | C++ | #include<stdio.h>
int main(){
int h,w;
scanf("%d %d",&h,&w);
char str[101][101];
int i;
fflush(stdin);
for(i=0;i<h;i++){
gets(str[i]);
}
for(i=0;i<h;i++){
puts(str[i]);
puts(str[i]);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(str[i]);
| ^~~~
| getw
|
s839433277 | p03853 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int main(){
int h,w;
cin>>h>>w;
char str[101][101];
int i;
fflush(stdin);
for(i=0;i<h;i++){
gets(str[i]);
}
for(i=0;i<h;i++){
puts(str[i]);
puts(str[i]);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
11 | gets(str[i]);
| ^~~~
| getw
|
s719441731 | p03853 | C++ | #include<iostream>
using namespace std;
int main(){
int h,w;
cin>>h>>w;
char str[101][101];
int i;
fflush(stdin);
for(i=0;i<h;i++){
gets(str[i]);
}
for(i=0;i<h;i++){
puts(str[i]);
puts(str[i]);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | gets(str[i]);
| ^~~~
| getw
|
s886749999 | p03853 | C | #include<iostream>
using namespace std;
int main(){
int h,w;
cin>>h>>w;
char str[101][101];
int i;
fflush(stdin);
for(i=0;i<h;i++){
gets(str[i]);
}
for(i=0;i<h;i++){
puts(str[i]);
puts(str[i]);
}
return 0;
} | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s066235787 | p03853 | C | #include<stdio.h>
int main() {
int h,w;
// cin>>h>>w;
// getchar();
scanf("%d %d",&h,&w);
// fflush(stdin);
while(getchar()!='\n')
continue;
char str[][101]= {'\0'};
int i,j;
for(i=0; i<h; i++) {
gets(str[i]);
// for(j=0; j>w; j++) {
//// cin>>str[i][j];
//// scanf("%c",&str[i][j]);
// }
}
for(i=0; i<... | main.c: In function 'main':
main.c:13:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
13 | gets(str[i]);
| ^~~~
| fgets
main.c:21:25: error: 'cout' undeclared (first use in this function)
21 | ... |
s475488103 | p03853 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int main() {
int h,w;
// cin>>h>>w;
// getchar();
scanf("%d %d",&h,&w);
// fflush(stdin);
while(getchar()!='\n')
continue;
char str[][101]= {'\0'};
int i,j;
for(i=0; i<h; i++) {
gets(str[i]);
// for(j=0; j>w; j++) {
//// cin>>str[i][j];
//// scanf(... | a.cc: In function 'int main()':
a.cc:15:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
15 | gets(str[i]);
| ^~~~
| getw
|
s552646235 | p03853 | C++ | #include <stdio.h>
#include <math.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <time.h>
#include <queue>
#include <list>
#include <string.h>
#define sf scanf
#define pf printf
#define lf double
#define ll long long
#define p123 printf("123\n");
#define pn printf("\n");
#de... | a.cc: In function 'int main()':
a.cc:62:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
62 | gets(a);
| ^~~~
| getw
|
s771514459 | p03853 | C++ | #include <stdio.h>
#include <math.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <time.h>
#include <queue>
#include <list>
#include <string.h>
#define sf scanf
#define pf printf
#define lf double
#define ll long long
#define p123 printf("123\n");
#define pn printf("\n");
#de... | a.cc: In function 'int main()':
a.cc:62:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
62 | gets(a);
| ^~~~
| getw
|
s668423449 | p03853 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int h, w;
cin >> h >> w;
vector<vector<int>> c(h, vector(w));
int i, j;
for(i = 0; i < h; i++)
{
for(j = 0; j < w; j++)
{
cin >> c.at(i).at(j);
}
}
for(i = 0; i < 2 * h; i++)
{
for(j = 0; j < w; j++)
{
cout << c... | a.cc: In function 'int main()':
a.cc:8:36: error: class template argument deduction failed:
8 | vector<vector<int>> c(h, vector(w));
| ^
a.cc:8:36: error: no matching function for call to 'vector(int&)'
In file included from /usr/include/c++/14/vector:66,
... |
s654384457 | p03853 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int h, w;
cin >> h >> w;
vector<vector<int>> c(h, vector(w));
int i, j;
for(i = 0; i < h; i++)
{
for(j = 0; j < w; j++)
{
cin >> c.at(i).at(j);
}
}
for(i = 0; i < 2 * h; i++)
{
for(j = 0; j < w; j++)
{
cout << c... | a.cc: In function 'int main()':
a.cc:8:36: error: class template argument deduction failed:
8 | vector<vector<int>> c(h, vector(w));
| ^
a.cc:8:36: error: no matching function for call to 'vector(int&)'
In file included from /usr/include/c++/14/vector:66,
... |
s159867480 | p03853 | C | #include<stdio.h>
int main(){
char s[101][101];
int H, W, i;
scanf("%d %d", &H, &W)
for(i = 0; i < H; i++){
scanf("%s", s[i]);
}
for (i = 0; i < 2*H; i++){
printf("%s\n", s[i/2]);
}
return 0;
} | main.c: In function 'main':
main.c:7:25: error: expected ';' before 'for'
7 | scanf("%d %d", &H, &W)
| ^
| ;
8 | for(i = 0; i < H; i++){
| ~~~
|
s022270270 | p03853 | C++ | 9 20
.....***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*......*...
....*.....*....*....
.....**..*...**.....
.......*..*.*.......
........**.*........
.........**......... | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 9 20
| ^
|
s812419597 | p03853 | C++ | 1 4
***. | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1 4
| ^
|
s994140411 | p03853 | C | #include<studio.h>
int main(void)
{
int h,w,moji[110];
scanf("%d%d",&h,&w);
for(int i = 0;i < h;i++)
{
scanf("%s",moji);
printf("%s",moji);
printf("%s",moji);
}
return 0;
} | main.c:1:9: fatal error: studio.h: No such file or directory
1 | #include<studio.h>
| ^~~~~~~~~~
compilation terminated.
|
s516806113 | p03853 | C++ | #include<stdio.h>
int main(void)
{
int h,w;
char a[10000][10000];
scanf("%d%d",&h,&w);
for(i=1;i<=w;i++) for(j=1;j<=h;j++) scanf("%c",&a[i][j]);
for(i=1;i<=w;i=(i+1)/2){
for(j=1;j<=h;j++) printf("%c",a[i][j]);
printf("\n");
}
return... | a.cc: In function 'int main()':
a.cc:7:13: error: 'i' was not declared in this scope
7 | for(i=1;i<=w;i++) for(j=1;j<=h;j++) scanf("%c",&a[i][j]);
| ^
a.cc:7:31: error: 'j' was not declared in this scope
7 | for(i=1;i<=w;i++) for(j=1;j<=h;j++) scanf("%c",&a[i][j]);
| ... |
s202129159 | p03853 | C++ | #include<iostream>
using namespace std;
int main(){
int h,w;cin>>h>>w;
vector<string> c(h);
for(int i=0;i<h;i++){
cin>>c[i];
}
for(int i=0;i<h;i++){
cout<<c[i]<<endl;
cout<<c[i]<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:5:3: error: 'vector' was not declared in this scope
5 | vector<string> c(h);
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include<iostream>
+++ |+#include <vector>
2 | usin... |
s178517377 | p03853 | C++ | #include <iostream>
using namespace std;
int main()
{
int h,w;
cin >>h>>w;
char C[h][w];
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin>>C[i][j];
}
}
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cout<<C[i][j];
}
cout<<endl;
... | a.cc: In function 'int main()':
a.cc:26:6: error: expected '}' at end of input
26 | }
| ^
a.cc:6:1: note: to match this '{'
6 | {
| ^
|
s719360295 | p03853 | C++ | #include <iostream>
#include <string>
#include <sstream>
#include <set>
#include <map>
#include <unordered_map>
#include <stack>
#include <queue>
#include <vector>
#include <utility>
#include <iomanip>
#include <sstream>
#include <bitset>
#include <cstdlib>
#include <iterator>
#include <algorithm>
#include <functional>... | a.cc: In function 'int main()':
a.cc:50:26: error: invalid types '<unresolved overloaded function type>[ll {aka long long int}]' for array subscript
50 | COUT(BUR)[i];
| ^
a.cc:52:26: error: invalid types '<unresolved overloaded function type>[ll {aka long long int}]' f... |
s811163186 | p03853 | C++ | #include <iostream>
#include <string>
#include <sstream>
#include <set>
#include <map>
#include <unordered_map>
#include <stack>
#include <queue>
#include <vector>
#include <utility>
#include <iomanip>
#include <sstream>
#include <bitset>
#include <cstdlib>
#include <iterator>
#include <algorithm>
#include <functional>... | a.cc: In function 'int main()':
a.cc:50:26: error: invalid types '<unresolved overloaded function type>[ll {aka long long int}]' for array subscript
50 | COUT(BUR)[i];
| ^
a.cc:52:26: error: invalid types '<unresolved overloaded function type>[ll {aka long long int}]' f... |
s075832420 | p03853 | C++ | #include <iostream>
#include <string>
#include <sstream>
#include <set>
#include <map>
#include <unordered_map>
#include <stack>
#include <queue>
#include <vector>
#include <utility>
#include <iomanip>
#include <sstream>
#include <bitset>
#include <cstdlib>
#include <iterator>
#include <algorithm>
#include <functional>... | a.cc: In function 'int main()':
a.cc:48:21: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string [105]' {aka 'std::__cxx11::basic_string<char> [105]'})
48 | cin >> BUR;
| ~~~ ^~ ~~~
| | |
... |
s896106585 | p03853 | C++ | #include<bits/stdc++.h>
using namespace std;
int a[101][101];
typedef long long ll;
typedef unsigned long long ull;
int main(){
int a,b,i,j;
cin>>a>>b;
for(i=1;i<=a;i++)
for(j=1;j<=b;j++) cin>>a[i][j];
for(i=1;i<=a;i++)
for(j=1;j<=b*2;j++) a[i][j]=a[(i+1)/2][j];
for(i=1;i<=a;i++)
for(j=1;j<=b*2;j++) cout<<a[... | a.cc: In function 'int main()':
a.cc:10:41: error: invalid types 'int[int]' for array subscript
10 | for(j=1;j<=b;j++) cin>>a[i][j];
| ^
a.cc:12:38: error: invalid types 'int[int]' for array subscript
12 | for(j=1;j<=b*2;j++) a[i][j]=a[... |
s286247277 | p03853 | C++ | #include<iostream>
#include<climits>
#include<math.h>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<stdio.h>
#include <string>
#include <complex>
#include <functional>
using namespace std;
typedef pair<int,int> P;
double dat[100][100];
int dp[6][1010];//動的計画法
int prime[10000001];
char str[1010][1010];
... | a.cc: In function 'int main()':
a.cc:23:28: error: expected ';' before ')' token
23 | for(int i=0;i<h,i++) cin>>s[i];
| ^
| ;
|
s315235438 | p03853 | C++ | #include<iostream>
#include<string>
typedef long long int ll;
using namespace std;
ll A,B;
string S,T;
int main(){
cin>>A>>B;
REP(i,A){
cin>>S;cout<<S<<endl<<S<<endl;
}
} | a.cc: In function 'int main()':
a.cc:9:9: error: 'i' was not declared in this scope
9 | REP(i,A){
| ^
a.cc:9:5: error: 'REP' was not declared in this scope
9 | REP(i,A){
| ^~~
|
s138168079 | p03853 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(){
int H,W;
cin >> H >> W;
vector<char> C(10010);
for(int i=1;i<=H*W;i++){
cin >> C.at(i);}
for(int i=1;i<=W;i++){
cout << C.at(i) | a.cc: In function 'int main()':
a.cc:13:20: error: expected ';' at end of input
13 | cout << C.at(i)
| ^
| ;
a.cc:13:20: error: expected '}' at end of input
a.cc:12:24: note: to match this '{'
12 | for(int i=1;i<=W;i++){
| ^
a.cc... |
s626291889 | p03853 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int h,w;
cin >> h >> w;
string s;
for(int i=0;i<n;i++)
{
cin >> s;
cout << s << endl;
cout << s << endl;
}
} | a.cc: In function 'int main()':
a.cc:12:19: error: 'n' was not declared in this scope
12 | for(int i=0;i<n;i++)
| ^
|
s482299407 | p03853 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
string array[101];
cin>>a>>b;
for(i=0;i<b;i++){
cin>>array[i];
cout<<array[i]<<endl;
cout<<array[i]<<endl;
}
} | a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
8 | for(i=0;i<b;i++){
| ^
|
s148183052 | p03853 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H >> W;
int<vector> a(H*W);
for(int i=0;i<H*W;i++){
cin >> a.at(i);
}
| a.cc: In function 'int main()':
a.cc:7:3: error: 'int' is not a template
7 | int<vector> a(H*W);
| ^~~
a.cc:9:14: error: request for member 'at' in 'a', which is of non-class type 'int'
9 | cin >> a.at(i);
| ^~
a.cc:10:4: error: expected '}' at end of input
10 | }
| ... |
s674557424 | p03853 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
int h,w;cin>>h>>w;
rep(h){
string s;cin>>s;cout<<s<<endl<<s<<endl;
}
} | a.cc:7:14: error: macro "rep" requires 2 arguments, but only 1 given
7 | rep(h){
| ^
a.cc:2:9: note: macro "rep" defined here
2 | #define rep(i,n) for(int i=0;i<n;i++)
| ^~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'rep' was not declared in this scope
7 | ... |
s517803488 | p03853 | C++ | #include <bits/stdc++.h>
using namespace tsd;
int main(){
char a[100][100];
int b = 0,c = 0;
cin >> b >> c;
for(int Q = 0;Q < b;Q++){
for(int W = 0;W < c;W++){
cin >> a[Q][W];
}
}
for(int Q = 0;Q < b;Q++){
for(int S = 0;S < 2;S++){
for(int W = 0;W < c;W++){
cout << a[Q][W];
}
... | a.cc:2:17: error: 'tsd' is not a namespace-name
2 | using namespace tsd;
| ^~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin >> b >> c;
| ^~~
| std::cin
In file included from /usr/include/x86_64-lin... |
s868078193 | p03853 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int a,b;
string h[100];
cin>>a>>b;
for(int i=0;i<a,i++){
cin>>h[i];
cout<<h[i]<<endl;
cout<<h[i]<<endl;
}
} | a.cc: In function 'int main()':
a.cc:8:22: error: expected ';' before ')' token
8 | for(int i=0;i<a,i++){
| ^
| ;
|
s153768842 | p03853 | C++ | #include <bits/stdc++.h>
#define rep(i, a, b) for(int i=(a);i<(b);++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = (1 << 30) - 1;
const ll INF64 = ((ll)1 << 62) - 1;
const ll MOD = 1e9 + 7;
const double PI = 3.1415926535897932384626433832795;
int main()
{
ll a, b;
cin >> a ... | a.cc: In function 'int main()':
a.cc:20:28: error: expected ';' before '}' token
20 | cin >> c[i]
| ^
| ;
21 | }
| ~
|
s206510105 | p03853 | C++ | #include <bits/stdc++.h>
#define rep(i, a, b) for(int i=(a);i<(b);++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = (1 << 30) - 1;
const ll INF64 = ((ll)1 << 62) - 1;
const ll MOD = 1e9 + 7;
const double PI = 3.1415926535897932384626433832795;
int main()
{
ll a, b;
cin >> a ... | a.cc: In function 'int main()':
a.cc:16:26: error: 'x' was not declared in this scope
16 | cin >> a >> b >> x;
| ^
a.cc:20:28: error: expected ';' before '}' token
20 | cin >> c[i]
| ^
| ;
2... |
s718347099 | p03853 | Java | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
private static Scanner scan;
private static void start() {
scan = new Scanner(java.lang.System.in);
scan = Input.getScanner();
System.init();
}
private static void finish() {
... | Main.java:12: error: cannot find symbol
scan = Input.getScanner();
^
symbol: variable Input
location: class Main
Main.java:13: error: cannot find symbol
System.init();
^
symbol: method init()
location: class System
Main.java:17: error: cannot find symbol
... |
s277600483 | p03853 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int h, w; cin >> h >> w;
for(int i = 0; i < h; ++i){cin >> s; cout << s << endl << s << endl;}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:43: error: 's' was not declared in this scope
5 | for(int i = 0; i < h; ++i){cin >> s; cout << s << endl << s << endl;}
| ^
|
s127258644 | p03853 | Java | import java.util.*;
public class m3a {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
List<String> s = new ArrayList<String>();
int H = sc.nextInt();
int W = sc.nextInt();
for(int i = 0;i < H;i++) {
String a = sc.next();
for(int m = 0;m < 2;m++) {
s.add(a);
}
}
... | Main.java:3: error: class m3a is public, should be declared in a file named m3a.java
public class m3a {
^
1 error
|
s947546366 | p03853 | C++ | #include <bits/stdc++.h>
#define INF 100000000
#define MOD9(a) (a%1000000009)
#define MOD7(a) (a%1000000007)
#define ABS(a) (a<0?-(a):a)
#define MIN(a,b) (a>b?b:a)
#define MAX(a,b) (a>b?a:b)
#define REP(i,a) for(int i=0;i<a;i++)
using namespace std;
int main(){
int H,W;
cin >> H >> W;
char c[H][W];
REP(i, H)... | a.cc:41:5: error: redefinition of 'int main()'
41 | int main(){
| ^~~~
a.cc:12:5: note: 'int main()' previously defined here
12 | int main(){
| ^~~~
|
s021258446 | p03853 | 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)... | a.cc: In function 'int main()':
a.cc:58:19: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int&)'
58 | string field(h); for(auto& e : field) cin >> e;
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/1... |
s511514071 | p03853 | C++ | #include <cstdio>
#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <stack>
#include <functional>
#include <set>
#include <map>
#include <deque>
#define WMAX 10000
#define HMAX 10000
//コメントアウトするとdebug()を実行しない
#define DEBUG
using namespace std;
t... | a.cc: In function 'void answer()':
a.cc:50:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
50 | cout << ans << "\n";
| ^~~
| abs
|
s904739022 | p03853 | C++ | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int h = sc.nextInt(),
w = sc.nextInt();
for(int i = 0; i < h; i++){
String c = sc.next();
System.out.println(c);
System.out.println(c);
}
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
2 | public class Main {
| ^~~~~~
|
s964992856 | p03853 | C++ | #include<iostream>
#include<string>
#include<cmath>
#include<queue>
#include<map>
#include<set>
#include<list>
#include<iomanip>
#include<vector>
#include<functional>
#include<algorithm>
#include<cstdio>
#include<unordered_map>
using namespace std;
typedef long long ll;
int main() {
int h,w;
cin>>h>>w;
char a[100][1... | a.cc: In function 'int main()':
a.cc:29:32: error: invalid types 'char [100][100][double]' for array subscript
29 | cout<<a[floor((double)(i+1)/2)][j];
| ^
|
s883270491 | p03853 | C++ | #include<iostream>
#include<string>
#include<cmath>
#include<queue>
#include<map>
#include<set>
#include<list>
#include<iomanip>
#include<vector>
#include<functional>
#include<algorithm>
#include<cstdio>
#include<unordered_map>
using namespace std;
typedef long long ll;
int main() {
int h,w;
cin>>h>>w;
char a[100][1... | a.cc: In function 'int main()':
a.cc:29:32: error: invalid types 'char [100][100][double]' for array subscript
29 | cout<<a[floor((double)(i+1)/2)];
| ^
|
s942258830 | p03853 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int H = sc.nextInt();
int W = sc.nextInt();
char[][] picture = new char[H][W];
for(int i = 0; i < H; i++) {
for(int j = 0; j < W; j++) {
picture[i][j] = sc.next();
... | Main.java:11: error: incompatible types: String cannot be converted to char
picture[i][j] = sc.next();
^
1 error
|
s846409716 | p03853 | Java | import java.util.Scanner;
public class main {
public static void main(String[] args){
Scanner stdIn = new Scanner(System.in);
int H = stdIn.nextInt();
int W = stdIn.nextInt();
stdIn.nextLine();
String[] C = new String[H];
for(int i=0;i<H;i++){
C[i] = stdIn.nextLine();
}
for(String Ci :C){
System... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s875748539 | p03853 | C++ | package main
import (
"fmt"
)
func main() {
var h, w int
fmt.Scan(&h, &w)
for y := 0; y < h; y++ {
var s string
fmt.Scan(&s)
fmt.Println(s)
fmt.Println(s)
}
}
| a.cc:1:1: error: 'package' does not name a type
1 | package main
| ^~~~~~~
|
s521134508 | p03853 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
for (int i = 0; i < h; i++) {
string str;
cin >> str;
cout << str << end;:
cout << str << end;:
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:13: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
12 | cout << str << end;:
| ~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/includ... |
s364200141 | p03853 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
#define rep(i, n)for((i) = 0;(i) < (n);++(i))
int main(void){
int h, w;
scanf("%d%d", &h, &w);
string s;
rep(i, h){
cin >> s;
cout << s << "\n";
cout << s << "\n";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:13: error: 'i' was not declared in this scope
12 | rep(i, h){
| ^
a.cc:6:23: note: in definition of macro 'rep'
6 | #define rep(i, n)for((i) = 0;(i) < (n);++(i))
| ^
|
s346361066 | p03853 | C++ | n, m = gets.split(" ")
puts (1..n.to_i).map{gets}.map{|s| puts s; puts s}
| a.cc:2:7: error: too many decimal points in number
2 | puts (1..n.to_i).map{gets}.map{|s| puts s; puts s}
| ^~~~~~~~~
a.cc:1:1: error: 'n' does not name a type
1 | n, m = gets.split(" ")
| ^
a.cc:2:27: error: expected unqualified-id before '.' token
2 | puts (1..n.to_i).map{gets}.map{|s| p... |
s787512082 | p03853 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int H = s.nextInt();
int W = s.nextInt();
String[] array = new String[H];
for(int i=0; i<H; i++){
array[i] = s.next();
}
// 表示
for(int i=0; i<H; i++){
System.out.p... | Main.java:20: error: reached end of file while parsing
}
^
1 error
|
s484513369 | p03853 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(9{
int h,w;
cin>>h>>w;
for(int i=0;i<h;i++){
string c;
cin>>c;
cout<<c<<endl;
cout<<c<<endl;
}
return 0;
}
| a.cc:4:5: error: cannot declare '::main' to be a global variable
4 | int main(9{
| ^~~~
a.cc:4:11: error: expected ')' before '{' token
4 | int main(9{
| ~ ^
| )
|
s052776870 | p03853 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long // <-----!!!!!!!!!!!!!!!!!!!
#define rep(i,n) for (int i=0;i<(n);i++)
#define rep2(i,a,b) for (int i=(a);i<(b);i++)
#define rrep(i,n) for (int i=(n)-1;i>=0;i--)
#define rrep2(i,a,b) for (int i=(a)-1;i>=b;i--)
#define chmin(a,b) (a)=min((a),(b));
#de... | a.cc: In function 'int main()':
a.cc:42:12: error: 'n' was not declared in this scope
42 | rep(i, n) cin >> s[i];
| ^
a.cc:5:34: note: in definition of macro 'rep'
5 | #define rep(i,n) for (int i=0;i<(n);i++)
| ^
a.cc:44:12: error: 'n' was not declared ... |
s383084791 | p03853 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int h,w; cin>>h>>w;
vector<string> M(h);
for(int i=0;i<h;i++){
cin>>M[i];
}
for(int i=0;i<h*2;i++){
for(int j=0;j<w;j++){
cout<<M[i/2][j];
}
cout<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:2: error: 'vector' was not declared in this scope
7 | vector<string> M(h);
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include <iostream>
+++ |+#include <vector>
2 | #incl... |
s325915031 | p03853 | C | #include <stdio.h>
int main(){
int h=0,w=0;
scanf("%d %d",&h,&w );
char ij[h-1][w-1];
for(int k=0; k<h;k++){
scanf("%s",ij[k]);
}
printf("%d %d\n",h,w);
for(int k=0; k<h;k++){
for(int l=0; l<w; l++){
printf("%c",ij[k][l]);
}
printf("\n");
for(int m=0; m<w; m++){
printf("%c",ij[k][l]);
}
... | main.c: In function 'main':
main.c:16:25: error: 'l' undeclared (first use in this function)
16 | printf("%c",ij[k][l]);
| ^
main.c:16:25: note: each undeclared identifier is reported only once for each function it appears in
|
s040768912 | p03853 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int h,w;
char c[111][111];
cin >> h >> w;
for(int i=0;i<h;i++){
cin >> c[i];
}for(int i=0;i<h;i++){
else cout<<c[i]<<endl<<c[i]<<endl;
} return(0);
} | a.cc: In function 'int main()':
a.cc:10:3: error: 'else' without a previous 'if'
10 | else cout<<c[i]<<endl<<c[i]<<endl;
| ^~~~
|
s319159240 | p03853 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int h,w;
char c[111][111];
cin >> h >> w;
for(int i=0;i<h;i++){
cin >> c[i];
}for(int i==0;i<h;i++){
else cout<<c[i]<<endl<<c[i]<<endl;
} return(0);
}
| a.cc: In function 'int main()':
a.cc:9:11: error: expected ';' before '==' token
9 | }for(int i==0;i<h;i++){
| ^~
| ;
a.cc:9:11: error: expected primary-expression before '==' token
9 | }for(int i==0;i<h;i++){
| ^~
a.cc:9:18: error: expected ')' before ';' token
... |
s266371693 | p03853 | C++ | #include<stdio.h>
int main(){
int i, j, a[101][101]={0,}, x, y;
scanf("%d %d", &i, &j);
for(x=1;x<=i;x++){
for(y=1;y<=j;y++){
scanf("%c ", &a[x][y]);
}1
}
for(x=1;x<=i;x++){
for(y=1;y<=j;y++){
printf("%c ", &a[x][y]);
}
printf("\n");
for(y=1;y<=j;y++){
printf("%c ", &a[x][y]);
}
pri... | a.cc: In function 'int main()':
a.cc:11:19: error: expected ';' before '}' token
11 | }1
| ^
| ;
12 | }
| ~
|
s939280792 | p03853 | C++ | #include <stdio.h>
using namespace std;
int h, w;
char s[105];
int main() {
freopen("input.txt", "r", stdin);
scanf("%d%d", &h, &w);
gets(s);
while(h--) {
gets(s);
puts(s);
puts(s);
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(s);
| ^~~~
| getw
|
s289730936 | p03853 | C++ | a | a.cc:1:1: error: 'a' does not name a type
1 | a
| ^
|
s972515092 | p03853 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
char p[1000][101];
int h,w;
cin>>h>>w;
getchar();
p[h][w];
for(int i=0;i<h;i++)
gets(p[i]);
for(int i=0;i<h;i++)
for(int j=0;j<2;j++)
cout<<p[i]<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:13:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
13 | gets(p[i]);
| ^~~~
| getw
|
s348249843 | p03853 | C++ | #include<iostream>
using namespace std;
int main(){
int W,H;
char C[201][201];
cin>>H>>W;
for(int i=0;i<H;i++)
for(int j=0;j<W;j++)
cin>>C[i][j];
for(int i=H;i<2H;i++)
for(int j=0;j<W;j++)
C[i][j]=C[(i+1)/2][j];
for(int i=0;i<2H;i++){
for(int j=0;j<W;j++)
cout<<C[i][j];
cout<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:15: error: unable to find numeric literal operator 'operator""H'
11 | for(int i=H;i<2H;i++)
| ^~
a.cc:15:15: error: unable to find numeric literal operator 'operator""H'
15 | for(int i=0;i<2H;i++){
| ^~
|
s641774124 | p03853 | C++ | #include <cstdio>
#include <cstring>
int main(void) {
int H, W;
scanf("%d %d", &H, &W);
char c[H+1][W+1];
for(int i=1 ; i<=H ; i++) {
gets(c[i]);
}
for(int i=1 ; i<=H ; i++) {
puts(c[i]);
puts(c[i]);
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(c[i]);
| ^~~~
| getw
|
s275259486 | p03853 | C++ | #include<iostream>
using namespace std;
int main(){
int W,H;
char C[101][101]={};
cin>>H>>W;
for(int i=0;i<H;i++)
for(int j=0;j<W;j++)
cin>>C[i][j];
for(int i=H;i<2H;i++)
for(int j=0;j<W;j++)
C[i][j]=C[(i+1)/2][j];
for(int i=0;i<2H;i++){
for(int j=0;j<W;j++)
cout<<C[i][j];
cout<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:15: error: unable to find numeric literal operator 'operator""H'
11 | for(int i=H;i<2H;i++)
| ^~
a.cc:15:15: error: unable to find numeric literal operator 'operator""H'
15 | for(int i=0;i<2H;i++){
| ^~
|
s632121747 | p03853 | C++ | #include <stdio.h>
#include <bits/stdc++.h>
#include <string.h>
using namespace std;
int h, w;
void init(){
scanf("%d", &h);
scanf("%d", &w);
char ch[1234], c[1234];
scanf("%s", ch);
scanf("%s", c);
if(h == 1 and w == 4) {
printf("%s\n", ch);
printf("%s\n", c);
}
else
{
printf("%s\n", ch);
printf("%s... | a.cc: In function 'void init()':
a.cc:22:32: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
22 | printf("%s\n", strrev(ch));
| ^~~~~~
| strsep
|
s955726109 | p03853 | C++ | int main()
{
char a[201][201];
int i,j;
char b[101][101];
int n,m;
cin>>n>>m;
for(i=1;i<=n;i++)
for(j=1;j<=m;j++)
cin>>b[i][j];
for(i=1;i<=2*n;i++)
for(j=1;j<=m;j++)
a[i][j]=b[(i+1)/2][j];
for(i=1;i<=2*n;i++)
{for(j=1;j<=m;j++)
cout<<a[i][j];... | a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
8 | cin>>n>>m;
| ^~~
a.cc:17:5: error: 'cout' was not declared in this scope
17 | cout<<a[i][j];
| ^~~~
a.cc:18:5: error: 'cout' was not declared in this scope
18 | cout<<endl;
| ^~~... |
s185614919 | p03853 | C++ | #include<iostream>
using namespace std;
int main(){
int W,H;
char C[101][101];
cin>>H>>W;
for(int i=0;i<H;i++)
for(int j=0;j<W;j++)
cin>>C[i][j];
for(int i=H;i<2H;i++)
for(int j=0;j<W;j++)
C[i][j]=C[(i+1)/2][j];
for(int i=0;i<2H;i++){
for(int j=0;j<W;j++)
cout<<C[i][j];
cout<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:15: error: unable to find numeric literal operator 'operator""H'
11 | for(int i=H;i<2H;i++)
| ^~
a.cc:15:15: error: unable to find numeric literal operator 'operator""H'
15 | for(int i=0;i<2H;i++){
| ^~
|
s426966652 | p03853 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
int h, w;
char s[105];
int main() {
cin >> h>> w;
gets(s);
while(h--) {
gets(s);
puts(s);
puts(s);
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(s);
| ^~~~
| getw
|
s059657143 | p03853 | C | #include "stdio.h"
int main() {
int h, w;
int i, j;
char line[101];
scanf("%d %d", &h, &w);
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
line[j] = getc();
}
line[h] = '\0';
getc();
printf("%s\n", line);
printf("%s\n", line);
}
return 0;
} | main.c: In function 'main':
main.c:10:17: error: too few arguments to function 'getc'
10 | line[j] = getc();
| ^~~~
In file included from main.c:1:
/usr/include/stdio.h:576:12: note: declared here
576 | extern int getc (FILE *__stream) __nonnull ((1));
| ^~~~
main.c:13:... |
s521170299 | p03854 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string S;cin>>S;
S=reverse(S.begin(),S.end());
for(;!S.empty();){
}
puts("NO");
} | a.cc: In function 'int main()':
a.cc:5:30: error: no match for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'void')
5 | S=reverse(S.begin(),S.end());
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/... |
s837831389 | p03854 | C | #include <stdio.h>
#include <string.h>
int main(void){
char s[100000];
char t[100000]; // maerd , remaerd , esare , resare
int s_length,i;
scanf("%s",s);
s_length = strlen(s);
for(i=s_length-1;i>=0;i--){
if(s[i]=='m'){
t[i]='m'; t[i-1]='a'; t[i-2]='e'; t[i-3]='r'; t[i-4]='d';
i=i-4;
}el... | main.c: In function 'main':
main.c:25:27: error: lvalue required as left operand of assignment
25 | if(strcmp(s,t)==0 && i=0){
| ^
|
s568638261 | p03854 | Java | import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
private static boolean isComposable(String s, Set<String> dictionary) {
if (dictionary.contains(s) || s.length() == 0) {
return true;
}
for (int i=0; i... | Main.java:28: error: reached end of file while parsing
}
^
1 error
|
s303866296 | p03854 | Java | import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
private static boolean isComposable(String s, Set<String> dictionary) {
if (dictionary.contains(s) || s.length() == 0) {
return true;
}
for (int i=0; i... | Main.java:28: error: reached end of file while parsing
}
^
1 error
|
s036713186 | p03854 | C++ | #include <bits/stdc++.h>
using namespace std;
string divide[4] = {"dream","dreamer","erase","eraser"};
int main()
{
string S;
cin >> S;
reverse(S.begin(),S.end());
for(int i=0; i<4; i++)
reverse(divide.at(i).begin(),divide.at(i).end());
book can = true;
for(int i=0; i<S.size();){... | a.cc: In function 'int main()':
a.cc:13:24: error: request for member 'at' in 'divide', which is of non-class type 'std::string [4]' {aka 'std::__cxx11::basic_string<char> [4]'}
13 | reverse(divide.at(i).begin(),divide.at(i).end());
| ^~
a.cc:13:45: error: request for member 'at'... |
s535599677 | p03854 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
reverse(s.begin(), s.end());
while (i < s.size()) {
if (s.substr(i, 5) == "maerd" || s.substr(i, 5) == "esare") {
if (i == s.size()) {
cout << "YES" << endl;
}
i = i... | a.cc: In function 'int main()':
a.cc:8:12: error: 'i' was not declared in this scope
8 | while (i < s.size()) {
| ^
|
s798226393 | p03854 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const long long INF = 1LL << 60;
int main(){
string S;
cin >> S;
for(int i=S.size()-1; i>=0; i--) {
string ss += S[i];
if(ss=="maerd") ss="";
else if(ss=="remaerd") ss="";
else if(ss=="esare") ss="";
... | a.cc: In function 'int main()':
a.cc:11:19: error: expected initializer before '+=' token
11 | string ss += S[i];
| ^~
a.cc:12:12: error: 'ss' was not declared in this scope
12 | if(ss=="maerd") ss="";
| ^~
a.cc:17:8: error: 'ss' was not declared in this sc... |
s012267298 | p03854 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const long long INF = 1LL << 60;
int main(){
string S;
cin >> S;
for(int i=S.size()-1; i>=0; i--) {
ss += S[i];
if(ss=="maerd") ss="";
else if(ss=="remaerd") ss="";
else if(ss=="esare") ss="";
else ... | a.cc: In function 'int main()':
a.cc:11:9: error: 'ss' was not declared in this scope
11 | ss += S[i];
| ^~
a.cc:17:8: error: 'ss' was not declared in this scope
17 | if(ss == "") cout << "YES" << endl;
| ^~
|
s531219100 | p03854 | C++ | // C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free So... | a.cc: In function 'int main()':
a.cc:174:14: error: expected ';' before '}' token
174 | break
| ^
| ;
175 | }
| ~
|
s975987604 | p03854 | C++ | #include<bits/stdc++.h>
#define INFTY 10000000000
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long int ll;
const int MOD=1000000007;
const int di[4] = {-1,0,1,0};
const int dj[4] = {0,-1,0,1};
const int INF = 1e9;
const int A = 1000005;
int main(){
string s,t={};cin>>s;
int ... | a.cc:31:2: error: stray '#' in program
31 | }#include<bits/stdc++.h>
| ^
a.cc:31:3: error: 'include' does not name a type
31 | }#include<bits/stdc++.h>
| ^~~~~~~
a.cc:36:11: error: redefinition of 'const int MOD'
36 | const int MOD=1000000007;
| ^~~
a.cc:6:11: note: 'const int MO... |
s665685453 | p03854 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
string ip;
cin>>ip;
ll n=ip.length();
bool isPossible=false;
string pattern[4];
pattern[0]="maerd";
pattern[1]="remaerd";
pattern[2]="esare";
pattern[3]="resaer";
ll i=n-1;
string temp="";
for(i>=0){
temp... | a.cc: In function 'int main()':
a.cc:21:11: error: expected ';' before ')' token
21 | for(i>=0){
| ^
| ;
a.cc:33:3: error: expected primary-expression before 'if'
33 | if(temp==""){
| ^~
a.cc:31:4: error: expected ';' before 'if'
31 | }
| ^
| ;
... |
s839602515 | p03854 | C | #include <stdio.h>
#include <string.h>
const int MAX = 100000; // キュー配列の最大サイズ
int qu[MAX]; // キューを表す配列
int tail = 0, head = 0; // キューの要素区間を表す変数
// キューを初期化する
void init() {
head = tail = 0;
}
// キューが空かどうかを判定する
int isEmpty() {
return (head == tail);
}
// スタックが満杯かどうかを判定する
int isFull() {
return (head == (ta... | main.c:6:5: error: variably modified 'qu' at file scope
6 | int qu[MAX]; // キューを表す配列
| ^~
|
s007321519 | p03854 | C++ | #include <bits/stdc++.h>
#define arep(a,i,n) for(ll i=(a);i<(n);i++)
#define rep(i,n) for(ll i=0;i<(n);i++)
#define cinf(x,n) for(ll i=0;i<(n);i++)cin>>x[i];
#define coutf(x,n) for(ll i=0;i<(n);i++)cout<<x[i]<<endl;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
using namespace std;
int... | a.cc: In function 'int main()':
a.cc:19:28: error: 'substr' was not declared in this scope; did you mean 'strstr'?
19 | if(substr(s.length()-5,s.end())!="dream"){
| ^~~~~~
| strstr
a.cc:25:28: error: 'substr' was not declared i... |
s256149527 | p03854 | C++ | #include <bits/stdc++.h>
#define arep(a,i,n) for(ll i=(a);i<(n);i++)
#define rep(i,n) for(ll i=0;i<(n);i++)
#define cinf(x,n) for(ll i=0;i<(n);i++)cin>>x[i];
#define coutf(x,n) for(ll i=0;i<(n);i++)cout<<x[i]<<endl;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
using namespace std;
int... | a.cc: In function 'int main()':
a.cc:15:16: error: no match for 'operator!=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'long int')
15 | while(s!=NULL){
| ^
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-li... |
s257142579 | p03854 | C++ | #include<iostream>
using namespace std;
int main () {
string S;
cin >> S;
string T;
int i = S.length() - 1;
if (S[0] != 'd' or S[0] != 'e'){
cout << "NO\n";
} else {
while (S.length() > 0){
string arr5;
for (int j = 4; j >= 0; j --){
arr5 += S[i - j];
}
string arr6;
... | a.cc: In function 'int main()':
a.cc:26:11: error: no match for 'operator-=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'const char [6]')
26 | S -= "dream";
| ~~^~~~~~~~~~
a.cc:29:11: error: no match for 'operator-=' (operand types are 'std::string' {aka 'std:... |
s963735071 | p03854 | C++ | #include<iostream>
using namespace std;
int main () {
string S;
cin >> S;
string T;
int i = S.length() - 1;
if (S[0] != 'd' or S[0] != 'e'){
cout << "NO\n";
} else {
while (S.length() > 0){
int arr5[5];
for (int j = 4; j >= 0; j --){
arr5 += S[i - j];
}
int arr6[6];
... | a.cc: In function 'int main()':
a.cc:15:14: error: incompatible types in assignment of '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'int [5]'
15 | arr5 += S[i - j];
a.cc:19:14: error: incompatible types in assignment of '__gnu_cxx::__alloc_traits<std::allocator<char>, c... |
s915528497 | p03854 | C++ | #include<iostream>
using namespace std;
int main () {
string S;
cin >> S;
string T;
int i = S.length() - 1;
if (S[0] != 'd' or S[0] != 'e'){
cout << "NO\n";
} else {
while (S.length() > 0){
int arr5[5] = S[i - 4] + S[i - 3] + S[i - 2] + S[i - 1] + S[i];
int arr6[6] = S[i - 5] + S[i - 4]... | a.cc: In function 'int main()':
a.cc:13:63: error: array must be initialized with a brace-enclosed initializer
13 | int arr5[5] = S[i - 4] + S[i - 3] + S[i - 2] + S[i - 1] + S[i];
a.cc:14:74: error: array must be initialized with a brace-enclosed initializer
14 | int arr6[6] = S[i - 5] + S[i - 4] + S[... |
s845612577 | p03854 | C++ | #include<iostream>
using namespace std;
int main () {
string S;
cin >> S;
string T;
int i = S.length() - 1;
if (S[0] != 'd' or S[0] != 'e'){
cout << "NO\n";
} else {
while (S.length() > 0){
if (S[i - 4] + S[i - 3] + S[i - 2] + S[i - 1] + S[i] == "dream"){
S -= "dream";
i -= 5;... | a.cc: In function 'int main()':
a.cc:13:60: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
13 | if (S[i - 4] + S[i - 3] + S[i - 2] + S[i - 1] + S[i] == "dream"){
a.cc:14:11: error: no match for 'operator-=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} ... |
s699629327 | p03854 | C++ | あ | a.cc:1:1: error: '\U00003042' does not name a type
1 | あ
| ^~
|
s040900954 | p03854 | C++ | #include <iostream>
#include <string>
using namespace std;
string divide[4] = { "dream", "dreamer", "erase", "eraser" };
int main(void) {
string s;
cin >> s;
reverse(s.begin(), s.end());
for (int i = 0; i < 4; i++) {
reverse(divide[i].begin(), divide[i].end());
}
bool can = true;
for (auto i = 0; i != s.... | a.cc: In function 'int main()':
a.cc:12:9: error: 'reverse' was not declared in this scope
12 | reverse(s.begin(), s.end());
| ^~~~~~~
|
s026790702 | p03854 | C++ | #include <iostream>
#include <vector>
#include <string>
using namespace std;
int main() {
string a;
cin >> a;
vector<string> s{ "dream", "dreamer", "erase", "eraser" };
reverse(a.begin(), a.end());
for (int i = 0; i < 4; i++) {
reverse(s.at(i).begin(), s.at(i).end());
}
string b;
bool flag = false;
fo... | a.cc: In function 'int main()':
a.cc:14:9: error: 'reverse' was not declared in this scope
14 | reverse(a.begin(), a.end());
| ^~~~~~~
|
s543594069 | p03854 | C++ | #include <iostream>
#include <vector>
#include <string>
using namespace std;
int main() {
string a;
cin >> a;
vector<string> s{ "dream", "dreamer", "erase", "eraser" };
reverse(a.begin(), a.end());
for (int i = 0; i < 4; i++) {
reverse(s.at(i).begin(), s.at(i).end());
}
string b;
bool flag = false;
fo... | a.cc: In function 'int main()':
a.cc:14:9: error: 'reverse' was not declared in this scope
14 | reverse(a.begin(), a.end());
| ^~~~~~~
|
s437899426 | p03854 | C++ | #include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main(void){
string s;
cin >> s;
int start_point = 0, flag = 1;
// cout << s.length() << endl;
// cout << s.substr(start_point, 5) << endl;
while(1) {
if(s.length() == start_point){break;}
else if(s.... | a.cc:47:2: error: stray '\' in program
47 | }\
| ^
|
s219018803 | p03854 | C++ | #include <bits/stdc++.h>
using namespace std;
// dpを使った場合
// vectorではWAだったがCの配列なら行けた
int main() {
string s;
cin >> s;
string options[4] = {"dream", "dreamer", "erase", "eraser"};
bool dp[100010];
for (int i = 0; i < (int)s.size(); i++) {
for (string c : options) {
// sのi番目からc.size要素までがoption... | a.cc: In function 'int main()':
a.cc:18:47: error: request for member 'at' in 'dp', which is of non-class type 'bool [100010]'
18 | if (s.substr(i, (int)c.size()) == c) dp.at(i + (int)c.size()) = 1;
| ^~
a.cc:23:15: error: request for member 'at' in 'dp', whi... |
s293409179 | p03854 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
string divide[4] = {"dream","dreamer","erase","eraser"};
int main(){
string S;
cin >> S;
reverse(S.begin(),S.end());
for(int i = 0;i<4){
reverse(divide[i].begin(),divide[i].end());
}
bool can = true;
for(int i = 0;i <... | a.cc: In function 'int main()':
a.cc:13:20: error: expected ';' before ')' token
13 | for(int i = 0;i<4){
| ^
| ;
|
s206178041 | p03854 | C | e | main.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
1 | e
| ^
|
s786976783 | p03854 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
string divide[4]={"dream","dreamer","erase","eraser"};
int main(){
string s;
cin>>s;
reverse(s.begin(),s.end());
for(int i=0;i<4;i++) reverse(divide[i].begin(),divide[i].end());
bool can=true;
for(int i=0;i<s.size();){
can2=... | a.cc: In function 'int main()':
a.cc:14:5: error: 'can2' was not declared in this scope; did you mean 'can'?
14 | can2=false;
| ^~~~
| can
|
s537500079 | p03854 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using ll = long long;
using namespace std;
using P = pair<int,int>;
string divide[4] = {"dream", "dreamer", "erase", "eraser"};
int main(){
string S;
cin >> S;
reverse(S.begin(), S.end());
for(int = 0; i < 4; i++){
revers... | a.cc: In function 'int main()':
a.cc:15:13: error: expected unqualified-id before '=' token
15 | for(int = 0; i < 4; i++){
| ^
a.cc:15:12: error: expected ';' before '=' token
15 | for(int = 0; i < 4; i++){
| ^~
| ;
a.cc:15:13: error: expected primary-ex... |
s974551875 | p03854 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using ll = long long;
using namespace std;
using P = pair<int,int>;
string divide[4] = {"dream", "dreamer", "erase", "eraser"};
int main(){
string S;
cin >> S;
reverse(S.begin(), S.end());
for(int = 0; i < 4; i++){
revers... | a.cc: In function 'int main()':
a.cc:15:13: error: expected unqualified-id before '=' token
15 | for(int = 0; i < 4; i++){
| ^
a.cc:15:12: error: expected ';' before '=' token
15 | for(int = 0; i < 4; i++){
| ^~
| ;
a.cc:15:13: error: expected primary-ex... |
s010485026 | p03854 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using ll = long long;
using namespace std;
using P = pair<int,int>;
string divide[4] = {"dream", "dreamer", "erase", "eraser"};
int main(){
string S;
cin >> S;
reverse(S.begin(), S.end());
for(int 0; i < 4; i++){
reverse(... | a.cc: In function 'int main()':
a.cc:15:13: error: expected unqualified-id before numeric constant
15 | for(int 0; i < 4; i++){
| ^
a.cc:15:12: error: expected ';' before numeric constant
15 | for(int 0; i < 4; i++){
| ^~
| ;
a.cc:15:16: error: 'i' was n... |
s948173366 | p03854 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using ll = long long;
using namespace std;
using P = pair<int,int>;
string divide[4] = {"dream", "dreamer", "erase", "eraser"};
int main(){
string S;
cin >> S;
reverse(S.begin(), S.end());
for(int i = 0; i < S.size(); i++){
... | a.cc: In function 'int main()':
a.cc:24:13: error: 'can' was not declared in this scope; did you mean 'can2'?
24 | can = false;
| ^~~
| can2
a.cc:28:8: error: 'can' was not declared in this scope; did you mean 'tan'?
28 | if(can) cout << "YES" << endl;
| ... |
s037320599 | p03854 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using ll = long long;
using namespace std;
using P = pair<int,int>;
string divide[4] = {"dream", "dreamer", "erase", "eraser"};
int main(){
string S;
cin >> S;
reverse(S.begin(). S.end());
for(int i = 0; i < S.size(); i++){
... | a.cc: In function 'int main()':
a.cc:13:24: error: 'std::__cxx11::basic_string<char>::iterator' has no member named 'S'
13 | reverse(S.begin(). S.end());
| ^
a.cc:24:13: error: 'can' was not declared in this scope; did you mean 'can2'?
24 | can = false;
| ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.