submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s675639645 | p03929 | C++ | #include<bits/stdc++.h>
using namespace std;
int map[12][6]={
{4,2,0,9,7},
{1,10,8,6,4},
{9,7,5,3,1},
{6,4,2,0,9},
{3,1,10,8,6},
{0,9,7,5,3},
{8,6,4,2,0},
{5,3,1,10,8},
{2,0,9,7,5},
{10,8,6,4,2},
{7,5,3,1,10}};
int main()
{
int n,k,ans=0;
cin>>n>>k;
for(int i=2;i<n;i++)
... | a.cc: In function 'int main()':
a.cc:22:28: error: reference to 'map' is ambiguous
22 | if(map[i][j]==k)ans++;
| ^~~
In file included from /usr/include/c++/14/map:63,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
... |
s008978190 | p03929 | C++ | #include<bits/stdc++.h>
using namespace std;
int n,k,ans,p;
int map[12][6]={{4,2,0,9,7},{1,10,8,6,4},{9,7,5,3,1},{6,4,2,0,9},{3,1,10,8,6},{0,9,7,5,3},{8,6,4,2,0},{5,3,1,10,8},{2,0,9,7,5},{10,8,6,4,2},{7,5,3,1,10}};
int main()
{
scanf("%d%d",&n,&k);n-=2;
p=n%11;n/=11;
ans=n*5;
for(int i=0;i<p;i++)
f... | a.cc: In function 'int main()':
a.cc:12:10: error: reference to 'map' is ambiguous
12 | if(map[i][j]==k)ans++;
| ^~~
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/b... |
s517389561 | p03929 | C++ | #include<bits/stdc++.h>
using namespace std;
int n,k,ans,p;
int map[12][6]={
{4,2,0,9,7},
{1,10,8,6,4},
{9,7,5,3,1},
{6,4,2,0,9},
{3,1,10,8,6},
{0,9,7,5,3},
{8,6,4,2,0},
{5,3,1,10,8},
{2,0,9,7,5},
{10,8,6,4,2},
{7,5,3,1,10}};
int main()
{
scanf("%d%d",&n,&k);n-=2;
p=n... | a.cc: In function 'int main()':
a.cc:23:10: error: reference to 'map' is ambiguous
23 | if(map[i][j]==k)ans++;
| ^~~
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/b... |
s159498070 | p03929 | C++ | #include<bits/stdc++.h>
using namespace std;
int n,k,ans,p;
int map[12][6]={{4,2,0,9,7},{1,10,8,6,4},{9,7,5,3,1},{6,4,2,0,9},
{3,1,10,8,6},{0,9,7,5,3},{8,6,4,2,0},{5,3,1,10,8},{2,0,9,7,5},
{10,8,6,4,2},{7,5,3,1,10}};
int main()
{
scanf("%d%d",&n,&k);n-=2;
p=n%11;n/=11;
ans=n*5;
for(int i=0;i<p;i... | a.cc: In function 'int main()':
a.cc:14:10: error: reference to 'map' is ambiguous
14 | if(map[i][j]==k)ans++;
| ^~~
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/b... |
s703285930 | p03929 | C++ | #include<bits/stdc++.h>
using namespace std;
int n,m,ans;
int map[12][6]={{4,2,0,9,7},{1,10,8,6,4},{9,7,5,3,1},{6,4,2,0,9},{3,1,10,8,6},
{0,9,7,5,3},{8,6,4,2,0},{5,3,1,10,8},{2,0,9,7,5},{10,8,6,4,2},{7,5,3,1,10}};
int main(){
cin>>n>>m;
ans=((n-2)/11)*5;
for(int i=0;i<(n-2)%11;i++)
for(int j=0;j<5;j... | a.cc: In function 'int main()':
a.cc:11:16: error: reference to 'map' is ambiguous
11 | if(map[i][j]==m) ans++;
| ^~~
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/inc... |
s880443411 | p03929 | C++ | #include<bits/stdc++.h>
using namespace std;
int n,k,ans,p;
int map[12][6]={
{4,2,0,9,7},
{1,10,8,6,4},
{9,7,5,3,1},
{6,4,2,0,9},
{3,1,10,8,6},
{0,9,7,5,3},
{8,6,4,2,0},
{5,3,1,10,8},
{2,0,9,7,5},
{10,8,6,4,2},
{7,5,3,1,10}};
int main()
{
scanf("%d%d",&n,&k);n-=2;
p=n... | a.cc: In function 'int main()':
a.cc:23:10: error: reference to 'map' is ambiguous
23 | if(map[i][j]==k)ans++;
| ^~~
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/b... |
s159253608 | p03929 | C++ | #include<bits/stdc++.h>
using namespace std;
int a[11,5]=
{4,2,0,9,7},
{1,10,8,6,4},
{9,7,5,3,1},
{6,4,2,0,9},
{3,1,10,8,6},
{0,9,7,5,3},
{8,6,4,2,0},
{5,3,1,10,8},
{2,0,9,7,5},
{10,8,6,4,2},
{7,5,3,1,10};
int n,s=0,i,j,k,a;
int main()
{
cin>>n>>k;
s+=(n/... | a.cc:3:11: error: expected ']' before ',' token
3 | int a[11,5]=
| ^
| ]
a.cc:3:12: error: expected unqualified-id before numeric constant
3 | int a[11,5]=
| ^
a.cc:4:16: error: expected unqualified-id before ',' token
4 | {4,2,0,9,7},
| ... |
s309860914 | p03929 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n, l, a = 0;
cin >> n >> k;
if(k < 3){
cout << 0 << endl;
return 0;
}
vector<long long> vec;
for(long long i = 0; i < n - 2; i++){
for(int j = 0; j < k; j++){
if((i * 3 + (i + 1) * 3 + (i + 2) * 3 + 18 + 3 * j) % 11 == 7){
a++;
}... | a.cc: In function 'int main()':
a.cc:5:21: error: 'k' was not declared in this scope
5 | cin >> n >> k;
| ^
|
s924046811 | p03929 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <stdio.h>
using namespace std;
using ll = int long long;
map <int ,int> mpa,mpb;
int main(){
int n,k;
cin >> n >>k;
int A[n+1][8]={0};
... | a.cc: In function 'int main()':
a.cc:28:25: error: expected ')' before ';' token
28 | sum=((A[i][j]%11)*9;
| ~ ^
| )
|
s027313429 | p03929 | C | #include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
int main()
{
int n,k,i,j,i1,j1,c,b;
scanf("%d %d",&n,&k);
c = 0;
i1 = j1 = -1;
for(i=0;i<=n-3;i++){
for(j=1;j<=5;j++){
if( ( 9*( 7*i+j ) + 72 ) % 11 == k ){
i1 = i;
j1 = j;
c++;
break;
}
}
if( i... | main.c: In function 'main':
main.c:83:1: error: expected declaration or statement at end of input
83 | }
| ^
|
s838150099 | p03929 | C++ | #include "stdio.h"
#define long long __int64;
__int64 a[11] = {3,8,2,7,1,6,0,5,10,4,9};
int main()
{
__int64 n,k,sum,i;
while (scanf ("%lld%lld",&n,&k) != EOF)
{
n = 7*n-16;
sum = n/11 - n/77*2;
if (a[k] <= n%11)
{
sum++;
}
for (i=a[k];i<=n%77;i+=... | a.cc:4:1: error: '__int64' does not name a type; did you mean '__int64_t'?
4 | __int64 a[11] = {3,8,2,7,1,6,0,5,10,4,9};
| ^~~~~~~
| __int64_t
a.cc: In function 'int main()':
a.cc:7:5: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
7 | __int64 n,k,sum,i;
| ^... |
s488627083 | p03929 | C++ | #include "stdio.h"
__int64 a[11] = {3,8,2,7,1,6,0,5,10,4,9};
int main()
{
__int64 n,k,sum,i;
while (scanf ("%I64d%I64d",&n,&k) != EOF)
{
n = 7*n-16;
sum = n/11 - n/77*2;
if (a[k] <= n%11)
{
sum++;
}
for (i=a[k];i<=n%77;i+=11)
{
... | a.cc:2:1: error: '__int64' does not name a type; did you mean '__int64_t'?
2 | __int64 a[11] = {3,8,2,7,1,6,0,5,10,4,9};
| ^~~~~~~
| __int64_t
a.cc: In function 'int main()':
a.cc:5:5: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
5 | __int64 n,k,sum,i;
| ^... |
s993365337 | p03929 | C++ | #include <iostream>
#include <cstdio>
#include <cmath>
#include <complex>
#include <vector>
#include <algorithm>
using namespace std;
typedef complex<double> Point;
int n, k;
Point to_point(int i) {
double pai = 3.14159265358979;
return exp(complex<double>(0, 2 * pai * i / n));
}
Point to_vector(int i, int j) {
... | a.cc: In function 'double area(int, int, int)':
a.cc:28:38: error: cannot bind non-const lvalue reference of type 'Point&' {aka 'std::complex<double>&'} to an rvalue of type 'Point' {aka 'std::complex<double>'}
28 | double ret = _cross(to_vector(i, j), to_vector(i, k));
| ~~... |
s556031413 | p03929 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<climits>
#include<algorithm>
using namespace std;
int main()
{
int n,k;
long long sum;
int cnt=0;
scanf("%d%d",&n,&k);
for(int i=1;i<=n-2;i++)
for(int j=1;j<=5;j++)
{
sum=3*(7*(3*i+3)+3*j-21)+9;
if( cnt++;
}
... | a.cc: In function 'int main()':
a.cc:20:3: error: expected primary-expression before '}' token
20 | }
| ^
a.cc:18:17: error: expected ')' before '}' token
18 | if( cnt++;
| ~ ^
| )
19 |
20 | }
| ~
a.cc:20:3: error: expected p... |
s186139000 | p03929 | C++ |
#include <iostream>
using namespace std;
#define rep(i,n) for (int i=0;i<(n);i++)
#include <string>
#include <vector>
#include <algorithm>
#include <map>
int main() {
int n, k,cnt=0,st=0;
bool memo[10];
memset(memo, false, 10);
cin >> n >> k;
rep(i, n) {
st = (7 * i * 9 + 81) % 11;
if (memo[st] == false)
i... | a.cc: In function 'int main()':
a.cc:12:9: error: 'memset' was not declared in this scope
12 | memset(memo, false, 10);
| ^~~~~~
a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
8 | #include <map>
+++ |+#include <cstring>
... |
s768996554 | p03929 | C++ | #include <bits/stdc++.h>
using namespace std;
struct Fast {Fast(){std::cin.tie(0);ios::sync_with_stdio(false);}} fast;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef queue<int> qi;
typedef stack<int> si;
typedef deque<int> dqi;
#define reps(i, a, b... | a.cc: In function 'int main()':
a.cc:53:16: error: invalid operands of types 'void' and 'int' to binary 'operator*'
53 | print(n - 1) * 5 / 11;
| ~~~~~~~~~~~~ ^ ~
| | |
| void int
|
s621936201 | p03929 | C++ | #include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <queue>
#include <algorithm>
#include <utility>
#include <cmath>
#define INF_LL 9000000000000000000
#define INF 2000000000
#define REP(i, n) for(int i = 0;i < (n);i++)
#define FOR(i, a, b) for(int i = (a);i < (b);i++)
using namespace... | a.cc: In function 'int main()':
a.cc:75:21: error: expected initializer before 'res'
75 | unsigned ll res = 0;
| ^~~
a.cc:78:25: error: 'res' was not declared in this scope
78 | res += ans[i];
| ^~~
a.cc:81:9: error: 'res' was... |
s176959743 | p03929 | C++ |
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#includ... | a.cc:23:7: error: 'll' does not name a type
23 | const ll chart[11][5] =
| ^~
a.cc: In function 'int main()':
a.cc:54:31: error: 'chart' was not declared in this scope; did you mean 'char'?
54 | ++cnt[chart[i][j]];
| ^~~~~
| ... |
s316854504 | p03930 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define ll long long
#define all(v) v.begin(), v.end()
int main(){
int h,w,k;cin>>h>>w>>k;vector<vector<int>> c(h,vector<int>(w));
//int i,j,l,n,p;
rep(i,h)rep(j,w){
char ch;cin>>ch;
c[i][j]=(ch-'0');
}
int ans=0;
rep... | a.cc: In function 'int main()':
a.cc:21:13: error: 'l' was not declared in this scope
21 | for(l=h-1;l>=0;l--){
| ^
a.cc:34:19: error: 'p' was not declared in this scope
34 | for(p=from;p<n;p++) {
| ^
a.cc:42:15: error: 'p' was not declared in this s... |
s004733109 | p03930 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
int H, W, K;
void fall(vector<vector<int>> &c) {
rep(i,W) rep(j,H) {
if (c[i][j] == 0) {
for (int k = 1; k + j < H; ++k) {
if (c[i][k+j] !... | a.cc: In function 'int main()':
a.cc:73:39: error: could not convert 'c' from 'vector<vector<long long int>>' to 'vector<vector<int>>'
73 | ans = max(ans, calc_ans(i, j, c));
| ^
| |
| ... |
s510202898 | p03930 | C++ | /*
Problem 93
https://atcoder.jp/contests/s8pc-3/tasks/s8pc_3_b
*/
#include <bits/stdc++.h>
using namespace std;
/* typedef */
typedef long long ll;
typedef pair<int, int> pii;
/* class */
class pazzle {
public:
int H, W, K;
ll ans = 0;
vector<vector<int> > v;
pazzle (int H, int W, int K, ve... | a.cc: In function 'int main()':
a.cc:81:24: error: 'INF' was not declared in this scope
81 | int minValue = INF;
| ^~~
|
s993928967 | p03930 | C++ | tifkukhj
kuyljhlikljk
lgykihlkjhivkhuijj
dtuuuuuuuuudhg
ghjfyudt
tukuyfyjkf
dtukyfkyfukyukfyhf
fghjuk
u | a.cc:1:1: error: 'tifkukhj' does not name a type
1 | tifkukhj
| ^~~~~~~~
|
s719347395 | p03930 | C++ | 17 17 2
12345678912345678
23456789123456789
34567891234567891
45678912345678912
56789123456789123
67891234567891234
78912345678912345
89123456789123456
91234567891234567
12345678912345678
23456789123456789
34567891234567891
45678912345678912
56789123456789123
67891234567891234
78912345678912345
89123456789123456 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 17 17 2
| ^~
|
s961921360 | p03931 | C++ | #include <bits/stdc++.h>
typedef long long ll;
const int MOD = 1e9 + 7;
using namespace std;
//-------------------------↓↓↓↓↓↓------------------------
int main(void){
cin.tie(0);
ios::sync_with_stdio(false);
ll n, k, a[100 + 10], dp[100 + 10][100 + 10][255 + 100], add = 1, ans = 0;
//こういうのはDP... | a.cc: In function 'int main()':
a.cc:42:58: error: expected ')' before ';' token
42 | (ans += ((dp[n][i][k] % MOD) * (add % MOD) % MOD);
| ~ ^
| )
|
s023889097 | p03931 | C++ | #include<bits/stdc++.h>
using namespace std;
#define inf 1e9
#define ll long long
#define ull unsigned long long
#define M 1000000007
#define P pair<int,int>
#define PLL pair<ll,ll>
#define FOR(i,m,n) for(int i=m;i<n;i++)
#define RFOR(i,m,n) for(int i=m;i>=n;i--)
#define rep(i,n) FOR(i,0,n)
#define rrep(i,n) RFOR(i,n,0... | a.cc: In function 'int main()':
a.cc:48:29: error: expected ')' before ';' token
48 | ans+=(dp[n][k][i]*c[i]%M;
| ~ ^
|
s760890943 | p03931 | C++ | #include<algorithm>
#include<iostream>
#include<vector>
using namespace std;
typedef long long lint;
typedef vector<int>vi;
typedef pair<int,int>pii;
#define rep(i,n)for(int i=0;i<(int)(n);++i)
const lint mod=1e9+7;
const int N=100000;
lint fact[N];
lint invfact[N];
static long powerMod(long x, long exponent) {
lon... | a.cc: In function 'int main()':
a.cc:53:5: error: 'memset' was not declared in this scope
53 | memset(dp2,0,sizeof(dp2));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<vector>
+++ |+#include <cstring>
4... |
s600727761 | p03931 | C++ | #include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <cassert>
#include <iostream>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <bitset>
#include <functional>
using namespace std;
#define repl(i,a,b) for(int i=(int)(a);i<(in... | a.cc: In function 'int main()':
a.cc:35:52: error: no matching function for call to 'std::vector<std::vector<long int> >::vector(int, std::vector<int>)'
35 | vector<vector<long> > dp(n+1, vector<int>(256, 0));
| ^
In file included from /usr/include/c++/14/ve... |
s266409007 | p03931 | C++ | #include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cst... | a.cc: In function 'int main()':
a.cc:72:16: error: type 'VVI' {aka 'class std::vector<std::vector<long long int> >'} argument given to 'delete', expected pointer
72 | delete tdata;
| ^~~~~
|
s109137365 | p03931 | C++ | #include<iostream>
#include<vector>
#include<cassert>
using namespace std;
#define int long long
const int mod=1e9+7;
int fact(int x){
int ret=1;
for(int i=1; i<=x; i++){
(ret*=i)%=mod;
}
return ret;
}
int main(){
int n, k;
cin>> n>> k;
int a[n];
for(int i=0; i<n; i++) cin>> a[i];
... | cc1plus: error: '::main' must return 'int'
|
s261405843 | p03931 | C++ | //aの各要素を{選ぶ, 選ばない}で, 数列bを作ってみる。 -> aは相異なるのでbは相異なる。
//-> bの順番(r!通り)によらず, xor(b)は同じ値. (つまり, 各長さrについて, この作り方でhoge[r]通り作れたとすれば…
//答えはΣhoge[r] * r!になる。(選ぶ, 選ばない~でbを作る場合に必要な情報は [どこまで決めたか?, bの長さ, そこまでのxor]の3つ。これでDPすればよい)
#include <iostream>
#define int long long
using namespace std;
int mod = 1000000007;
int n, k;
int a[100... | a.cc: In function 'int main()':
a.cc:16:22: error: expected unqualified-id before 'xor' token
16 | int id, len, xor;
| ^~~
a.cc:25:30: error: expected primary-expression before 'xor' token
25 | for (xor = 0; xor < 256; xor++) {
| ... |
s565754379 | p03932 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <tuple>
using namespace std;
map<int, int> mp;
int f(vector<vector<int>> &A, int y1, int x1, int y2, int x2){
int X = (y1 * 200 + x1) * 200 + y2;
if (mp.count(X)){
return mp[T];
} else {
int tmp = A[y1][x1] + A[y2][x2];
if (y1 == y2 && x1 == x2){
... | a.cc: In function 'int f(std::vector<std::vector<int> >&, int, int, int, int)':
a.cc:10:27: error: 'T' was not declared in this scope
10 | return mp[T];
| ^
|
s784256584 | p03932 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(x) (x).begin(),(x).end()
const int mod=1000000007,MAX=405,INF=1<<30;
int dp[MAX][MAX][MAX];
int main(){
std::ifstream in("text.txt");
std::cin.rdbuf(in.rdbuf());
cin.tie(0);
ios::sync_with_stdio(false);
int H,... | a.cc: In function 'int main()':
a.cc:31:48: error: no matching function for call to 'max(int&, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type)'
31 | dp[s][a][b]=max(dp[s][a][b],dp[s-1][a-bit/2][b-bit%2]+S[a-1][s-a-1]);
| ... |
s447147120 | p03932 | C++ | //カタラン数を語らん!w
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream>
#include <r... | In file included from /usr/include/c++/14/cassert:44,
from a.cc:27:
a.cc: In function 'int main()':
a.cc:87:27: error: 'i' was not declared in this scope
87 | assert(hoge >= dp[i - 1][q - 1][h + w - 2]);
| ^
a.cc:87:34: error: 'q' was not declared in this scop... |
s734045653 | p03932 | C++ | #include "iostream"
#include "algorithm"
#include "string"
#include "vector"
#include "cmath"
#include "bitset"
#include "queue"
#include "functional"
#include "map"
#include "unordered_map"
#include "set"
#include "stack"
#include "tuple"
#define mod 1000000007
#define sp ' '
#define intmax 2147483647
#define llmax 9... | a.cc: In function 'int main()':
a.cc:45:30: error: no matching function for call to 'max(int, ll)'
45 | for(int j=max(0,i-H+1);j!=min(i,W-1);++j){
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_... |
s510905965 | p03932 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int dp[200][200][200];
int a, b;
int c[30][30];
int dx[2] = { -1,0 }, dy[2] = { 0,-1 };
int saiki(int d, int e, int f, int g) {
if (dp[d][e][f] != -1)return dp[d][e][f];
for (int h = 0; h < 2; h++) {
for (int i = 0; i < 2; i++) {
int n... | a.cc: In function 'int main()':
a.cc:27:9: error: 'memset' was not declared in this scope
27 | memset(dp, -1, sizeof(dp));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<algorithm>
+++ |+#include <cs... |
s889555882 | p03932 | C++ | #include<iostream>
#include<unordered_map>
#include<cstdio>
#include<string>
#include<algorithm>
#include<functional>
#include<vector>
#include<map>
using namespace std;
int dp[30][30][30][30];
int a, b;
int c[30][30];
int dx[2] = { -1,0 }, dy[2] = { 0,-1 };
int saiki(int d, int e, int f, int g) {
if (dp[d][e][f][g] ... | a.cc: In function 'int main()':
a.cc:32:9: error: 'memset' was not declared in this scope
32 | memset(dp, -1, sizeof(dp));
| ^~~~~~
a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
8 | #include<map>
+++ |+#include <cstring>... |
s848718239 | p03932 | C++ | #include <iostream>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <complex>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <bitset>
#include <ctime>
#include <map>
#include <uno... | a.cc: In function 'int main()':
a.cc:82:32: error: no matching function for call to 'max(LL&, int&)'
82 | if (eh && sh) buf = max(buf, dp[eh - 1][ew][sh - 1][sw]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
fr... |
s026934353 | p03932 | C | #include<stdio.h>
int map[200][200],dp[200][200][400];
int h,w;
int search(int ax,int ay,int bx,int by){
int i,c,max=0;
if(ax==0 && ay==0){
return map[0][0]+search(ax+1,ay,bx,by+1);
}else if(ax==h-1 && ay==w-1){
return map[h-1][w-1];
}else{
if(dp[ax][ay][ax+ay]==0){
for(i=0;i<4;i++){
if(... | main.c: In function 'main':
main.c:36:18: error: expected expression before ']' token
36 | dp[i][j][]=0;
| ^
|
s031416417 | p03932 | C | #include<stdio.h>
int map[200][200],dp[200][200][200][200];
int h,w,num;
int search(int ax,int ay,int bx,int by){
int i;
if(ax==0 && ay==0){
return search(ax+1,ay,bx,by+1);
}else if(ax==h && ay==w){
return 0;
}else{
if(dp[ax][ay][bx][by]==0){
for(i=0;i<4;i++){
if(ax+(i%2)<h && ay+(1-i%2)<w && bx+i/2<h ... | main.c: In function 'search':
main.c:20:50: error: expected ';' before '}' token
20 | return dp[ax][ay][bx][by]
| ^
| ;
21 | }
| ~ ... |
s229554406 | p03932 | C++ | #include <cstdio>
#include <cmath>
#include <cstring>
#include <ctime>
#include <climits>
#include <iostream>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <vector>
#include <sstream>
#include <typeinfo>
#include <fstream>
#define DIV 1000000007
using namespace std;
int dp[205][205][20... | /tmp/ccBLflmI.o: in function `main':
a.cc:(.text+0xb): relocation truncated to fit: R_X86_64_PC32 against symbol `H' defined in .bss section in /tmp/ccBLflmI.o
a.cc:(.text+0x27): relocation truncated to fit: R_X86_64_PC32 against symbol `W' defined in .bss section in /tmp/ccBLflmI.o
a.cc:(.text+0x7e): relocation trunca... |
s224982332 | p03932 | C++ | #include <cstdio>
#include <cmath>
#include <cstring>
#include <ctime>
#include <climits>
#include <iostream>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <vector>
#include <sstream>
#include <typeinfo>
#include <fstream>
#define DIV 1000000007
using namespace std;
long long dp[205][2... | /tmp/ccSy64Jf.o: in function `main':
a.cc:(.text+0xb): relocation truncated to fit: R_X86_64_PC32 against symbol `H' defined in .bss section in /tmp/ccSy64Jf.o
a.cc:(.text+0x27): relocation truncated to fit: R_X86_64_PC32 against symbol `W' defined in .bss section in /tmp/ccSy64Jf.o
a.cc:(.text+0x7e): relocation trunca... |
s599751760 | p03932 | C++ | #include <iostream>
using namespace std;
int main()
{
int H,W,a,T1,T2;
cin >> H >> W;
int array1[W];
int array2[W];
for(int i=0;i<W;i++){
cin >> array1[i];
T1=T1+array1[i];
}
for(int i=0;i<W;i++){
cin >> array2[i];
T2=T2+array2[i];
}
a=T1+T2-array1[... | a.cc: In function 'int main()':
a.cc:19:20: error: 'i' was not declared in this scope
19 | a=T1+T2-array1[i]-array2[W];
| ^
|
s775491486 | p03932 | C | #include<stdio.h>
int main(int argc, char const *argv[]) {
int h,w,map[200][200],i,j,sum;
scanf("%d %d",&h,&w);
sum=0;
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
scanf("%d",%map[i][j]);
sum+=map[i][j];
}
}
printf("%d",sum);
return 0;
}
| main.c: In function 'main':
main.c:10:24: error: expected expression before '%' token
10 | scanf("%d",%map[i][j]);
| ^
|
s946345288 | p03932 | C++ | #include <iostream>
#include <iomanip>
#include <sstream>
#include <vector>
#include <string>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <functional>
#include <iterator>
#include <limits>
#include <nume... | a.cc: In member function 'int MinimumCostFlow::solve(int, int, int)':
a.cc:105:50: error: 'INT_MAX' was not declared in this scope
105 | vector<int> distance( V, INT_MAX );
| ^~~~~~~
a.cc:23:1: note: 'INT_MAX' is defined in header '<climit... |
s114418082 | p03933 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
cin>>a>>b
cout<<a;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:10: error: expected ';' before 'cout'
6 | cin>>a>>b
| ^
| ;
7 | cout<<a;
| ~~~~
|
s984181561 | p03933 | C++ | #include <iostream>
#include <math.h>
#pragma GCC optimize(2)
#pragma GCC optimize(3)
using namespace std;
typedef long long ll;
const long double pi=3.1415926535897932;
int n;
ll kk;
long double len[200005],a[200005];
inline ll read() {
ll X=0,w=0; char ch=0;
while(!isdigit(ch)) {w|=ch=='-';ch=getchar();}
while(... | a.cc: In function 'int main()':
a.cc:79:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
79 | sort(s+1,s+id+1,cmp);
| ^~~~
| sqrt
|
s325846190 | p03933 | C++ | #include <bits/stdc+.h>
using namespace std;
typedef long long ll;
const long double pi=3.1415926535897932;
ll n,k;
long double len[5000005],a[5000005];
struct node{
ll num;
long double S;
}s[5000005];
bool cmp(node a,node b) {
return a.S<b.S;
}
int main() {
//printf("%.12lf\n",sqrt(pi));
cin>>n>>k;
if(n==3)... | a.cc:1:10: fatal error: bits/stdc+.h: No such file or directory
1 | #include <bits/stdc+.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s023848652 | p03933 | C++ | 似懂非懂 | a.cc:1:1: error: '\U00004f3c\U000061c2\U0000975e\U000061c2' does not name a type
1 | 似懂非懂
| ^~~~~~~~
|
s067327913 | p03933 | C++ | #include <bits\stdc++.h>
#define db long double
#define S(A,B) 2*Sin[A]*Sin[B]*Sin[n-A-B]
#define m (l+r)/2
using namespace std;
db ms,ls=0,rs=1.299038105676658,pi=3.14159265358979323846;
db Sin[200050];
long long n,k,i,p,q,l,r;
int main() {
//freopen("1.in","r",stdin);
cin>>n>>k;
cout<<setprecision(50);
if (n%3==0... | a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory
1 | #include <bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s524474917 | p03933 | C++ | #include <bits\stdc++.h>
#define area(x,y) 2*Sin[x]*Sin[y]*Sin[n-x-y]
#define db long double
#define m (l+r>>1)
#define pi (db) 3.14159265358979323846
#define N 300000
using namespace std;
int L[N],R[N],tmp[N],n;
long long k;
db Sin[N],ans;
int main() {
cin>>n>>k;
if (n%3==0&&k>1LL*n*(n-1)*(n-2)/6-n/3) {printf("1.299... | a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory
1 | #include <bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s879479009 | p03933 | C++ | #include <bits/stdc++.h>
using namespace std;
#define len(x) (int((x).size()))
#define append push_back
#define pp make_pair
#define ff(a, b) for (int a = 0; a < int(b); ++a)
#define kk(n) ff(k, n)
#define xx(n) ff(x, n)
#define yy(n) ff(y, n)
#define ii(n) ff(i, n)
#define fff(a, b, c) for (int a = in... | In file included from /usr/include/c++/14/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:114,
from a.cc:1:
a.cc:35:8: error: expected unqualified-id before numeric constant
35 | double M_PI = acos(-1);
| ^~~~
|
s142369676 | p03933 | C++ | #include <bits/stdc++.h>
using namespace std;
#define len(x) (int((x).size()))
#define append push_back
#define pp make_pair
#define ff(a, b) for (int a = 0; a < int(b); ++a)
#define kk(n) ff(k, n)
#define xx(n) ff(x, n)
#define yy(n) ff(y, n)
#define ii(n) ff(i, n)
#define fff(a, b, c) for (int a = in... | In file included from /usr/include/c++/14/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:114,
from a.cc:1:
a.cc:35:14: error: expected unqualified-id before numeric constant
35 | const double M_PI = acos(-1);
| ^~~~
|
s710694309 | p03933 | C++ | #include <iostream>
#include <cstdio>
#include <cmath>
#include <complex>
#include <vector>
#include <algorithm>
using namespace std;
typedef complex<double> Point;
int n, k;
Point to_point(int i) {
double pai = 3.14159265358979;
return exp(complex<double>(0, 2 * pai * i / n));
}
Point to_vector(int i, int j) {
... | a.cc: In function 'double area(int, int, int)':
a.cc:28:37: error: cannot bind non-const lvalue reference of type 'Point&' {aka 'std::complex<double>&'} to an rvalue of type 'Point' {aka 'std::complex<double>'}
28 | double ret = cross(to_vector(i, j), to_vector(i, k));
| ~~~~... |
s358597977 | p03933 | C++ | #include <iostream>
#include <cstdio>
#include <cmath>
#include <complex>
#include <vector>
#include <algorithm>
using namespace std;
typedef complex<double> Point;
int n, k;
Point to_point(int i) {
double pai = 3.14159265358979;
return exp(complex<double>(0, 2 * pai * i / n));
}
Point to_vector(int i, int j) {
... | a.cc: In function 'double area(int, int, int)':
a.cc:28:37: error: cannot bind non-const lvalue reference of type 'Point&' {aka 'std::complex<double>&'} to an rvalue of type 'Point' {aka 'std::complex<double>'}
28 | double ret = cross(to_vector(i, j), to_vector(i, k));
| ~~~~... |
s419292946 | p03935 | C++ | #include<cstdio>
#include<cstring>
typedef long long LL;
const int N=2;
const int M=1e6+50;
const int mod=998244353;
struct mat
{
LL c[N][N];
void clear(){memset(c,0,sizeof(c));}
}a,t;
mat operator * (mat a,mat b)
{
mat c;c.clear();
for(int k=0;k<N;++k)
for(int i=0;i<N;++i)
for(int j=0;j<N;++j)
... | a.cc: In function 'int main()':
a.cc:37:17: error: 'g' was not declared in this scope
37 | m%=mod;f[1]=g[1]=inv[1]=x=1;
| ^
|
s602732944 | p03935 | C++ | #include<cstdio>
#include<cstring>
typedef long long LL;
const int N=2;
const int M=1e6+50;
const int mod=998244353;
struct mat{
LL c[N][N];
void clear(){memset(c,0,sizeof(c));}
}a,t;
mat operator * (mat a,mat b){
mat c;c.clear();
for(int k=0;k<N;++k)
for(int i=0;i<N;++i)
for(int j=0;j<N;++j)
... | a.cc: In function 'int main()':
a.cc:33:21: error: 'g' was not declared in this scope
33 | m%=mod;f[1]=g[1]=inv[1]=x=1;
| ^
|
s683779675 | p03935 | C++ | #include ector
#include <cassert>
// ------------ Modulo Class ------------ //
template<unsigned mod>
class modulo {
private:
unsigned x;
public:
modulo() : x(0) {};
modulo(unsigned x_) : x(x_) {};
operator unsigned() { return x; }
modulo operator==(const modulo& m) const { return x == m.x; }
modulo operator!=(... | a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
1 | #include ector
| ^~~~~
a.cc:24:14: error: 'vector' in namespace 'std' does not name a template type
24 | typedef std::vector<modulo<998244353> > matrix_base;
| ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in head... |
s468332118 | p03935 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZER... | a.cc: In function 'll fib(ll, ll, ll)':
a.cc:47:20: error: redeclaration of 'll T [2][2]'
47 | ll T[2][2];
| ^
a.cc:39:29: note: 'll T [2][2]' previously declared here
39 | ll S[2][2], T[2][2];
| ^
|
s703808239 | p03935 | C++ | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fbo find_by_order
#define ook order_of_key
typedef long long ll;
typedef pair<ll... | a.cc: In member function 'int* Matrix::operator[](int)':
a.cc:31:40: error: cannot convert 'll*' {aka 'long long int*'} to 'int*' in return
31 | int *operator [] (int r) { return a[r]; };
| ~~~^
| |
| ... |
s095722559 | p03936 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;
template<typename A,typename B>inline ... | a.cc:102:1: error: expected ',' or ';' before 'signed'
102 | signed main(){
| ^~~~~~
|
s525961475 | p03936 | C | #include<stdio.h>
int H, W, N, K;
int ans_map[50][50];
void check4s(int h, int w, int num) {
int p;
int c = 0;
printf("? %d %d %d %d\n", h, w, h, w);
fflush(stdout);
scanf("%d", &p);
ans_map[h][w] = p;
c += p;
if(c == num) return;
printf("? %d %d %d %d\n", h, w+1, h, w+1);
fflush(stdout);
scanf("%d", &... | main.c: In function 'main':
main.c:137:50: error: 'pow' undeclared (first use in this function)
137 | if(ans_map[i][j]) ans += pow;
| ^~~
main.c:137:50: note: each undeclared identifier is reported only once for each function it appears in... |
s946425999 | p03936 | C++ | #include<cstdio>
#include<cstring>
#include<cstdlib>
#include<vector>
using namespace std;
int main(void){
int h, w, n, k;
int ans = 0;
int a[2501];
a[0] = 1;
int x;
int n=0;
scanf("%d %d %d %d", &h, &w, &n, &k);
for (int i = 1; i < 2501; i++){
a[i] = a[i - 1] * 2;
a[i] = a[i] % k;
}
for (int i = 0; i < ... | a.cc: In function 'int main()':
a.cc:12:13: error: redeclaration of 'int n'
12 | int n=0;
| ^
a.cc:7:19: note: 'int n' previously declared here
7 | int h, w, n, k;
| ^
|
s808515748 | p03937 | C++ | #define rep(i,n) for (int i = 0; i < (int)(n); i++)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
short h,w,ans = 0;
cin >> h >> w;
char ai;
rep(i,h) {
cin >> ai;
rep(j,w) if (ai[j] == '#') ans ++;
... | a.cc: In function 'int main()':
a.cc:15:24: error: invalid types 'char[int]' for array subscript
15 | rep(j,w) if (ai[j] == '#') ans ++;
| ^
|
s722385143 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W; cin>>H>>W;
vector<vector<char>>A(H+2,vector<char>(W+2,"."));
for(int i=1;i<H+1;i++){
string S; cin>>S;
for(int j=1;j<W+1;j++)A[i][j]=S.at(j-1);
}
int a=0,b=0;
for(int i=0;i<H+W;i++){
if(A[a+1][b]=='#'&&A[a][b+1]=='#'){cout<<"Impo... | a.cc: In function 'int main()':
a.cc:5:49: error: no matching function for call to 'std::vector<char>::vector(int, const char [2])'
5 | vector<vector<char>>A(H+2,vector<char>(W+2,"."));
| ^
In file included from /usr/include/c++/14/vector:66,
... |
s033002210 | p03937 | C++ | #include <iostream>
#include<vector>
using namespace std;
int main(void){
int h,w;
cin >> h >> w;
vector<string> s(h);
for(int i = 0;i < n;i++){
cin >> s[i];
}
int stone = 0;
for(int i = 0;i < h;i++){
for(int j = 0;j < w;j++){
if(s[i][j] == '#')stone++;
}
... | a.cc: In function 'int main()':
a.cc:8:22: error: 'n' was not declared in this scope
8 | for(int i = 0;i < n;i++){
| ^
|
s642882391 | p03937 | C++ | #include <bits/stdc++.h>
#include <vector>
#include <algorithm>
#include <iostream>
#include <cmath>
#include <map>
using namespace std;
int main() {
int H, W, N;
cin >> H >> W;
N=0;
vector<vector<string>> A(H,vector<string>(W));
for (int i=0; i<H; i++) {
for (int j=0; j<W; j++) {
cin >> A[i][j];
... | a.cc: In function 'int main()':
a.cc:17:18: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} and 'char')
17 | if (A[i][j]=='#') {
In file inc... |
s053214296 | p03937 | C++ | #include <bits/stdc++.h>
#include <vector>
#include <algorithm>
#include <iostream>
#include <cmath>
#include <map>
using namespace std;
int main() {
int H, W, N;
cin >> H >> W;
N=0;
vector<vector<string>> A(H,vector<sting>(W));
for (int i=0; i<H; i++) {
for (int j=0; j<W; j++) {
cin >> A[i][j];
... | a.cc: In function 'int main()':
a.cc:13:37: error: 'sting' was not declared in this scope
13 | vector<vector<string>> A(H,vector<sting>(W));
| ^~~~~
a.cc:13:42: error: template argument 1 is invalid
13 | vector<vector<string>> A(H,vector<sting>(W));
| ... |
s515442920 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
int h, w;
vector<string> a(8);
int nextX[] = { 0, 1};
int nextY[] = {1, 0};
vector<vector<int>> arrived(8, vector<int>(8, 0));
bool range_check(int y, int x) {
if (y < 0 || x < 0 || y >= h || x >= w) {
return false;
}
return true;
}
bool dfs(int y, int x) {
/... | a.cc: In function 'int main()':
a.cc:50:12: error: 's' was not declared in this scope
50 | if(s[i][j]=='#'){
| ^
|
s906158980 | p03937 | C++ | #include <bits/stdc++.h>
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)n; ++i)
const int MOD = 1000000007;
using namespace std;
void solve(void)
{
int h, w;
cin >> h >> w;
vector<string> a(h);
rep(i, h) cin >> a[i];
vector<vector<int>> f(h, vector<int>(w, -1));
int sy = 0, sx =... | a.cc: In function 'void solve()':
a.cc:33:29: error: 's' was not declared in this scope
33 | rep(i, h) rep(j, w) if (s[i][j] == '.') mp[f[i][j]]++;
| ^
|
s739194349 | p03937 | C++ | #include <bits/stdc++.h>
#include <unistd.h>
#define fi first
#define se second
#define rep(i,n) for (ll i = 0; i < (n); ++i)
#define rep1(i,n) for (ll i = 1; i <= (n); ++i)
#define rrep(i,n) for (ll i = (n)-1; i >=0; --i)
#define ALL(a) a.begin(),a.end()
#define pb push_back
#define dame { puts("-1"); return 0;}
#def... | a.cc:198:46: error: empty character constant
198 | vector<vector<char> > a(h, vector<char>(w, ''));
| ^~
|
s850247500 | p03937 | C++ | #include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <cstring>
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, in... | a.cc: In function 'int main()':
a.cc:143:39: error: expected primary-expression before 'W'
143 | vector<vector<char>> a(H,vector<char> W);
| ^
|
s532197287 | p03937 | C++ | #include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <cstring>
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, in... | a.cc: In function 'int main()':
a.cc:143:39: error: expected primary-expression before 'W'
143 | vector<vector<char>> a(H,vector<char> W);
| ^
a.cc:156:2: error: expected '}' at end of input
156 | }
| ^
a.cc:141:11: note: to match this '{'
141 | int main(){
... |
s025681112 | p03937 | C++ | #include<iostream>
#include<stdio.h>
#include<vector>
#include<algorithm>
#include<set>
#include<string>
#include<map>
#include<string.h>
#include<complex>
#include<math.h>
#include<queue>
#include <functional>
#include<time.h>
#include <stack>
#include<iomanip>
using namespace std;
#define rep(i,a,n) for(int i=(a);i<(... | a.cc: In function 'int main()':
a.cc:115:23: error: narrowing conversion of '1.0e+0' from 'double' to 'int' [-Wnarrowing]
115 | int dx[2] = { 1.0 };
| ^~~
|
s275238487 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll h,w,tmp;
cin>>h>>w;
vector<vector<char>> a(h,vector<char(w));
bool flag = true;
for(int i=0; i<h; i++) {
for(int j=0; j<w; j++) {
cin>>a[i][j];
}
}
for(int i=0; i<h; i++) {
... | a.cc: In function 'int main()':
a.cc:8:43: error: the value of 'w' is not usable in a constant expression
8 | vector<vector<char>> a(h,vector<char(w));
| ^
a.cc:6:10: note: 'll w' is not const
6 | ll h,w,tmp;
| ^
a.cc:8:43: error: type/value... |
s698348863 | p03937 | 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++)cin>>c[i][j];
cout<<"Possible"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:33: error: 'j' was not declared in this scope
6 | for(int i=0;i<h;i++)cin>>c[i][j];
| ^
|
s553737595 | p03937 | C++ | #include <bits/stdc++.h>
#ifdef __DEBUG__
#define DBG(X) cout << #X << " = " << (X) << endl;
#define SAY(X) cout << (X) << endl;
#else
#define DBG(X)
#define SAY(X)
#endif
using namespace std;
using ll = long long int;
using ull = unsigned long long int;
using ld = long double;
using pii = pair<int, i... | a.cc: In function 'bool solve()':
a.cc:70:13: error: expected unqualified-id before ')' token
70 | for (int) i = 0; i < H; i++)
| ^
a.cc:70:13: error: expected ';' before ')' token
70 | for (int) i = 0; i < H; i++)
| ^
| ;
a.cc:70:13: error: expected p... |
s357036234 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
typedef pair<int, int> P;
ll Mod = 1000000007;
int H,W;
char field[9][9];
int dx[2] = {0,1};
int dy[2] = {1,0};
bool DFS(int x,int y) {
if (x == H - 1 && y == W - 1) {
return true;
} else {
bool res = false;
for (int i = 0; i < 2; i++... | a.cc: In function 'bool DFS(int, int)':
a.cc:22:30: error: expected ';' before 'res'
22 | field[fx][fy] = '.'
| ^
| ;
23 | res = true;
| ~~~
|
s043643061 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
typedef pair<int, int> P;
ll Mod = 1000000007;
int H,W;
char field[9][9];
int dx[2] = {0,1};
int dy[2] = {1,0};
bool DFS(int x,int y) {
if (x == H - 1 && y == W - 1) {
return true;
} else {
bool res = false;
for (int i = 0; i < 2; i++... | a.cc: In function 'bool DFS(int, int)':
a.cc:22:30: error: expected ';' before 'res'
22 | field[fx][fy] = '.'
| ^
| ;
23 | res = true;
| ~~~
a.cc: In function 'int main()':
a.cc:43:15: error:... |
s080179834 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
typedef pair<int, int> P;
ll Mod = 1000000007;
int H,W;
char field[9][9];
int dx[2] = {0,1};
int dy[2] = {1,0};
bool DFS(int x,int y) {
if (x == H - 1 && y == W - 1) {
return true;
} else {
bool res = false;
for (int i = 0; i < 2; i++... | a.cc: In function 'int main()':
a.cc:34:14: error: 'A' was not declared in this scope
34 | cin >> A[i][j];
| ^
|
s046347200 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
typedef pair<int, int> P;
ll Mod = 1000000007;
int H,W;
char field[9][9];
int dx[2] = {0,1};
int dy[2] = {1,0};
bool DFS(int x,int y) {
if (x == H - 1 && y == W - 1) {
return true;
} else {
bool res = false;
for (int i = 0; i < 2; i++... | a.cc: In function 'int main()':
a.cc:33:15: error: expected ';' before '-' token
33 | for (int j - 0; j < W; j++) {
| ^~
| ;
a.cc:33:26: error: expected ')' before ';' token
33 | for (int j - 0; j < W; j++) {
| ~ ^
| ... |
s534355190 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int counter1,counter2;
counter1=0;
counter2=0;
int b;
int c=0;
int k=0;
int H,W; cin>>H>>W;
int counter=W+H+10;
int count=-1;
char a[H][W];
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
cin>>a[i][j];}}
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
if(a[i][j]=='#'){
... | a.cc: In function 'int main()':
a.cc:35:17: error: expected primary-expression before '<' token
35 | else if(counter=<counter2){
| ^
|
s084740730 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int counter1,counter2;
counter1=0;
counter2=0;
int answer=0;
int i=0;
int H,W; cin>>H>>W;
int counter=W+H+10;
int count=-1;
char a[H][W];
for(int i=0;i<W;i++){
for(int j=0;j<H;j++){
cin>>a[i][j];}}
for(int i=0;i<W;i++){
for(int j=0;j<H;j++){
if(a[j]=='#'){
count... | a.cc: In function 'int main()':
a.cc:18:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
18 | if(a[j]=='#'){
| ~~~~^~~~~
|
s288983532 | p03937 | C++ | H, W = map(int, input().split())
cnt = 0
for i in range(H):
A = input()
cnt += A.count('#')
if (H + W - 1 == cnt): print('Possible')
else: print('Impossible') | a.cc:6:30: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
6 | if (H + W - 1 == cnt): print('Possible')
| ^~~~~~~~~~
a.cc:7:13: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
7 | else: print('Impossible')
... |
s356935559 | p03937 | C++ | #include <iostream>
using namespace std;
int H, W;
void dfs(int x, int y, string *A) {
if (x < W && y < H) {
if (A[x + 1][y] == '#' && A[x][y + 1] == '#')
return;
else if (A[x + 1][y] == '#')
dfs(x + 1, y, A);
else if (A[x][y + 1] == '#')
dfs(x, y + 1, A);
}
return;
}
int main() {
... | a.cc: In function 'int main()':
a.cc:24:7: error: 'seen' was not declared in this scope
24 | if (seen[H - 2][W - 1] || seen[H - 1][W - 2])
| ^~~~
|
s686094495 | p03937 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n); ++i)
const int INF = 1 << 30;
const int INF_NEG = INF * -1;
struct sPoint{
int x, y, breadth;
};
int H, W;
vector<string> A;
int breadth[20][20];
// #def... | a.cc: In function 'int main()':
a.cc:96:14: error: 'j' was not declared in this scope
96 | for (j, W){
| ^
a.cc:102:5: error: expected primary-expression before '}' token
102 | }
| ^
a.cc:101:10: error: expected ';' before '}' token
101 | }
| ^
... |
s747953437 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define REP(i,s,n) for(int i=s;i<n;i++)
#define MOD 1000000007
#define NUM 2520
#define DEBUG 0
#define mp(a,b) make_pair(a,b)
#define SORT(V) sort(V.begin(),V.end())
#define PI (3.141592653589794)
#define INF (1LL<<50)
signed main(){
lli h,... | a.cc: In function 'int main()':
a.cc:6:20: error: expected ',' or ';' before 'for'
6 | #define REP(i,s,n) for(int i=s;i<n;i++)
| ^~~
a.cc:21:9: note: in expansion of macro 'REP'
21 | REP(i,0,h)REP(j,0,w){
| ^~~
a.cc:21:13: error: 'i' was not declared in this scope
... |
s308131864 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w;
cin >> h >> w;
vector<string> vec(h);
for(int i=0;i<h;i++)
cin >> vec[i];
bool a=true;
for(int i=0;i<h+w;i++){
int k=0;
for(int j=max(0,i-h);j<min(w,i);j++){
if(vec.at(j).at(i-j)=="#"){
k++;
if(k==2){
... | a.cc: In function 'int main()':
a.cc:14:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
14 | if(vec.at(j).at(i-j)=="#"){
| ~~~~~~~~~~~~~~~~~^~~~~
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int ma... |
s549867181 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int h,w;
cin >> h >> w;
char a[h][w];
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin >> a[i][j];
}
}
string ans="Possible"
for(int i=0;i<h-1;i++){
for(int j=1;j<w;j++){
if(a[i][j]=='#'... | a.cc: In function 'int main()':
a.cc:14:5: error: expected ',' or ';' before 'for'
14 | for(int i=0;i<h-1;i++){
| ^~~
a.cc:14:17: error: 'i' was not declared in this scope
14 | for(int i=0;i<h-1;i++){
| ^
|
s226750088 | p03937 | C++ | #include<bits/stdc++.h>
#define rep(i,N) for(int i=0;i<N;i++)
#define rep2(i,N) for(int i=1;i<=N;i++)
using namespace std;
long long INF=1e18;
long long mod=1e9+7;
char maze[10][10];
int main(){
int h,w;
cin>>h>>w;
int cnt=0;
rep(i,h)rep(k,w){cin>>maze[i][k];
if(maze[i][k]=='#')cnt++;
... | a.cc: In function 'int main()':
a.cc:53:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
53 | ans=false;
| ^~~
| abs
a.cc:61:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
61 | if(ans){
| ^~~
| abs
|
s721194654 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
#define dump(x) cout << (x) << '\n'
#define Int int64_t
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
Int INF = 1e18;
int inf = 1e9;
Int mod = 1e9+7;
int main() {
Int h, w;
cin >> h >> w;
char f[10][10] = {};
for (Int i = 0; i <... | a.cc: In function 'int main()':
a.cc:24:17: error: expected '}' before ')' token
24 | q.push({0, 0);
| ~ ^
|
s896047446 | p03937 | C++ | #[allow(unused_imports)]
use std::char::*;
#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::*;
use std::io::*;
use std::str::FromStr;
#[allow(unused_macros)]
macro_rules! debug {($($a:expr),*) => {println!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);}}
#[allow(unused_mac... | a.cc:1:2: error: invalid preprocessing directive #[
1 | #[allow(unused_imports)]
| ^
a.cc:3:2: error: invalid preprocessing directive #[
3 | #[allow(unused_imports)]
| ^
a.cc:5:2: error: invalid preprocessing directive #[
5 | #[allow(unused_imports)]
| ^
a.cc:10:2: error: invalid prepro... |
s246020258 | p03937 | C++ | #include "pch.h"
#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <stack>
#include<algorithm>
#include<sstream>
#include<iomanip>
#include<deque>
#include<list>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
con... | a.cc:1:10: fatal error: pch.h: No such file or directory
1 | #include "pch.h"
| ^~~~~~~
compilation terminated.
|
s133565709 | p03937 | C++ | #include<iosteram>
using namespace std;
int main(){
int H,W;
cin >> H >> W;
cout << H+W-1;
} | a.cc:1:9: fatal error: iosteram: No such file or directory
1 | #include<iosteram>
| ^~~~~~~~~~
compilation terminated.
|
s390073289 | p03937 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin >> H >> W;
int C = 0;
char c;
for (int i = 0; i < H * W; i++){
cin >> c;
if (c == '#') C++;
}
cout << (C = H + W - 1 ? "Possible" : "Impossible");
} | a.cc: In function 'int main()':
a.cc:12:26: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
12 | cout << (C = H + W - 1 ? "Possible" : "Impossible");
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| const char*
|
s940901428 | p03937 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
#define ll long long
using namespace std;
int main(){
int h,w;cin>>h>>w;
set<pair<int, int>> moved;
rep(y, h){
string s;cin>>s;
rep(x,w){
if(s[x]=='#')moved.insert(make_pair(y,x));
}
}
bool f=true;
rep(y, h){
rep... | a.cc: In function 'int main()':
a.cc:26:63: error: expected primary-expression before ')' token
26 | }else if( moved.count(make_pair(y,x)) && (u_l || d_r) ) ){
| ^
|
s366849605 | p03937 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); i++)
#define FOR(i, a, b) for(int (i) = a; (i) < (int)b; i++)
#define RREP(i, n) for(int (i)=((int)(n)-1); (i)>=0; i--)
#define RFOR(i, a, b) for(int (i) =((int)(b)-1); (i)>=(int)a; i--)
#define ALL(v) (v).begin(),(v).end()
#define MOD 100000... | a.cc: In function 'int main()':
a.cc:46:14: error: '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'st'; did you mean 'at'?
46 | if(s.at(0).st(0)=='.' || s.at(h-1).st(w-1... |
s591945187 | p03937 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < (int)n; ++i)
using namespace std;
int H, W;
bool dfs(int x, int y, vector<vector<int>> v) {
if (x == W - 1 && y == H - 1) return true;
if (x == W - 1) {
if (v[y + 1][x] == 1) return dfs(x, y + 1, v);
else return false;
}
i... | a.cc: In function 'bool dfs(int, int, std::vector<std::vector<int> >)':
a.cc:19:89: error: expected ';' before 'return'
19 | if ((v[y][x + 1] == 1 && v[y + 1][x] == 1) || (v[y][x + 1] == 0 && v[y + 1][x] == 0) return false;
| ... |
s604287803 | p03937 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); i++)
#define FOR(i, a, b) for(int (i) = a; (i) < (int)b; i++)
#define RREP(i, n) for(int (i)=((int)(n)-1); (i)>=0; i--)
#define RFOR(i, a, b) for(int (i) =((int)(b)-1); (i)>=(int)a; i--)
#define ALL(v) (v).begin(),(v).end()
#define MOD 100000... | a.cc: In function 'int main()':
a.cc:33:35: error: no matching function for call to 'std::vector<int>::vector(int&, std::vector<int>)'
33 | vector<int> vec(h,vector<int>(w)) ;
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/... |
s610545484 | p03937 | C++ | #include "cstdio"
int i,j,n,m,ss,sss;
int main(){
scanf("%d%d",&n,&m);
for(i=1;i<=n;i++){
getchar();
for(j=1;j<=m;j++){
char c=getchar();
if(c=='#')ss++;
}
}
if(ss!=n+m-1)printf("Impossible\n");
else printf("Possible\n");
returnn 0;
} | a.cc: In function 'int main()':
a.cc:14:9: error: 'returnn' was not declared in this scope
14 | returnn 0;
| ^~~~~~~
|
s965790944 | 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 'int main()':
a.cc:29:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
29 | gets(kk);
| ^~~~
| getw
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.