submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s093605979 | p03937 | C++ | #include<bits/stdc++.h>
using namespace std;
int a[10][10],m,n,flag;
char kk[10];
void act(int x,int y){
if(x==m-1&&y==n-1){
for(int i=0;i<m;++i)for(int j=0;j<n;++j){
if(a[i][j])return;
}
flag=1;
return;
}
if(flag==1)return;
if(a[x+1][y]){
a[x+1][y]=0;... | a.cc: In function 'void act(int, int)':
a.cc:16:9: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
16 | dfs(x+1,y);
| ^~~
| ffs
a.cc:21:9: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
21 | dfs(x,y+1);
| ^~~
| ... |
s539719524 | p03937 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
#define fi first
#define se second
#define co(a) cout<<a<<endl
#define sz size()
#define bgn begin()
#define en end()
#define pb(a) pu... | a.cc: In function 'int main()':
a.cc:226:13: error: conflicting declaration 'std::vector<std::__cxx11::basic_string<char> > d'
226 | V<string> d(a);
| ^
a.cc:225:15: note: previous declaration as 'long long int d'
225 | int c=a+b-1,d=0;
| ^
a.cc:228:9: error: invalid types ... |
s643980640 | p03937 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<cstdio>
#include<cmath>
#include<numeric>
#include<queue>
#include<stack>
#include<cstring>
#include<limits>
#include<functional>
#include<unordered_set>
#define rep(i,a) for(int i=(int)0;i<(int)a;++i)
#define ... | a.cc: In function 'void solve()':
a.cc:48:21: error: 'cnt' was not declared in this scope; did you mean 'int'?
48 | if(c=='#')++cnt;
| ^~~
| int
a.cc:50:8: error: 'cnt' was not declared in this scope; did you mean 'int'?
50 | if(cnt==h*w-1)cout<<"Pos... |
s585986327 | p03937 | C++ | #include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
#include <string>
#include <math.h>
#include <stdio.h>
#include <iomanip>
#include <limits>
#include <list>
#include <queue>
#include <tuple>
#include <map>
#include <set>
#include <sstream>
using namespace std;
#define MOD (long long int)(1e... | a.cc: In function 'int main()':
a.cc:19:18: error: expected primary-expression before 'for'
19 | #define rep(i,n) for(int i=0; i<(int)(n); i++)
| ^~~
a.cc:54:44: note: in expansion of macro 'rep'
54 | vector<string> a(h); rep(i,h) cin>>a[i], rep(j,w) visited[i][j]=false;
| ... |
s659056428 | p03937 | C++ | #include <iostream>
#include <vector>
#include <cassert>
#include <algorithm>
#include <functional>
#include <queue>
using namespace std;
vector<vector<int>> vec;
int h,w;
int main(){
cin >> h >> w ;
vec.resize(h,vector<int>(w));
for(int i=0;i<h;i++){
string s;
cin >> s;
for(int j=0... | a.cc: In function 'int main()':
a.cc:50:31: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
50 | if(vec[h-1][w-1]=='#'||ref[h-1][w-1]!=h+w-2){
| ^
|
s762233768 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, j, n) for (ll i = j; i < n; i++)
#define all(x) (x).begin(),(x).end()
#define INF (1000000000)
#define MOD (1000000007)
#define MAX (100000)
#define pii pair<int, int>
/////////////////////////////////////////////////////////
class XY{... | a.cc: In function 'void Main()':
a.cc:71:7: error: redeclaration of 'int cnt'
71 | int cnt = 0;
| ^~~
a.cc:65:7: note: 'int cnt' previously declared here
65 | int cnt = 0;
| ^~~
|
s272405279 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, j, n) for (ll i = j; i < n; i++)
#define all(x) (x).begin(),(x).end()
#define INF (1000000000)
#define MOD (1000000007)
#define MAX (100000)
#define pii pair<int, int>
/////////////////////////////////////////////////////////
class XY{... | a.cc: In function 'void Main()':
a.cc:68:22: error: expected ';' before 'cnt'
68 | if(A[i][j] == '#' cnt++;)
| ^~~~
| ;
a.cc:68:29: error: expected primary-expression before ')' token
68 | if(A[i][j] == '#' cnt++;)
| ^... |
s998844697 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W,sharp=0;
cin >> H >> W;
vector<string> A(H);
for(int i=0;i<H;i++){
cin >> A[i];
}
for(int i=0;i<H-1;i++){
for(int j=0;j<W-1;j++){
if(A[i][j]=='#'){
sharp++;
}
... | a.cc:22:5: error: expected unqualified-id before 'if'
22 | if(sharp == H+W-1){
| ^~
a.cc:24:6: error: expected unqualified-id before 'else'
24 | }else{
| ^~~~
a.cc:27:1: error: expected declaration before '}' token
27 | }
| ^
|
s047251783 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
bool ok = true;
cin >> H >> W;
vector<string> A(H);
for(int i=0;i<H;i++){
cin >> A[i];
}
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
if(A[i][j]=='#' && j==w-1){
if((... | a.cc: In function 'int main()':
a.cc:17:35: error: 'w' was not declared in this scope
17 | if(A[i][j]=='#' && j==w-1){
| ^
|
s017916115 | p03937 | C++ | #include <iostream>
#include <string>
using namespace std;
int main() {
int H,W;cin>>H>>W;
int ans =0;
for(int i=0;i<H;++i){
string S;cin>>S;
for (aut c:S)if(c=='#') ++ans;
}
if (ans==H+W-1)cout<<"Possible"<<endl;
else cout<<"Impossible"<<endl;
}
| a.cc: In function 'int main()':
a.cc:10:10: error: 'aut' was not declared in this scope; did you mean 'auto'?
10 | for (aut c:S)if(c=='#') ++ans;
| ^~~
| auto
a.cc:11:3: error: expected primary-expression before '}' token
11 | }
| ^
a.cc:10:35: error: expected ';' befor... |
s251172376 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int h,w;
cin>>h>>w;
vector<vector<char>> a(h, vector<char>(w));
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin>>a.at(i).at(j);
}
}
int count=0;
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
if(a.at(i).at(j)=='#'){
cou... | a.cc: In function 'int main()':
a.cc:16:16: error: expected ';' before '}' token
16 | count++
| ^
| ;
17 | }
| ~
|
s587976542 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
const int N = 2e4 + 7;
int p[N], a[N], b[N];
int n;
int main() {
cin >> n;
for (int i = 1; i <= n; i++){
cin >> p[i];
}
for (int i = 1; i <= n; i++) {
a[I]
}
} | a.cc: In function 'int main()':
a.cc:14:4: error: 'I' was not declared in this scope
14 | a[I]
| ^
|
s698694973 | p03937 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int h,w,n=0;cin>>h>>w;
vector<vector<char>>a(h,vector<char>(w));
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin>>a.at(i).at(j);
if(a.at(i).at(j)=='#')n++;
}
}
if(n!=h+w-1)cout<<"Impossible"<<endl;
else{
vector<pair<int,int>>p(... | a.cc: In function 'int main()':
a.cc:33:12: error: 'coutt' was not declared in this scope
33 | if(t>0)coutt<<"Impossible"<<endl;
| ^~~~~
|
s694911235 | p03937 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int h,w,n=0;cin>>h>>w;
vector<vector<char>>a(h,vector<char>(w));
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin>>a.at(i).at(j);
if(a.at(i).at(j)=='#')n++;
}
}
if(n!=h+w-1)cout<<"Impossible"<<endl;
else{
vector<pair<int,int>>p(... | a.cc: In function 'int main()':
a.cc:19:23: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'std::pair<int, int>'} and 'int')
19 | p.at(s)=(j,i);
| ^
In file included from... |
s754909947 | p03937 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int h,w,n=0;cin>>h>>w;
vectot<vector<char>>a(h,vector<char>(w));
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin>>a.at(i).at(j);
if(a.at(i).at(j)=='#')n++;
}
}
if(n!=h+w-1)cout<<"Impossible"<<endl;
else{
vector<pair<int,int>>p(... | a.cc: In function 'int main()':
a.cc:5:3: error: 'vectot' was not declared in this scope
5 | vectot<vector<char>>a(h,vector<char>(w));
| ^~~~~~
a.cc:5:21: error: expected primary-expression before '>' token
5 | vectot<vector<char>>a(h,vector<char>(w));
| ^~
a.cc:5:23: error... |
s738774228 | p03937 | C++ | #ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#includ... | a.cc: In function 'int main()':
a.cc:178:29: error: expected ';' before 'nowh'
178 | A[nowh+1][noww] == '.'
| ^
| ;
179 | nowh++;
| ~~~~
a.cc:183:31: error: expected ';' before 'noww'
183 | A[nowh]... |
s053245144 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod = (int)1e9 + 7;
const int INF = (int)100100100;
int main() {
//ll N; cin >> N;
//ll N,M; cin >> N >> M;
//string S; cin >> S;
ll H,W; cin >> H >> W;
ll sum=0
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
... | a.cc: In function 'int main()':
a.cc:13:5: error: expected ',' or ';' before 'for'
13 | for(int i=0;i<H;i++){
| ^~~
a.cc:13:17: error: 'i' was not declared in this scope
13 | for(int i=0;i<H;i++){
| ^
|
s851649488 | p03937 | C++ | for(*) | a.cc:1:3: error: expected unqualified-id before 'for'
1 | for(*)
| ^~~
|
s263879579 | p03937 | C++ | #include <iostream>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <iomanip>
using namespace std;
long long int gcd(long long int x, long long int y){
return y!=0 ? gcd(y, x%y) : x;
}
long long int lcm(long long int x, long long int y){
return x*y/gcd(x, y);
}
long long int factorial(long long in... | a.cc: In function 'int main()':
a.cc:19:3: error: 'a' was not declared in this scope
19 | a[h][w];
| ^
|
s812724639 | p03937 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
long long c=a%i_7;
if(c>=0)return c;
return c+i_7;
}
using namespace st... | a.cc: In function 'int main()':
a.cc:102:19: error: wrong number of template arguments (1, should be at least 2)
102 | map<pair<int,int>> path;
| ^~
In file included from /usr/include/c++/14/map:63,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
... |
s838965135 | p03937 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
long long c=a%i_7;
if(c>=0)return c;
return c+i_7;
}
using namespace st... | a.cc: In function 'int main()':
a.cc:114:25: error: could not convert 'path.std::set<std::pair<int, int> >::find(std::make_pair<int&, int&>(nx, ny))' from 'std::set<std::pair<int, int> >::iterator' {aka 'std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int> >, std::less<std::pair<in... |
s181393352 | p03937 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
long long c=a%i_7;
if(c>=0)return c;
return c+i_7;
}
using namespace st... | a.cc: In function 'int main()':
a.cc:114:16: error: 's' was not declared in this scope
114 | if(s.find(make_pair(nx,ny))){
| ^
a.cc:137:10: error: expected unqualified-id before '.' token
137 | set.insert(make_pair(x+1,y));
| ^
a.cc:140:10: error: expected unqua... |
s636804186 | p03937 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
long long c=a%i_7;
if(c>=0)return c;
return c+i_7;
}
using namespace st... | a.cc: In function 'int main()':
a.cc:112:2: error: expected '}' at end of input
112 | }
| ^
a.cc:106:23: note: to match this '{'
106 | if(nx<h && ny<w){
| ^
a.cc:112:2: error: expected '}' at end of input
112 | }
| ^
a.cc:103:13: note: to match this '{'
103 | ... |
s286316561 | p03937 | Java | import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main3 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
List<String> input = new ArrayList<String>();
while (in.hasNextLine()) {
input.add(in.nextLine());
... | Main.java:5: error: class Main3 is public, should be declared in a file named Main3.java
public class Main3 {
^
1 error
|
s412378822 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
const long long mod = pow(10, 9) + 7;
const long long MOD = 998244353;
const long long INF = 1LL << 60;
const int inf = pow(10, 9) + 7;
template <class T> bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
template <class T> bool chmax(T& a, T b) {if (a ... | a.cc: In function 'int main()':
a.cc:39:23: error: 'N' was not declared in this scope
39 | for (int i = 1; i < N; i++)
| ^
|
s849973422 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
const long long mod = pow(10, 9) + 7;
const long long MOD = 998244353;
const long long INF = 1LL << 60;
const int inf = pow(10, 9) + 7;
template <class T> bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
template <class T> bool chmax(T& a, T b) {if (a ... | a.cc: In function 'int main()':
a.cc:39:3: error: expected ',' or ';' before 'for'
39 | for (int i = 1; i < N; i++)
| ^~~
a.cc:39:19: error: 'i' was not declared in this scope
39 | for (int i = 1; i < N; i++)
| ^
a.cc:39:23: error: 'N' was not declared in this scope
39 | f... |
s561476729 | p03937 | C | include<stdio.h>
#include<stdlib.h>
#include<stdint.h>
#include<inttypes.h>
typedef int32_t i32;
typedef int64_t i64;
#define MIN(a,b) ((a) < (b) ? (a) : (b))
void run (void) {
i32 n, e, t;
scanf ("%" SCNi32 "%" SCNi32 "%" SCNi32, &n, &e, &t);
i32 *x = (i32 *) calloc (n + 2, sizeof (i32));
for (i32 i = 1; i ... | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
In file included from main.c:2:
/usr/include/stdlib.h:98:8: error: unknown type name 'size_t'
98 | extern size_t __ctype_get_mb_cur_max (void) __THROW __wur;
| ^~~~~~
/usr/inclu... |
s562490057 | p03937 | 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[i];
}
int c = 0;
for(int i = 0; i < h; i++) {
for(int j = 0; j < w; j++) {
if(s[i][j] == '#') c++;
}
}
if(c == h + w - 1) cout << "Possible... | a.cc:1:10: fatal error: <bits/stdc++.h: No such file or directory
1 | #include <<bits/stdc++.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s221066743 | p03937 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int h, w;
cin >> h >> w;
vector<vector<char>>a(h+2, vector<int>(w+2, '.'));
for(int i=1; i<=h; i++)for(int j=1; j<=w; j++)cin >> a[i][j];
int x=1, y=1;
for(int i=0; i<2n; i++){#include <iostream>
#include <vector>
using namespace std;
... | a.cc:11:27: error: stray '#' in program
11 | for(int i=0; i<2n; i++){#include <iostream>
| ^
a.cc: In function 'int main()':
a.cc:8:51: error: no matching function for call to 'std::vector<std::vector<char> >::vector(int, std::vector<int>)'
8 | vector<vector<char>>a(h+2, vecto... |
s627006070 | p03937 | C++ | #include<bits/stdc++.h>
using namespace std;
int a[10][10],m,n,flag;
char kk[10];
void dfs(int x,int y){
if(x==m-1&&y==n-1){
for(int i=0;i<m;++i)for(int j=0;j<n;++j)if(a[i][j])return;
flag = 1;
return;
}
if(flag==1)return;
if(a[x+1][y]){
a[x+1][y]=0;
dfs(x+1,y);
a[x+1][... | a.cc: In function 'int main()':
a.cc:27:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
27 | gets(kk);
| ^~~~
| getw
|
s578568481 | p03937 | C++ | #include<bits/stdc++.h>
using namespace std;
int a[10][10],m,n,flag;
char kk[10];
void dfs(int x,int y){
if(x==m-1&&y==n-1){
for(int i=0;i<m;++i)for(int j=0;j<n;++j)if(a[i][j])return;
flag = 1;
return;
}
if(flag==1)return;
if(a[x+1][y]){
a[x+1][y]=0;
dfs(x+1,y);
a[x+1][... | a.cc: In function 'int main()':
a.cc:27:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
27 | gets(kk);
| ^~~~
| getw
|
s587213804 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
int a[10][10],m,n,flag;
char kk[10];
void dfs(int x,int y){
if(x == m-1 && y == n-1){
for(int i = 0;i < m;++i)
for(int j = 0;j < n;++j){
if(a[i][j]) return;
}
flag = 1;
return;
}
if(flag == 1) return;
if(a[x+1]... | a.cc: In function 'int main()':
a.cc:30:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
30 | gets(kk);
| ^~~~
| getw
|
s929294719 | p03937 | C++ | #include <bits/stdc++.h>
#define ALL(v) v.begin(), v.end()
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;
int main() {
int h,w; cin>>h>>w;
char masu[h][w];
rep(i, h){
rep(j, w){
cin>>masu[i][j];
}
}
bool imp=false;
rep(i, h){
rep(j, w){
... | a.cc: In function 'int main()':
a.cc:20:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
20 | if(masu[i+1][j]=="."&&masu[i][j+1]=="."){
| ~~~~~~~~~~~~^~~~~
a.cc:20:45: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
20 | ... |
s322390730 | p03937 | C++ | #include <bits/stdc++.h>
#define ALL(v) v.begin(), v.end()
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;
int main() {
int h,w cin>>h>>w;
char masu[h][w];
rep(i, h){
rep(j, w){
cin>>masu[i][j];
}
}
bool imp=false;
rep(i, h){
rep(j, w){
... | a.cc: In function 'int main()':
a.cc:8:11: error: expected initializer before 'cin'
8 | int h,w cin>>h>>w;
| ^~~
a.cc:9:16: error: 'w' was not declared in this scope
9 | char masu[h][w];
| ^
a.cc:12:12: error: 'masu' was not declared in this scope
12 | cin>>masu... |
s465043419 | p03937 | C++ | #include <bits/stdc++.h>
#define ALL(v) v.begin(), v.end()
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;
int main() {
int h,w cin>>h>>w;
char masu[h][w];
rep(i, h){
rep(j, w){
cin>>masu[i][j]
}
}
bool imp=false;
rep(i, h){
rep(j, w){
... | a.cc: In function 'int main()':
a.cc:8:11: error: expected initializer before 'cin'
8 | int h,w cin>>h>>w;
| ^~~
a.cc:9:16: error: 'w' was not declared in this scope
9 | char masu[h][w];
| ^
a.cc:12:12: error: 'masu' was not declared in this scope
12 | cin>>masu... |
s944590825 | p03937 | C++ | #include<iostream>
using namespace std;
int main(){
int cnt=0,c,h,w; cin>>h>>w;
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin>>c;
if(c=='#')cnt++;
}
}
cout<<(cnt=h+w-1 ? "Possible" : "Impossible")<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:20: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
12 | cout<<(cnt=h+w-1 ? "Possible" : "Impossible")<<endl;
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| const char*
|
s038442445 | p03937 | C++ | #include<iostream>
using namespace std;
int main(){
int cnt=0,h,w; cin>>h>>w;
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin>>c;
if(c=='#')cnt++;
}
}
cout<<(h+w-1=cnt ? "Possible" : "Impossible")<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:12: error: 'c' was not declared in this scope
8 | cin>>c;
| ^
a.cc:12:13: error: lvalue required as left operand of assignment
12 | cout<<(h+w-1=cnt ? "Possible" : "Impossible")<<endl;
| ~~~^~
|
s392732196 | p03937 | C++ | #include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define MEMSET(v, h) memset((v), h, sizeof(v))... | a.cc: In function 'int main()':
a.cc:29:15: error: expected unqualified-id before '[' token
29 | if(map[i][j] = '#') count++;
| ^
|
s281289267 | p03937 | C++ | #include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define MEMSET(v, h) memset((v), h, sizeof(v))... | a.cc: In function 'int main()':
a.cc:29:15: error: expected unqualified-id before '[' token
29 | if(map[i][j] = '#') count++;
| ^
|
s631081286 | p03937 | C++ | #include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define MEMSET(v, h) memset((v), h, sizeof(v))... | a.cc: In function 'int main()':
a.cc:25:54: error: expected ')' before ';' token
25 | vector<vector<char>> map(h, (vector<char>(w));
| ~ ^
| )
|
s691339692 | p03937 | C++ | #include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define MEMSET(v, h) memset((v), h, sizeof(v))... | a.cc: In function 'int main()':
a.cc:25:58: error: expected ')' before ';' token
25 | vector<vector<string>> map(h, (vector<string>(w));
| ~ ^
| )
a.cc:33:22: error: could not convert '... |
s060081349 | p03937 | C++ | #include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define MEMSET(v, h) memset((v), h, sizeof(v))... | a.cc: In function 'int main()':
a.cc:25:58: error: expected ')' before ';' token
25 | vector<vector<string>> map(h, (vector<string>(w));
| ~ ^
| )
a.cc:33:22: error: could not convert '... |
s852297062 | p03937 | C++ | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <unordered_map>
#include <utility>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
using namespace std;
#de... | a.cc:42:14: error: size of array 'grid' is not an integral constant-expression
42 | char grid[w][h];
| ^
a.cc:42:11: error: size of array 'grid' is not an integral constant-expression
42 | char grid[w][h];
| ^
a.cc: In function 'int main()':
a.cc:53:24: error: 'j' was not declar... |
s823047477 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w;
cin>>h>>w;
char a;
int ans=0:;
for(int i=0;i<h;i++)
for(int j=0;j<w;j++){
cin>>a;
if(a=='#')
ans++;
}
if(ans==h+w-1)
cout<<"Possible";
else cout<<"Impossible";
} | a.cc: In function 'int main()':
a.cc:8:12: error: expected ',' or ';' before ':' token
8 | int ans=0:;
| ^
|
s458309381 | p03937 | C++ | #include <stdio.h>
using namespace std;
int main(){
int H,W;
cin >> H >> W;
char a[H][W];
int ans=0;
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
cin >> a[i][j];
if(a[i][j]=='#')ans++;
}
}
if(ans==H+W-1)cout << "Possible" << endl;
else cout << "Impossible" << endl;
}
| a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
5 | cin >> H >> W;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include <stdio.h>
+++ |+#include <iostream>
2 | using namespa... |
s750872197 | p03937 | C++ | #include <iostream>
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
#include <string>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <cmath>
#include <climits>
#include <bitset>
#include <array>
#include <deque>
#include <queue>
#include <map>
#i... | a.cc: In function 'int main()':
a.cc:29:15: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int&)'
29 | string A(H);
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bits/locale_classes.h:40,
... |
s614504799 | p03937 | C++ | #include <cstring>
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <cmath>
#include <queue>
#include <set>
#include <stack>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++... | In file included from /usr/include/c++/14/algorithm:60,
from a.cc:3:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'typename __gnu_cxx::__enable_if<std::__is_scalar<_Tp>::__value, void>::__type std::__fill_a1(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = bool (... |
s971260142 | p03937 | C++ | #include<cstdio>
using namespace std;
int main(){
int h,w,g[8][8]={},l=0,flag=1;
char s[8][10];
scanf("%d %d",&h,&w);
for(int i=0;i<h;i++)
scanf("%s",s[i]);
g[0][0]=1;
for(int i=0;i<h;i++)
for(;l<w;l++){
if(j!=w-1&&g[i][j]&&s[i][j+1]=='#'){
g[i][j+1]=1;
}
else if(i!=h-1&&g[... | a.cc: In function 'int main()':
a.cc:12:10: error: 'j' was not declared in this scope
12 | if(j!=w-1&&g[i][j]&&s[i][j+1]=='#'){
| ^
|
s230466224 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
int main() {
int h, w;
cin >> h >> w;
int sharp = 0;
for(int i = 0; i < n; i++){
char t;
cin >> t;
if(t=='#'){sharp++;}
}
if(sharp == h+w-1){
c... | a.cc: In function 'int main()':
a.cc:11:24: error: 'n' was not declared in this scope
11 | for(int i = 0; i < n; i++){
| ^
|
s870059226 | p03937 | C++ | #include "bits/stdc++.h"
#define rep(i,a,n) for(int i = (a);i <(n);i++)
using namespace std;
int main(){
int n,m,x=0,y=0;
char cell[10][10];
cin >> n >> m;
rep(i,0,10){
rep(j,0,10){
cell[i][j] = 'X';
}
}
rep(i,0,n){
rep(j,0,m){
cin >> cell[i][j];
}
}
while(1){
i... | a.cc: In function 'int main()':
a.cc:24:23: error: expected ';' before 'x'
24 | cell[x][y] = '.'
| ^
| ;
25 | x++;
| ~
a.cc:28:23: error: expected ';' before 'y'
28 | cell[x][y] = '.'
| ... |
s088517361 | p03937 | C++ | #include "bits/stdc++.h"
#define rep(i,a,n) for(int i = (a);i <(n);i++)
using namespace std;
int main(){
int n,m,x=0,y=0;
char cell cell[10][10];
cin >> n >> m;
rep(i,0,10){
rep(j,0,10){
cell[i][j] = 'X';
}
}
rep(i,0,n){
rep(j,0,m){
cin >> cell[i][j];
}
}
while(1){
... | a.cc:7:8: error: extended character is not valid in an identifier
7 | char cell cell[10][10];
| ^
a.cc: In function 'int main()':
a.cc:12:7: error: 'cell' was not declared in this scope; did you mean 'ceill'?
12 | cell[i][j] = 'X';
| ^~~~
| ceill
a.cc:18:14: error: ... |
s101458333 | p03937 | C++ | #include "bits/stdc++.h"
using namespace std;
int main(){
int n,m,x=0,y=0;
char cell cell[10][10];
cin >> n >> m;
rep(i,0,10){
rep(j,0,10){
cell[i][j] = 'X';
}
}
rep(i,0,n){
rep(j,0,m){
cin >> cell[i][j];
}
}
while(1){
if(cell[x+1][y] == '#'){
x++;
}
... | a.cc:6:8: error: extended character is not valid in an identifier
6 | char cell cell[10][10];
| ^
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
9 | rep(i,0,10){
| ^
a.cc:9:3: error: 'rep' was not declared in this scope
9 | rep(i,0,10){
... |
s802796820 | p03937 | Java | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int H = sc.nextInt();
int W = sc.nextInt();
String[] dic = new String[H];
for(int i=0;i<H;i++) dic[i]=sc.next();
int end = -1;
for(int i=0;i<H;i++){
... | Main.java:19: error: ';' expected
whlie(dic[i].charAt(end)=='.') end++;
^
1 error
|
s703316571 | p03937 | C++ | use std::io::*;
use std::str::FromStr;
fn main() {
let h: usize = read();
let w: usize = read();
let mut a: Vec<Vec<char>> = (0..h).map(|_| read::<String>().chars().collect()).collect();
let mut x = 0;
let mut y = 0;
let mut check = true;
while x != w - 1 || y != h - 1 {
let po1 = ... | a.cc:7:34: error: too many decimal points in number
7 | let mut a: Vec<Vec<char>> = (0..h).map(|_| read::<String>().chars().collect()).collect();
| ^~~~
a.cc:1:1: error: 'use' does not name a type
1 | use std::io::*;
| ^~~
a.cc:2:1: error: 'use' does not name a t... |
s877013187 | p03937 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ll n, e, t; cin>>n>>e>>t;
if(n > 2004) return;
ll a[n];
for(int i = 0; i < n; i++) cin>>a[i];
ll dp[n+1]; dp[n] = 0;
for(int i = n-1; i >= 0; i--){
dp[i] = dp[i+1] + t;
for(int j = i+1; j < n; j++){
dp[i] = min(dp[i], dp[j+1] +... | a.cc: In function 'int main()':
a.cc:7:22: error: return-statement with no value, in function returning 'int' [-fpermissive]
7 | if(n > 2004) return;
| ^~~~~~
|
s195026905 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
const int N = 8;
int n, m;
char a[N][N];
int main(){
scanf("%d%d", &n, &m);
for(int i = 0; i < n; i++) scanf("%s", a[i]);
for(int x = 0, y = 0; x < n && y < m; ){
a[x][y] = '.';
if(x < n - 1 && a[x + 1][y] == '#') x++;
else y++;
}
... | a.cc: In function 'int main()':
a.cc:17:64: error: 'x' was not declared in this scope
17 | for(int i = 0; i < n; i++) for(int j = 0; j < m; j++) if(a[x][y] == '#'){
| ^
a.cc:17:67: error: 'y' was not declared in this scope
17 | for(int i... |
s565136978 | p03937 | C++ | #include <bits/stdc++.h>
typedef long long LL;
using namespace std;
#define N 1000010
#define M 1048576
#define inf 1<<30
int n,pre[1000010][26],pp[26][1000010],len[26],ff[N],cnt,key[N];
char s[1000010],t[1000010];
int f[N];
int upp(int r,int aa,int val)
{
int mid,l=1;
while(l<r-1)
{
mid=(l+r)>>1;
if(pp[aa][mid]... | a.cc: In function 'int main()':
a.cc:29:35: error: 'i' was not declared in this scope; did you mean 'ii'?
29 | for(ii=1;ii<=n;ii++) if(s[i]!=t[i]) break;
| ^
| ii
a.cc:6:14: warning: overflow in conversion from 'int' to 'char' ch... |
s773689442 | p03937 | C++ | chad (柳志轩)'s submissions for problem G
RunID Status Memory Time Language Length Submit Time
14330670
Submit Failed
C++14 (GCC 5.3.0)
1085 2:59:40
#14330670 | chad's solution for [AtCoder-2171] [Problem G]
Status
Submit Failed
Length
1085
Lang
C++14 (GCC 5.3.0)
Submitted
2018-06-24 11:29:40
Shared
Se... | a.cc:1:14: warning: missing terminating ' character
1 | chad (柳志轩)'s submissions for problem G
| ^
a.cc:1:14: error: missing terminating ' character
1 | chad (柳志轩)'s submissions for problem G
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:6:12: error: too many decimal points in number... |
s503911612 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,sum=0;
cin>>a>>b;
char k[112345];
for(int i=0;i<a;i++){
for(int m=0;m<b;m++){
cin>>k[i][m];
if(k[i][m]=='#') sum++;
}
}
if(sum==a+b-1) cout<<"Possible"<<endl;
else cout<<"Impossible"<<endl;
} | a.cc: In function 'int main()':
a.cc:9:16: error: invalid types 'char[int]' for array subscript
9 | cin>>k[i][m];
| ^
a.cc:10:14: error: invalid types 'char[int]' for array subscript
10 | if(k[i][m]=='#') sum++;
| ^
|
s081463485 | p03937 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <stdio.h>
using namespace std;
using ll =long long;
int main (void) {
int H,W;
cin >> H >>W;
int A[H][W];
for (int i=0; i<H; i++) {
for (int j=0... | a.cc: In function 'int main()':
a.cc:26:33: error: expected ';' before ':' token
26 | cout << "Impossible":
| ^
| ;
a.cc:33:33: error: expected ';' before ':' token
33 | cout << "Impossible":
| ... |
s725382290 | p03937 | C++ | 豆腐干岁的法国 | a.cc:1:1: error: '\U00008c46\U00008150\U00005e72\U00005c81\U00007684\U00006cd5\U000056fd' does not name a type
1 | 豆腐干岁的法国
| ^~~~~~~~~~~~~~
|
s861049661 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int w,h,sx,sy,sum;
int dir[2][2] = {{1,0},{0,1}};
char Map[25][25];
int flag=0;
struct node
{
int x,y;
};
void BFS()
{
queue<node> q;
node n,p;
n.x = sx;
n.y = sy;
q.push(n);
while(!q.empty())
{
n = q.front();
... | a.cc: In function 'void BFS()':
a.cc:29:22: error: lvalue required as left operand of assignment
29 | if(tx+ty=h-1+w-1)
| ~~^~~
|
s366146836 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int w,h,sx,sy,sum;
char a[25][25];
int d[25][25];
int main()
{
memset(d,0,sizeof(d));
int i,j;
cin>>h>>w;
for(i = 1; i <= h; i++)
for(j = 1; j <=w; j++)
cin >> a[i][j];
for(i=1; i<h; i++)
for(j=1; j<w; j++... | a.cc: In function 'int main()':
a.cc:39:19: error: lvalue required as left operand of assignment
39 | if(i=h&&j=w)
| ~^~~
|
s131620712 | p03937 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long h,w,cnt=0;
char c;
cin >> h >> w;
for (int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin >> c;
if(c=='#'){
cnt++;
}
}
}
if(cnt==h+w-1){
cout << "Possible" << endl;
}else{
cout << "Impossible" << endl;
... | a.cc: In function 'int main()':
a.cc:19:4: error: expected '}' at end of input
19 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s395602244 | p03937 | C++ | #include<cstdio>
#include<algorithm>
using namespace std;
int R, C;
char G[15][15];
bool check[15][15];
int main(){
scanf("%d %d", &R, &C);
memset(check, true, sizeof(check));
for(int i=0;i<R;i++){
scanf("%s", G[i]);
for(int j=0;j<C;j++){
if (G[i][j] == '#'){
check[i][j] = false;
}
}
}
bool chan... | a.cc: In function 'int main()':
a.cc:12:9: error: 'memset' was not declared in this scope
12 | memset(check, true, sizeof(check));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<algorithm>
+++ |+#inc... |
s524701627 | p03937 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
#define yesno(flg) if(flg){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}
#define MAX_N 10
using namespace std;
typedef long long ll;
typedef pair<int,int> P1;
typedef pair<P1,P1> P2;
const ll INF=100000000000000001;
int dp[MAX_N][MAX_N]={};
bool d[MAX_N]={};
s... | a.cc: In function 'int main()':
a.cc:52:18: error: 'k' was not declared in this scope
52 | cout<<dp[k]<<endl;
| ^
|
s896889380 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
char a[11][11];
int main () {
int n, m;
cin >> n >> m;
for (int i = 1;i <= n;i ++) {
for (int j = 1;j <= m;j ++) {
cin >> a[i][j];
if (a[i][j] != '#' || (i == 1 && j == 1)) continue;
if (a[i - 1][j] == '#' && a[i][j - 1] == '#') {
cout << "Impossible";
... | a.cc: In function 'int main()':
a.cc:24:49: error: expected ';' before 'else'
24 | if (a[n][m] != '#') cout << "Impossible"
| ^
| ;
25 | else cout << "Possible";
| ~~~~ ... |
s077152569 | p03937 | C++ | #include <iostream>
#include <cstring>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <map>
#include <set>
#include <cmath>
#include <vector>
#include <ctime>
#include <Queue>
#include <sstream>
#include <utility>
#include <bitset>
#include <stack>
using namespace std;
#define MP... | a.cc:12:10: fatal error: Queue: No such file or directory
12 | #include <Queue>
| ^~~~~~~
compilation terminated.
|
s165264697 | p03937 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
typedef long long ll;
const int N=140010;
int val[N];
int son[N][2];
ll dis[N];
void calcdis(int u,ll Dis)
{
dis[u]=Dis;
int s1=son[u][0],s2=son[u][1];
if(!s1) return;
calcdis(s1,Dis+ll(val[s1]));calcdis(s2,Dis+ll(val[s2])... | a.cc:24:12: error: template argument 1 is invalid
24 | vector<data>q[N];
| ^
a.cc:24:12: error: template argument 2 is invalid
a.cc:25:37: error: reference to 'data' is ambiguous
25 | int work(int u,int mx,int s1,int s2,data que[])
| ^~~~
In file included... |
s736378208 | p03937 | C++ | #include<bits/stdc++.h>
using namespace std;
int h, w, cnt;
string s[8];
int main() {
cin >> h >> w;
for(int i = 0; i < h; i++) cin >> s[i];
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
if (s[i][j] == '#') cnt++;
}
}
if (cnt == (h + w - 1)) cout << "Pos... | a.cc:18:18: warning: missing terminating " character
18 | else cout << "Impossible” << endl;
| ^
a.cc:18:18: error: missing terminating " character
18 | else cout << "Impossible” << endl;
| ^~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:20:5: error... |
s010804782 | p03937 | C++ | #include<bits/stdc++.h>
using namespace std;
int h, w, cnt;
string s[8];
int main() {
cin >> h >> w;
for(int i = 0; i < h; i++) cin >> s[i];
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
if (s[i][j] == '#') cnt++;
}
}
if (cnt == (h + w - 1)) cout << ”Pos... | a.cc:17:37: error: extended character ” is not valid in an identifier
17 | if (cnt == (h + w - 1)) cout << ”Possible” << endl;
| ^
a.cc:17:37: error: extended character ” is not valid in an identifier
a.cc:18:18: error: extended character ” is not valid in an identifier
... |
s991819372 | p03937 | C++ | #include <stdio.h>
int main(){
int h, w, i, ct=0;
char c;
scanf("%d%d\n",&h,&w);
for( i=0; i<h; i++ ){
for( j=0; j<w; j++ ){
scanf("%c",c);
if( c=='#' ) ct++;
}
gatchar();
}
if( ct == w+h+1 ) printf("Possible\n");
else printf("Impossible\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:8:22: error: 'j' was not declared in this scope
8 | for( j=0; j<w; j++ ){
| ^
a.cc:12:17: error: 'gatchar' was not declared in this scope; did you mean 'getchar'?
12 | gatchar();
| ^~~~~~~
... |
s378725551 | p03937 | C++ | h, w = map(int, input().split())
a = [input() for i in range(h)]
dx = [1, 0, -1, 0]
dy = [0, -1, 0, 1]
def check(y, x):
for i in range(4):
cnt = 0
ny = y + dy[i]
nx = x + dx[i]
if (ny < 0) or (ny >= h) or (nx < 0) or (nx >= w):
continue
if a[ny][nx] == '#':
... | a.cc:1:1: error: 'h' does not name a type
1 | h, w = map(int, input().split())
| ^
a.cc:18:5: error: expected unqualified-id before 'else'
18 | else:
| ^~~~
a.cc:21:1: error: 'def' does not name a type
21 | def dfs(y, x):
| ^~~
|
s956639911 | p03937 | C++ | #include <iostream>
#include <vector>
#include <set>
#include <queue>
#include <algorithm>
#include <string>
#include <cmath>
using namespace std;
#define MAX 100
int is[MAX];
int h, w;
string s[8];
bool judge() {
int start = 0;
for (int row = 0; row < h;... | a.cc: In function 'bool judge()':
a.cc:16:21: error: 'searchRowEnd' was not declared in this scope
16 | start = searchRowEnd(start, row);
| ^~~~~~~~~~~~
|
s168407402 | p03937 | C++ | int main() {
vector<string> s(8);
int h, w, cnt=0;
cin >> h >> w;
rep(i, h)
cin >> s[i];
rep(i, h)
rep(j, w)
if (s[i][j] == '#')
cnt++;
h+w - 1 == cnt ? cout << "Possible" << endl : cout << "Impossible" << endl;
} | a.cc: In function 'int main()':
a.cc:2:9: error: 'vector' was not declared in this scope
2 | vector<string> s(8);
| ^~~~~~
a.cc:2:16: error: 'string' was not declared in this scope
2 | vector<string> s(8);
| ^~~~~~
a.cc:2:24: error: 's' was not declared in this... |
s780276101 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int H,W; cin >> H >> W;
int cnt=0;
for (int i=0; i<H; ++i) {
string s;
cin >> s;
for(auto c : s) {
if( c == '#' ) w++;
}
}
if( cnt == H+W-1 )
cout << "Possible" << endl;
else
cout << "Impossible" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:28: error: 'w' was not declared in this scope
14 | if( c == '#' ) w++;
| ^
|
s549898379 | p03937 | C++ | #include<cstdio>
using namespace std;
int d[10][10];
char ma[10][10];
int main(){
//freopen("a.in","r", stdin);
//freopen("a.out", "w", stdout);
int n, m, i, j;
scanf("%d%d", &n, &m);
gets(ma[0]);
for(i=1; i<=n; i++)
gets(ma[i]);
for(i=n; i>=1; i--)
for(j=1; j<=m; j++){
... | a.cc: In function 'int main()':
a.cc:10:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | gets(ma[0]);
| ^~~~
| getw
|
s121175414 | p03937 | C++ | test-code
| a.cc:1:1: error: 'test' does not name a type
1 | test-code
| ^~~~
|
s073028032 | p03937 | C++ | test-code
| a.cc:1:1: error: 'test' does not name a type
1 | test-code
| ^~~~
|
s213280260 | p03937 | C++ | #include <iostream>
#include <string>
using namespace std;
const int NMAX = 8 + 5;
int n, m;
string mat[NMAX];
bool works(int lin, int col) {
if (mat[lin][col] != '#')
return false;
if (lin == n && col == m)
return true;
if (mat[lin + 1][col] == '#')
return works(lin + 1, col);
... | a.cc: In function 'int main()':
a.cc:34:23: error: 'str' was not declared in this scope; did you mean 'std'?
34 | for (auto it: str[i])
| ^~~
| std
a.cc: In function 'bool works(int, int)':
a.cc:21:1: warning: control reaches end of non-void function [-... |
s420545623 | p03937 | C++ | #include <iostream>
int main(){
int H,W,c=0;
char a;
std::cin>>H>>W;
while(cin>>a)c+=a=='#';
std::cout<<(c==H+W-1?"P":"Imp")<<"ossible\n";
}
| a.cc: In function 'int main()':
a.cc:6:15: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | while(cin>>a)c+=a=='#';
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | ext... |
s950980929 | p03937 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <vector>
#include <list>
#include <bitset>
#include <iostream>
#include <set>
#include <map>
#include <string>
#include <sstream>
#include <climits>
#include <cmath>
#include <stack>
#include <queue>
#include <cfloat>
#include <initi... | a.cc: In function 'int main(int, char**)':
a.cc:37:15: error: 'grid' was not declared in this scope
37 | if (grid[i][j] == '#') ++sum;
| ^~~~
|
s956908534 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
#define INF 1000000009
#define INP "input.txt"
#define OUT "output.txt"
int n, m;
char arr[10][10];
bool solution() {
int cnt = 0;
for(int i = 0; i < n; i++)
for(int j = 0; j < n; j++) {
if(arr[i][j] == '#') cnt++;
}
if(cnt != n + m - 1) return false;
int ... | a.cc: In function 'int main()':
a.cc:38:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
38 | gets(arr[i]);
| ^~~~
| getw
|
s687016544 | p03937 | C++ | #include<stdio.h>
#include<string.h>
#include<algorithm>
#include<vector>
using namespace std;
int x[1000005];
long long int dp[1000005];
long long int dp2[1000005];
int main(){
int n,e,t;
scanf("%d %d %d",&n,&e,&t);
for(int i=0;i<n;i++)
dp[i]=1e18;
dp[0]=t;
scanf("%d",&x[0]);
for(int i=1;i<n;i++)
scanf("%d",&x... | a.cc: In function 'int main()':
a.cc:21:19: error: 'i' was not declared in this scope
21 | dp2[0]=dp[i]-x[i+1]*2;;
| ^
|
s489790105 | p03937 | C++ | #include<bits/stdc++.h>
using namespace std;
char masu[12][12];
int n,m,ans,x,y;
bool flag=false,s1=false,s2=false;;
queue <pair <int,int> > pp;
int main(){
cin >> n >> m;
for(int i=1;i<=n;i++){
for(int j=1;j<=m;j++){
cin >> masu[j][i];
}
}
for(int i=1;i<=n;i++){
fo... | a.cc: In function 'int main()':
a.cc:20:18: error: 'j' was not declared in this scope
20 | if(i==m&&j==n)flag=true;
| ^
|
s520842174 | p03937 | C++ | #include<iostream>
using namespace std;
char data1[10][10];
int main()
{
int h, w;
cin >> h >> w;
for (int i = 1; i <= h; ++i)
for (int j = 1; j <= w; ++j)
cin >> data1[i][j];
for (int i = 1; i <h; ++i)
for (int j = 1; j < w; ++j)
{
if (data1[i][j] == '#'&&data1[i][j + 1] == '#'&&data1[i + 1][j] == '#')... | a.cc: In function 'int main()':
a.cc:19:103: error: expected ')' before '{' token
19 | else if((data1[i][j] == '#'&&data1[i-1][j] == '#'&&data1[i][j-1] == '#'&&i!=1)
| ~ ^
| ... |
s132164440 | p03937 | C++ | #include<iostream>
using namespace std;
char data1[10][10];
int main()
{
int h, w;
cin >> h >> w;
for (int i = 1; i <= h; ++i)
for (int j = 1; j <= w; ++j)
cin >> data1[i][j];
for (int i = 1; i <h; ++i)
for (int j = 1; j < w; ++j)
{
if (data1[i][j] == '#'&&data1[i][j + 1] == '#'&&data1[i + 1][j] == '#')... | a.cc: In function 'int main()':
a.cc:19:103: error: expected ')' before '}' token
19 | else if((data1[i][j] == '#'&&data1[i-1][j] == '#'&&data1[i][j-1] == '#'&&i!=1)
| ~ ^
| ... |
s779529958 | p03937 | C++ | #include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a); i<(b); i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for(int i=0; i<(n); i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define LL long long
#define ULL unsigned long long
using namespace std;
char nmap[10][10];
int h,w;
bool solve... | a.cc: In function 'int main()':
a.cc:38:27: error: incompatible types in assignment of 'const char [11]' to 'char [10]'
38 | REP(i,10) nmap[i] = "..........";
| ~~~~~~~~^~~~~~~~~~~~~~
|
s421225956 | p03937 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
using namespace std;
char a[10][10];
int g=0,ans=0,l,r;
int next[2][2]={{0,1},{1,0}};
void dfs(int x,int y)
{
if(x==r-1&&y==l-1) { ans=1;return ;}
for(int i=0;i<=1;i++)
{
int dx=x+next[i][0];
int dy=y+next[i][1];
... | a.cc: In function 'void dfs(int, int)':
a.cc:14:18: error: reference to 'next' is ambiguous
14 | int dx=x+next[i][0];
| ^~~~
In file included from /usr/include/c++/14/string:47,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/1... |
s890396998 | p03937 | C | #include <stdio.h>
int main(void) {
int height,width;
int flag = 0;
scanf("%d %d",&height,&width);
int nowPositionH = 0;
int nowPositionW = 0;
char mozi[height + 5][width + 5];
for(int i = 0 ; i < height ; i ++){
scanf("%s", mozi[i]);
}
int hcount = 0;
int wcount = 0;
int fw = 0;
while(1){
if(m... | main.c: In function 'main':
main.c:35:28: error: 'nowPositon' undeclared (first use in this function); did you mean 'nowPositionW'?
35 | if(nowPositon == height){
| ^~~~~~~~~~
| nowPositionW
main.c:35:28: note: each undeclared ... |
s533310281 | p03937 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
try {
int height = sc.nextInt();
int width = sc.nextInt();
char[][] list = new char[height][width];
for (int i = 0; i < height; i++) {
String str = sc.next();
for (int j = 0; j < width; j++... | Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s683043027 | p03937 | C++ | bool calc1(char** arr, int height, int width, int i, int j) {
if(i < 0 || height <= i || j < 0 || width <= j)
return false;
if(i == height - 1 && j == width - 1) {
if(arr[i][j] =='#')
return true;
else
return false;
}
if(arr[i][j] == '.') return false;
if(calc1(arr, height, width, i +... | a.cc: In function 'int main()':
a.cc:25:8: error: 'cin' is not a member of 'std'
25 | std::cin >> h;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | bool calc1(char** arr, int height, int w... |
s844165745 | p03937 | C++ | include<iostream>
using namespace std;
int main()
{
int h,w;
char a[10][10];
cin>>h>>w;
int sum=0;
for(int i=0;i<h;i++)
{
for(int j=0;j<w;j++)
{
cin>>a[i][j];
if(a[i][j]=='#')
sum++;
}
}
if(sum==2*h)
cout<<"Possible... | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
8 | cin>>h>>w;
| ^~~
a.cc:20:9: error: 'cout' was not declared in this scope
20 | cout<<"Possible"<<endl;
| ... |
s916938829 | p03937 | C++ | #include <cstdio>
#include <iostream>
using namespace std;
#define maxn 10
char s[maxn][maxn];
int h, w;
bool fuck(char s[][maxn], int i, int j)
{
if (i == h - 1 && j == w - 1 && s[i][j] == '#')
return 1;
else if (i < h - 1 && s[i + 1][j] == '#' && j == w - 1)
fuck(s, i + 1, j);
else if (i == h - 1 && j < w - ... | a.cc: In function 'int main()':
a.cc:28:9: error: 'memset' was not declared in this scope
28 | memset(s, NULL, sizeof(s));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <iostream>
+++ |+#include <cs... |
s235892405 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) REP(i,0,n)
#define REP(i,a,n) for(int i = a ; i < (int)n ; i++)
int H, W;
string map[10];
int dx[] = {1, 0}; //, -1, 0};
int dy[] = {0, 1}; //, 0, 1};
void dump(){
rep(i,H){
rep(j, W){
cout << map[i][j];
}
puts("");
}
puts("");
... | a.cc: In function 'void dump()':
a.cc:16:15: error: reference to 'map' is ambiguous
16 | cout << map[i][j];
| ^~~
In file included from /usr/include/c++/14/map:63,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
from a.cc:1:
/usr/include/c++/14... |
s708096731 | p03937 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
try {
int h = sc.nextInt();
int w = sc.nextInt();
int count_w = 0;
int count_h = 0;
boolean flg = false;
for (int i = 0; i < h; i++) {
String str = sc.next();
... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s595773276 | p03937 | C | #include <stdio.h>
#include <stdlib.h>
#include <memory.h>
char** alloc_masu(int H, int W){
int i;
char** A;
A = malloc(sizeof(char*)*H);
for(i=0;i<H;i++){
A[i] = malloc(sizeof(char)*(H+1));
}
return A;
}
int evaluate_masu(char** A, int H, int W){
int i=0, j=0;
int bottomtrack,righttrack;
int toptrack, left... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s745204430 | p03937 | C++ | // AtCoder.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//
#include<stdio.h>
#include<string.h>
#include<math.h>
int main(void){
int h,w;
int a[10][10];
int i,j;
char buff;
int flag;
int k;
int f_w;
int f_h;
scanf("%d %d",&h,&w);
for(i=0;i<h;i++){
for(j=0;j<w;j++){
scanf("%c",&buff);
if(buff == '#'){
... | a.cc: In function 'int main()':
a.cc:50:2: error: expected '}' at end of input
50 | }
| ^
a.cc:9:15: note: to match this '{'
9 | int main(void){
| ^
|
s760816540 | p03937 | C++ | #include <bits/stdc++.h>
//#include <boost/functional/hash.hpp>
//example: unordered_set< pair<int,int>,boost::hash< std::pair<int, int> > > used;
//priority_queue< pair<int,pair<int,int> >, vector<pair<int,pair<int,int>>>, greater<pair<int,pair<int,int> > > > pqueue; //cost, vertex(行き先)
using namespace std;
#defin... | a.cc: In function 'bool isMovable(int, int)':
a.cc:51:1: warning: no return statement in function returning non-void [-Wreturn-type]
51 | }
| ^
a.cc: In function 'bool bfs(int, int, int, int)':
a.cc:75:100: error: expected ';' before 'return'
75 | == (isValid(now.first, now.second + 1) && (g... |
s170576400 | p03937 | C++ | #include <iostream>
using namespace std;
int main() {
int r,c;
cin >> r >> c;
int sr, sc;
int er, ec;
int c;
char ch;
bool first = false;
for (int i = 0; i < r; ++i) {
for (int j = 0; j < c; ++j) {
char ch;
cin >> ch;
if (ch == '#') {
... | a.cc: In function 'int main()':
a.cc:10:9: error: redeclaration of 'int c'
10 | int c;
| ^
a.cc:5:11: note: 'int c' previously declared here
5 | int r,c;
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.