submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s513635323 | p03912 | C++ | #include <iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<limits>
#include<string.h>
#include<vector>
#include<stack>
#include<queue>
using namespace std;
int main()
{
int n,m;
cin>>n>>m;
int k=0;
int x[100100];
for(int i=0;i<n;i++){
cin>>x[i];
}
int y[100100... | a.cc: In lambda function:
a.cc:44:22: error: expected '{' before ';' token
44 | k=[i];
| ^
a.cc: In function 'int main()':
a.cc:44:19: error: cannot convert 'main()::<lambda()>' to 'int' in assignment
44 | k=[i];
| ^~~
| ... |
s873987182 | p03912 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina c... | a.cc: In function 'int main()':
a.cc:49:10: error: 'i' was not declared in this scope
49 | if(c[i].first == c[i + 1].first){
| ^
|
s275672991 | p03912 | C++ | #include <iostream>
#include <algorithm>
#include <numeric>
#include <vector>
#include <set>
using namespace std;
typedef long long int ll;
int main(){
int n,m; cin >> n >> m;
vector<int> v[m];
vector<int> x(n);
for(int i=0;i<n;i++){
cin >> x[i];
}
sort(x.begin()、x.end());
for(int i = 0; i <n; i ++){
v [x [... | a.cc:16:17: error: extended character 、 is not valid in an identifier
16 | sort(x.begin()、x.end());
| ^
a.cc:27:36: error: extended character 、 is not valid in an identifier
27 | swap(v [i]、v [mi]);
| ^
a.cc:40:25: erro... |
s877631849 | p03912 | C++ | 15 10
1 5 6 10 11 11 11 20 21 25 25 26 99 99 99 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 15 10
| ^~
|
s174903351 | p03912 | C++ | constexpr int MAX_SIZE = 1e5 + 1;
std::vector<int> A;
std::vector<int> Count(MAX_SIZE, 0);
int main(void){
int n, m; scanf("%d%d", &n, &m);
A.resize(m, 0);
REP(i, n) {
int a; scanf("%d", &a);
A[a % m]++;
Count[a]++;
}
REP(x, MAX_SIZE) A[x % m] += (Count[x] >> 1);
// x個あ... | a.cc:2:6: error: 'vector' in namespace 'std' does not name a template type
2 | std::vector<int> A;
| ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
+++ |+#include <vector>
1 | constexpr int MAX_SIZE = 1e5 + 1;
a.cc:3:6: e... |
s860768644 | p03912 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(int argc, char* argv[]){
int n,m; cin >> n >> m;
vector<vector<int>> x(m, vector<int>(0));
for(int i = 0; i < n ; i++){
int a; cin >> a;
if(a % m == 0) x[0].push_back(a);
else x[a%m].push_back(a);
}
int ans = 0;
for(int i = 0; i ... | a.cc: In function 'int main(int, char**)':
a.cc:29:7: error: 'sort' was not declared in this scope; did you mean 'short'?
29 | sort(x[a].begin(), x[a].end());
| ^~~~
| short
|
s954017194 | p03912 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<(n);i++)
signed main(){
int n,m;cin>>n>>m;
vector<int>x(n);
for(auto&& u:x)cin>>u;
map<int,vector<int>> div;
for(auto&& u:x)div[u%m].push_back(u);
int ret=0;
ret+=div[0].size()/2;
if(m%2==0)ret+=div[m/2].size()/2... | a.cc: In function 'int main()':
a.cc:22:43: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
22 | for(auto&& u:div[y])div[u]++;
|
s126963310 | p03912 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<(n);i++)
signed main(){
int n,m;cin>>n>>m;
vector<int>x(n);
for(auto&& u:x)cin>>u;
map<int,vector<int>> div;
for(auto&& u:x)div[u%m].push_back(u);
int ret=0;
ret+=div[0].size()/2;
if(m%2==0)ret+=div[m/2].size()/2... | a.cc: In function 'int main()':
a.cc:22:55: error: expected ')' before ';' token
22 | sort(begin(div[y]),end(div[y]);
| ~ ^
| )
|
s939054158 | p03912 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<(n);i++)
signed main(){
int n,m;cin>>n>>m;
vector<int>x(n);
for(auto&& u:x)cin>>u;
map<int,vector<int>> div;
for(auto&& u:x)div[u%m].push_back(u);
int ret=0;
ret+=div[0].size()/2;
if(m%2==0)ret+=div[m/2].size()/2... | a.cc: In function 'int main()':
a.cc:22:50: error: expected ')' before '{' token
22 | if(div[y][j]==div[y][j+1]{pr++;j++;}
| ~ ^
| )
a.cc:23:17: error: expected primary-expression befor... |
s460403812 | p03912 | C++ | #define _UsecondE_MATH_DEfirstINEsecond
#define _CRT_secondECURE_NO_WARNINGsecond
#include <bits/stdc++.h>
using namespace std;
/*BigInteger
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/rational.hpp>
namespace xxx = boost::multiprecision;
using Bint = xx... | a.cc:43:28: error: conflicting declaration 'typedef long long unsigned int uint'
43 | typedef unsigned long long uint;
| ^~~~
In file included from /usr/include/stdlib.h:514,
from /usr/include/c++/14/cstdlib:79,
from /usr/include/x86_64-linux-gnu/c++... |
s310342034 | p03912 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <algorithm>
int main() {
long long n, m, t, ret = 0;
std::cin >> n >> m;
std::vector<std::map<long long, long long>> x(m);
for (auto i = 0ll; i < n; i++) {
std::cin >> t;
x[t % m][t]++;
}
auto bo = [](auto acc, auto&... | a.cc: In function 'int main()':
a.cc:17:17: error: 'accumulate' is not a member of 'std'
17 | ret += std::accumulate(x[0].begin(), x[0].end(), 0ll, bo) / 2;
| ^~~~~~~~~~
a.cc:18:33: error: 'accumulate' is not a member of 'std'
18 | if (m % 2 == 0) ret += std::accumulate(x[m / 2].begi... |
s632612219 | p03912 | C++ | #include<iostream>
#include<vector>
#include<iomanip>
#include<algorithm>
#include<numeric>
#include<cmath>
#include<queue>
#include<set>
#include<map>
#include"basic.cpp"
using namespace std;
using ulong = unsigned long;
using ll = long long;
const int M = 1e9 + 7;
#pragma unused(M)
int main(){
int n, m;
cin ... | a.cc:10:9: fatal error: basic.cpp: No such file or directory
10 | #include"basic.cpp"
| ^~~~~~~~~~~
compilation terminated.
|
s129787967 | p03912 | C++ | #include<iostream>
#include<map>
#include<vector>
int main(){
int n,m;
std::cin >> n >> m;
std::vector<int> x(n);
std::map<int,std::map<int,int> > units;
std::map<int,std::map<int,int> > buf;
std::vector<int> oddExist(m);
for(int i=0;i<n;i++){
std::cin >> x[i];
if(buf[x[i]%m].find(x[i])==buf[x[i]... | a.cc: In function 'int main()':
a.cc:131:32: error: no match for 'operator+' (operand types are 'std::map<int, int>::iterator' {aka 'std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int> >, std::less<int>, std::allocator<std::pair<const int, int> > >::iterator'} and 'int')
131 | ... |
s864383187 | p03912 | C++ | #include<iostream>
#include<vector>
#include<iomanip>
#include<algorithm>
#include<numeric>
#include<cmath>
#include<queue>
#include<set>
#include<map>
using namespace std;
using ulong = unsigned long;
using ll = long long;
const int M = 1e9 + 7;
#pragma unused(M)
#include"basic.cpp"
int main(){
int n, m;
cin ... | a.cc:15:9: fatal error: basic.cpp: No such file or directory
15 | #include"basic.cpp"
| ^~~~~~~~~~~
compilation terminated.
|
s900504467 | p03912 | C++ | #include <algorithm>
#include <bitset>
#include <cstdio>
#include <cassert>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
constex... | a.cc:21:19: error: declaration does not declare anything [-fpermissive]
21 | typedef long long int;
| ^~~
|
s214134686 | p03912 | C++ | 15 10
1 5 6 10 11 11 11 20 21 25 25 26 99 99 99 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 15 10
| ^~
|
s517360182 | p03912 | C++ | /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author RiaD
*/
#include <iostream>
#include <fstream>
#include <iostream>
#include <iterator>
#include <string>
#include <stdexcept>
#ifndef SPCPPL_ASSERT
#ifdef SPCPPL_DEBUG
#define SPCPPL_ASSERT(condition) \
if(!... | a.cc:47:36: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
47 | class IntegerIterator: public std::iterator<std::input_iterator_tag, T, std::ptrdiff_t, T*, T> {
| ... |
s366932851 | p03913 | C++ | #include<bits/stdc++.h>
//using namespace std;
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define rep(i,j,n) for(ll i=(ll)(j);i<(ll)(n);i++)
#define REP(i,j,n) for(ll i=(ll)(j);i<=(ll)(n);i++)
#d... | a.cc:309:8: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
309 | ll mem[2e6][45];
| ^~~
a.cc:309:8: error: could not convert '2.0e+6' from 'double' to 'long unsigned int'
309 | ll mem[2e6][45];
| ^~~
| |
| double
a.cc:309... |
s065336525 | p03913 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
... | a.cc: In function 'int main()':
a.cc:34:29: error: no matching function for call to 'min(long long int&, double)'
34 | for (int x = 2; x <= min(n, 2e6); x++) {
| ~~~^~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_c... |
s290710528 | p03913 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t n, a;
cin >> n >> a;
int64_t ans = n;
auto Solve = [&](int k) {
if (1.0 * (k - 1) * a > ans) return n;
int64_t res = (k - 1) * a;
int64_t d = 2;
while (true) {
double f = 1.0;
int... | a.cc: In lambda function:
a.cc:30:40: error: inconsistent types 'long long int' and 'long int' deduced for lambda return type
30 | if (i == cd.size()) return n;
| ^
a.cc:38:20: error: inconsistent types 'long long int' and 'long int' deduced for lambda return ... |
s087748893 | p03913 | C++ | #include <bits/stdc++.h>
using namespace std;
using lint = long long;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;
template<class T> struct ConvexHullTrick {
struct Line { T a, b; };
deque<Line> deq;
bool monotone_query;
bool need(const Line& l, const Line& m, cons... | a.cc: In function 'int main()':
a.cc:55:20: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&, __int128)'
55 | dp[x] = max(dp[x], cht.max(x));
| ~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/... |
s752262816 | p03913 | C++ | #include <cstdio>
#include <cmath>
typedef long long signed int LL;
typedef long long unsigned int LU;
#define incID(i, l, r) for(int i = (l) ; i < (r); i++)
#define incII(i, l, r) for(int i = (l) ; i <= (r); i++)
#define decID(i, l, r) for(int i = (r) - 1; i >= (l); i--)
#define decII(i, l, r) for(int i = (... | a.cc: In function 'int main()':
a.cc:42:28: error: 's' was not declared in this scope
42 | if(s * j >= n) { break; }
| ^
|
s399433697 | p03913 | C++ | #include <cstdio>
#include <cmath>
typedef long long signed int LL;
typedef long long unsigned int LU;
#define incID(i, l, r) for(int i = (l) ; i < (r); i++)
#define incII(i, l, r) for(int i = (l) ; i <= (r); i++)
#define decID(i, l, r) for(int i = (r) - 1; i >= (l); i--)
#define decII(i, l, r) for(int i = (... | a.cc: In function 'int main()':
a.cc:41:31: error: no matching function for call to 'setmin(int&, LL)'
41 | setmin(dp[s * j], i + a + j);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~
a.cc:23:27: note: candidate: 'template<class T> bool setmin(T&, T)'
23 | template<typename ... |
s319575716 | p03913 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i,n) for(int i = 0; i < (int)(n); ++i)
#define DEBUG(x) cerr << #x << " = " << x << endl
const int INF = (int)1e18;
vector<int> div(int n) {
vector<int> ret;
for(int i = 1; i * i <= n; ++i) {
if(n % i == 0) {
ret.push_back(i);... | a.cc: In function 'int main()':
a.cc:78:39: error: no matching function for call to 'max(long long int&, int)'
78 | if(p.d + A + (N + p.x - 1) / max(p.x, 1) <= ans) {
| ~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/includ... |
s770488400 | p03913 | C++ | #include <algorithm>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define SREP(s,i,m) for(unsigned int i = s; i < m; ++i)
#define REP(i,m) SREP(0,i,m)
using namespace std;
#ifdef _MSC_... | a.cc: In function 'int main()':
a.cc:30:10: error: 'ULLONG_MAX' was not declared in this scope
30 | D[1] = ULLONG_MAX;
| ^~~~~~~~~~
a.cc:10:1: note: 'ULLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
9 | #include <stack>
+++ |+#include <climi... |
s318858138 | p03913 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll inf = numeric_limits<ll>::max() / 2;
ll dp[1000100];
int main(void){
fill(dp,dp+1000100,inf);
dp[1] = 0;
ll n,a;
cin >> n >> a;
if(n > pow(10,6)) return 0;
for(ll i = 1;i <= n;++i){
ll j = 1;
while(i*j <= n){
dp[i*j]... | a.cc: In function 'int main()':
a.cc:25:14: error: no matching function for call to 'min(ll&)'
25 | cout << min(res) << endl;
| ~~~^~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:... |
s067117268 | p03913 | C++ | #include <iostream>
using namespace std;
int main(void)
{
long long int N, A;
cin >> N >> A;
long long int dp[40];
dp[0] = 0;
for (long long int i = 1; i < 40; i++) {
dp[i] = LONG_MAX;
for (int j = 0; j < i; j++)
dp[i] = min(dp[i], dp[j] + (1L << (i - j)) + A);
... | a.cc: In function 'int main()':
a.cc:13:17: error: 'LONG_MAX' was not declared in this scope
13 | dp[i] = LONG_MAX;
| ^~~~~~~~
a.cc:2:1: note: 'LONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
1 | #include <iostream>
+++ |+#includ... |
s063179610 | p03913 | C++ | #include <bits/stdc++.h>
using namespace std;
//int dp[2][1000010];
//vector<int> dp1(1000010);
//vector<int> dp2(1000010);
//vector<int> dp3(1000010);
int main(){
long long int N,A;
cin>>N>>A;
//cout<<m[make_pair(1,1)]<<endl;
if(N <= A){
cout<<N<<endl;
return 0;
}
if(N >= 1000010 || A >= 1000010){
retur... | a.cc: In function 'int main()':
a.cc:33:32: error: expected primary-expression before ';' token
33 | for(long long int i=A;;;i++){
| ^
a.cc:33:32: error: expected ')' before ';' token
33 | for(long long int i=A;;;i++){
| ~ ^
... |
s207385674 | p03913 | C++ | #include <string>
#include <queue>
#include <stack>
#include <vector>
#include <sstream>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <list>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <climits>
#include <bitset>
#incl... | In file included from /usr/include/c++/14/cassert:44,
from a.cc:21:
a.cc: In function 'bool check(long long int, long long int, long long int)':
a.cc:62:38: error: no matching function for call to 'isinf<double>(double&)'
62 | assert(!isinf<double>(exper));
| ... |
s962218879 | p03913 | C++ | #pragma GCC optimize("O3")
#pragma GCC target("sse4.2")
#include <vector>
#include <queue>
#include <unordered_map>
#include <tuple>
#include <cstdio>
#include <cmath>
using namespace std;
namespace std{
template<typename T>
inline void hash_combine(size_t& seed, T const& v){
seed ^= hash<T>()(v) + 0x9e3779b9 +... | a.cc: In function 'int main()':
a.cc:50:28: error: 'class std::queue<std::tuple<long long int, long long int, long long int> >' has no member named 'top'; did you mean 'pop'?
50 | auto cur=q.top();q.pop();
| ^~~
| pop
|
s962580653 | p03913 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
ll n,a;cin>>n>>a;
if(n>DEBUG||a>DEBUG||n<=a) {
cout << n << endl;
return 0;
}
ll i,j,k=0,l,ans=n;
for(i=1;i<=n;i*=2){
for(l=1;l<=a;l++){
j=l*i;
ans=min(ans,l+k*(1+a)+(n-1)/j+1);
}
k++;
}
cout << ... | a.cc: In function 'int main()':
a.cc:6:8: error: 'DEBUG' was not declared in this scope
6 | if(n>DEBUG||a>DEBUG||n<=a) {
| ^~~~~
|
s137374937 | p03913 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
template< class T >
struct ConvexHullTrick
{
struct Fraction
{
T a, b;
Fraction(T a, T b) : a(a), b(b)
{
if(b < 0) a *= -1, b *= -1;
}
bool operator<(const Fraction &r) const
{
return a * r.b < r.a * b;
}... | a.cc: In function 'int main()':
a.cc:112:3: error: 'dp1' was not declared in this scope
112 | dp1[0] = 0;
| ^~~
a.cc:114:3: error: 'dp2' was not declared in this scope; did you mean 'dup2'?
114 | dp2[1] = 1;
| ^~~
| dup2
|
s395389129 | p03913 | C++ | #include<iostream>
#include<cstdio>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<algorithm>
#include<complex>
#include<string>
#include<cstring>
using namespace std;
#define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++)
#define rep(x,to) rep2(x,0,to)
#define INF 100000000
#define debug(x) ... | a.cc: In function 'int main()':
a.cc:26:59: error: expected primary-expression before ')' token
26 | rep2(i,2,max((int)(sqrt(n))+1,(int)(sqrt(n))*2+1)))
| ^
|
s283965330 | p03913 | C++ | #include<iostream>
#include<cstdio>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<algorithm>
#include<complex>
#include<string>
#include<cstring>
using namespace std;
#define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++)
#define rep(x,to) rep2(x,0,to)
#define INF 100000000
#define debug(x) ... | a.cc: In function 'int main()':
a.cc:26:59: error: expected primary-expression before ')' token
26 | rep2(i,2,max((int)(sqrt(n))+1,(int)(sqrt(n))*2+1)))
| ^
|
s934855304 | p03913 | C++ | #include<stdio.h>
#include<algorithm>
#include<map>
using namespace std;
map<long long,long long>dp;
long long A;
long long calc(long long N){
if(N<=A)return N;
if(dp.count(N)){
return dp[N];
}
long long ret=N;
for(long long i=max(2,sqrt(A)-10);i*i<=N;i++){
ret=min(ret,i+A+calc((N+i-1)/i));
}
return dp[N]=re... | a.cc: In function 'long long int calc(long long int)':
a.cc:13:31: error: 'sqrt' was not declared in this scope
13 | for(long long i=max(2,sqrt(A)-10);i*i<=N;i++){
| ^~~~
|
s484110250 | p03913 | C++ | #include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <set>
#include <bitset>
#include <map>
#include <deque>
#include <string>
#include <algorithm>
#include <numeric>
#include <cstdio>
#include <cassert>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cmath>
#define ... | a.cc: In function 'int main()':
a.cc:74:16: error: no matching function for call to 'max(int, int64)'
74 | cout << max(0, dp[len(dv) - 1] - a) << endl;
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classe... |
s456844757 | p03913 | C++ | #pragma GCC optimize("O3")
#pragma GCC target("sse4.2")
#include <vector>
#include <queue>
#include <map>
#include <tuple>
#include <cstdio>
using namespace std;
int main(){
long long N,A,R;
scanf("%lld%lld",&N,&A);R=N;
if(N>1000000)return 1;
if(N>10000)R=sqrt(R);
map<pair<long long,long long>,long long>m; //m<... | a.cc: In function 'int main()':
a.cc:15:22: error: 'sqrt' was not declared in this scope
15 | if(N>10000)R=sqrt(R);
| ^~~~
|
s157953289 | p03914 | C++ | 瞬殺(昔見たことが有った) | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | 瞬殺(昔見たことが有った)
| ^
|
s127281863 | p03914 | C++ | #include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/trie_policy.hpp>
#define pb push_back
#define mp make_pair
#define taskname "A"
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> ii;
typedef tree <int,null_type,les... | a.cc:63:11: error: redefinition of 'const int maxn'
63 | const int maxn = 3e2 + 5;
| ^~~~
a.cc:17:11: note: 'const int maxn' previously defined here
17 | const int maxn = 3e2 + 5;
| ^~~~
a.cc:64:11: error: redefinition of 'const int mod'
64 | const int mod = 1e9 + 7;
| ... |
s070857292 | p03914 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
class mint{
static const int MOD=1e9+7;
int x;
public:
mint():x(0){}
mint(long long y){ x=y%MOD; if(x<0) x+=MOD; }
mint& operator+=(const mint& m){ x+=m.x; if(x>=MOD) x-=MOD; return *this; }
mint& operator-=(const mint& m){ ... | a.cc: In function 'int main()':
a.cc:50:22: error: 'curr' was not declared in this scope; did you mean 'cur'?
50 | swap(curr,next);
| ^~~~
| cur
a.cc:52:26: error: 'curr' was not declared in this scope; did you mean 'cur'?
52 | printf("... |
s626141972 | p03914 | C++ | #include <bits/stdc++.h>
using namespace std;
int n, m;
int memo[310][310][310];
const int MOD 1000000007
long long dp(int i, int ma, int all){
if(i == m) return ma == n ? 1 : 0;
if(memo[i][ma][all] != -1) return memo[i][ma][all];
return memo[i][ma][all] = (dp(i+1, all, all)*ma%MOD + dp(i+1, ma, all)*(al... | a.cc:6:15: error: expected initializer before numeric constant
6 | const int MOD 1000000007
| ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:18:13: error: 'dp' was not declared in this scope; did you mean 'dup'?
18 | cout << dp(0, 1, 1) << endl;
| ^~
| ... |
s275785303 | p03914 | C++ | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <sstream>
#include <functional>
#include <map>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <li... | a.cc:44:4: error: conflicting declaration 'll mod'
44 | ll mod = 1e9+7;
| ^~~
a.cc:27:10: note: previous declaration as 'const ll mod'
27 | const ll mod = 1e9+7;
| ^~~
a.cc: In function 'int main()':
a.cc:48:14: error: invalid types 'll {aka long long int}[int]' for array subscript
48 |... |
s648803580 | p03915 | C++ | #include <iostream>
#include <cctype>
#include <cstdio>
#include <cstring>
using namespace std;
#define M 800005
#define ll long long
int n, q, tot;
int fa[M];
ll ans, d[M];
struct Edge
{ int u, v; ll w; } e[M];
inline int read()
{
int x = 0, f = 1; char ch = getchar();
while (!isdigit(ch)) { if (ch == '-') f = ... | a.cc: In function 'void kruscal()':
a.cc:34:9: error: 'sort' was not declared in this scope; did you mean 'short'?
34 | sort(e + 1, e + 1 + tot, cmp1);
| ^~~~
| short
|
s621820962 | p03915 | C++ | #include <bits/stdc++.h>
#define MAXN 210000
#define ll long long
#define INF (1<<30)
using namespace std;
ll n,q;
struct data{
ll u,v,w;
}line[MAXN*2];
ll link[MAXN*2];
inline ll read(){
ll x=0,f=1;
char ch=getchar();
while(ch<'0'||ch>'9'){
if(ch=='-')
f=-1;
ch=getchar();
... | a.cc:10:15: error: 'long long int link [420000]' redeclared as different kind of entity
10 | ll link[MAXN*2];
| ^
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from /usr/include/c++/14/csignal:42,
... |
s326694418 | p03915 | C++ | #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 <random>
#include... | a.cc: In function 'int main()':
a.cc:78:49: error: 'j' was not declared in this scope
78 | edges.push_back(make_tuple(gogo[j], (j + n - 1) % n, j));
| ^
|
s999844610 | p03915 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef int ll;
typedef long long int li;
const ll MAXN=4e5+51;
struct Edge{
ll from,to;
li dist;
inline bool operator <(const Edge &rhs)const
{
return this->dist<rhs.dist;
}
};
Edge ed[MAXN];
ll nc,cnt,x,y,z,tot;
li dist[MAXN],boss[MAXN];
inline ll read()
{
regis... | a.cc: In function 'll read()':
a.cc:19:17: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
19 | register ll num=0,neg=1;
| ^~~
a.cc:19:23: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
19 | register ll num=0,neg=1;... |
s440963863 | p03915 | C++ | #include<bits/stdc++.h>
using namespace std;
namespace IO
{
char ibuf[(1<<21)+1],obuf[(1<<21)+1],st[15],*iS,*iT,*oS=obuf,*oT=obuf+(1<<21);
inline char Get()
{
return (iS==iT? (iT=(iS=ibuf)+fread(ibuf,1,(1<<21)+1,stdin),(iS==iT? EOF:*iS++)):*iS++);
}
inline void Flush()
{
fwrite(obuf,1,oS-... | a.cc: In function 'int IO::read()':
a.cc:23:30: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
23 | register int x=0;
| ^
a.cc:24:31: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
24 | ... |
s685524580 | p03915 | C++ | #include <iostream>
#include <vector>
using namespace std;
struct jh {
vector <int> num;
jh (int n) :num(n) {
for (int i=0;i<n;i++) num[i]=i;
}
int zhao (int x) {
if (num[x]==x) return x;
return num[x]=zhao(num[x]);
}
bool jiehe (int x,int y) {
x=zhao(x); y=zhao(y... | a.cc: In function 'int main()':
a.cc:42:5: error: 'sort' was not declared in this scope; did you mean 'short'?
42 | sort(bian_new.begin(),bian_new.end());
| ^~~~
| short
|
s466120740 | p03915 | C++ | #include <iostream>
#include <vector>
using namespace std;
struct jh {
vector <int> num;
jh (int n) :num(n) {
for (int i=0;i<n;i++) num[i]=i;
}
int zhao (int x) {
if (num[x]==x) return x;
return num[x]=zhao(num[x]);
}
bool jh (int x,int y) {
x=zhao(x); y=zhao(y);
... | a.cc:13:5: error: return type specification for constructor invalid
13 | bool jh (int x,int y) {
| ^~~~
a.cc: In constructor 'jh::jh(int, int)':
a.cc:15:26: error: returning a value from a constructor
15 | if (x==y) return false;
| ^~~~~
a.cc:17:16: error: retu... |
s759772909 | p03915 | C++ | #include <iostream>
#include <vector>
using namespace std;
struct jh {
vector <int> num;
jh (int n) :num(n) {
for (int i=0;i<n;i++) num[i]=i;
}
int zhao (int x) {
if (num[x]==x) return x;
return num[x]=zhao(num[x]);
}
bool jh (int x,int y) {
x=zhao(x); y=zhao(y);
... | a.cc:13:5: error: return type specification for constructor invalid
13 | bool jh (int x,int y) {
| ^~~~
a.cc: In constructor 'jh::jh(int, int)':
a.cc:15:26: error: returning a value from a constructor
15 | if (x==y) return false;
| ^~~~~
a.cc:17:16: error: retu... |
s751887803 | p03915 | C++ | #include<cstdio>
#include<algorithm>
#include<cstring>
#define ll long long
struct r{
int u,v,w;
}e[400050];
int w[200050],fa[200050],cnt,n,m;
ll ans;
int get_fa(int u){return fa[u]==u ? u:fa[u]=get_fa(fa[u]);}
bool cmp(r a,r b){return a.w<b.w;}
int main(){
scanf("%d%d",&n,&m);
memset(w,127,sizeof w);
for (int i=1... | a.cc: In function 'int main()':
a.cc:27:22: error: 'u' was not declared in this scope
27 | if ((u=get_fa(e[i].u))==(v=get_fa(e[i].v))) continue;
| ^
a.cc:27:42: error: 'v' was not declared in this scope
27 | if ((u=get_fa(e[i].u))==(v=get_fa(e[i].v))) con... |
s312071034 | p03915 | C++ | #include<iostream>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<ctime>
#define md double
#define LL long long
using namespace std;
const int N=5e5;
int gi() {
int w=0;bool q=1;char c=getchar();
while ((c<'0'||c>'9') && c!='-') c=getchar();
if (c=='-') q=0,c=getcha... | a.cc: In function 'void add(int, int)':
a.cc:21:45: error: reference to 'next' is ambiguous
21 | inline void add(int k,int _w) { w[++tot]=_w,next[tot]=head[k],head[k]=tot; }
| ^~~~
In file included from /usr/include/c++/14/string:47,
from /usr/includ... |
s009718307 | p03915 | C++ | #include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstdio>
#include<vector>
#include<cctype>
#include<cstdlib>
#include<cstring>
#include<utility>
#include<algorithm>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define For(i,x,y) for(int i=((int)x);i<=((int)y);i++)
#d... | a.cc: In function 'int main()':
a.cc:122:1: error: 'cout' was not declared in this scope
122 | cout<<Ans<<endl;
| ^~~~
a.cc:12:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
11 | #include<algorithm>
+++ |+#include <iostream>
12 |
a.cc:12... |
s285891925 | p03917 | C++ | #include <iostream>
#include <algorithm>
#include <map>
#include <utility>
#define llint long long
#define mod 1000000007
using namespace std;
typedef pair<llint, llint> P;
struct UnionFind{
int size;
vector<int> parent;
UnionFind(){}
UnionFind(int size){
this->size = size;
parent.resize(size+1);
init();
... | a.cc:13:9: error: 'vector' does not name a type
13 | vector<int> parent;
| ^~~~~~
a.cc: In constructor 'UnionFind::UnionFind(int)':
a.cc:18:17: error: 'parent' was not declared in this scope
18 | parent.resize(size+1);
| ^~~~~~
a.cc: In member function '... |
s145666751 | p03917 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << x << endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
using... | a.cc: In function 'int main()':
a.cc:85:10: error: incompatible types in assignment of 'll' {aka 'long long int'} to 'int [5]'
85 | f=x;
| ~^~
a.cc:88:10: error: incompatible types in assignment of 'll' {aka 'long long int'} to 'int [5]'
88 | f+=x;
| ~^~~
a.cc:89:10: er... |
s011272783 | p03918 | C++ | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define N 333
int n;
int U[N], L[N], R[N], D[N];
int row[N], col[N];
bool a[N][N];
char wc[N*N]; int wn[N*N];
#define P 1000000007
typedef long long ll;
set<ll> A;
bool gg() {
ll S = 0;
fo... | a.cc: In function 'int main()':
a.cc:105:18: error: too few arguments to function 'void ff(int)'
105 | if (F) ff();
| ~~^~
a.cc:33:6: note: declared here
33 | void ff(int t) {
| ^~
|
s229221628 | p03919 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int H,W;
cin >> H >> W;
vector<vector<string>> S(H,vector<string>(W));
for (int i = 0; i < H; i++){
for (int j = 0; j < W; j++){
cin >> S.at(i).at(j);
if (S.at(i).at(j) == "snuke"){
cout << (char)("A" + i) << i + 1 << endl;
... | a.cc: In function 'int main()':
a.cc:12:17: error: cast from 'const char*' to 'char' loses precision [-fpermissive]
12 | cout << (char)("A" + i) << i + 1 << endl;
| ^~~~~~~~~~~~~~~
|
s670313281 | p03919 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<vector<int>> data(h, vector<int>(w));
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
cin >> data.at(i).at(j);
}
}
int a, b;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {... | a.cc: In function 'int main()':
a.cc:16:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
16 | if (data.at(i).at(j) == "snuke") {
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~
|
s130187091 | p03919 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<vector<int>> data(h, vector(w));
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
cin >> data.at(i).at(j);
}
}
int a, b;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
... | a.cc: In function 'int main()':
a.cc:7:39: error: class template argument deduction failed:
7 | vector<vector<int>> data(h, vector(w));
| ^
a.cc:7:39: error: no matching function for call to 'vector(int&)'
In file included from /usr/include/c++/14/vector:66,
... |
s638419820 | p03919 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<vector<int>> data(h, vector(w));
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
cin >> data.at(i).at(j);
}
}
int a, b;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
... | a.cc: In function 'int main()':
a.cc:7:39: error: class template argument deduction failed:
7 | vector<vector<int>> data(h, vector(w));
| ^
a.cc:7:39: error: no matching function for call to 'vector(int&)'
In file included from /usr/include/c++/14/vector:66,
... |
s457190320 | p03919 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int h,w,u=1;
cin >> h >> w;
string s[h][w];
char t='A';
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin >> s[i][j];
if(s[i][j]=="Snuke"){
cout << t << u << endl;
return 0;
}
t++;
}
u++;
}
}
| a.cc:12:22: error: extended character is not valid in an identifier
12 | cout << t << u << endl;
| ^
a.cc: In function 'int main()':
a.cc:12:22: error: 'u\U00003000' was not declared in this scope
12 | cout << t << u << endl;
| ^~~
|
s572575865 | p03919 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int h,w,u=1;
cin >> h >> w;
string s[h][w];
char t='A';
for(int i=0;i<n;i++){
for(int j=0;j<n;i++){
if(s[h][w]=="Snuke"){
cout << t << u;
return 0;
}
t++;
}
u++;
}
} | a.cc: In function 'int main()':
a.cc:8:17: error: 'n' was not declared in this scope
8 | for(int i=0;i<n;i++){
| ^
|
s315419861 | p03919 | C | #include <stdio.h>
int main(void){
int a,b,i,j,c=0;
scanf("%d%d",&a,&b);
char snuke[a+1][b*6+5];
for(i=0;i<a;i++){
scanf("%s",snuke[i]);
}
i=0;
while(c==0){
j=0;
while((c==0)&&(j<b*6-2)){
if(snuke[i][j]=='s'){
if(snuke[i][j+1]=='n'){
if(snuke[i][j+2]=='u'){
if(snuke[i][j+3]=='k'){
... | main.c: In function 'main':
main.c:28:23: error: 'A' undeclared (first use in this function)
28 | printf("%c%d",A+j/6-1,i);
| ^
main.c:28:23: note: each undeclared identifier is reported only once for each function it appears in
|
s247883055 | p03919 | C | #include <stdio.h>
int main(void){
int a,b,i,j,c=0;
scanf("%d%d",&a,&b);
char snuke[a+1][b*6+5]
for(i=0;i<a;i++){
scanf("%s",snuke[i]);
}
i=0;
while(c==0){
j=0;
while((c==0)&&(j<b*6-2)){
if(snuke[i][j]=='s'){
if(snuke[i][j+1]=='n'){
if(snuke[i][j+2]=='u'){
if(snuke[i][j+3]=='k'){
i... | main.c: In function 'main':
main.c:6:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
6 | for(i=0;i<a;i++){
| ^~~
main.c:7:28: error: 'snuke' undeclared (first use in this function)
7 | scanf("%s",snuke[i]);
| ^~~~~
ma... |
s895748718 | p03919 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int h,w;
cin >> h >> w;
vector<vector<string>> s(h,vector<string>(w,""));
int tt=-1,yk=-1;
for(int i = 0;i < h;i++)
{
for(int j = 0;j < w;j++)
{
cin >> s.at(i).at(j)
if(s.at(i).at(j) == "snuke")
{
tt = i;
yk = j;
break;
}
i... | a.cc: In function 'int main()':
a.cc:13:45: error: expected ';' before 'if'
13 | cin >> s.at(i).at(j)
| ^
| ;
14 | if(s.at(i).at(j) == "snuke")
| ... |
s221136952 | p03919 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
int main() {
int H, W; cin >> H >> W;
int i = 0; int j = 0;
string s;
while (i < H){
while(j < W){
cin >> s;
if (s ... | a.cc: In function 'int main()':
a.cc:15:16: error: expected primary-expression before '%' token
15 | printf(%c, 'A' + i);
| ^
a.cc:15:17: error: 'c' was not declared in this scope
15 | printf(%c, 'A' + i);
| ^
|
s501297440 | p03919 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
int main() {
int H, W; cin >> H >> W;
int i = 0; int j = 0;
string s;
while (i < H){
while(j < W){
cin >> s;
if (s ... | a.cc: In function 'int main()':
a.cc:21:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
21 | int main() {
| ^~
a.cc:21:9: note: remove parentheses to default-initialize a variable
21 | int main() {
| ^~
| --
a.cc:21:9: note: or ... |
s145824662 | p03919 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Main main = new Main();
main.solve();
}
public void solve() {
Scanner scan = new Scanner(new BufferedRead... | Main.java:28: error: cannot find symbol
sb.append((char)((int)'A'+j));
^
symbol: variable j
location: class Main
Main.java:29: error: cannot find symbol
sb.append(j);
^
symbol: variable j
location: class Main
2 errors
|
s899459744 | p03919 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int w,h,tmp;
string s;
cin >> w >> h;
for(int i=0; i<w*h; i++){
cin >> s;
if(s=="snuke"){
tmp = i;
break;
}
}
char x;
x = 64+(i+1)%h;
cout << x << 1+(i... | a.cc: In function 'int main()':
a.cc:16:15: error: 'i' was not declared in this scope
16 | x = 64+(i+1)%h;
| ^
|
s248916572 | p03919 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int w,h;
string s;
cin >> w >> h;
for(int i=0; i<w*h; i++){
cin >> s;
if(s=="snuke") break;
}
char x;
x = 64+(i+1)%h;
cout << x << 1+(i/h) << endl;
//cin >> n >> w >> h;
//cout << (n-w)*(n-h) << endl;
} | a.cc: In function 'int main()':
a.cc:13:11: error: 'i' was not declared in this scope
13 | x = 64+(i+1)%h;
| ^
|
s653017055 | p03919 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int h,w,x,y;
cin >> h >> w ;
vector<char>abc{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z};
vector<vector<string>> HW(h,vector<string>(w));
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
cin >> HW.at(i).at(j) ;
}
}
for(int i=0;i<h;i++){
for(int j=0;j<w;j++... | a.cc: In function 'int main()':
a.cc:7:17: error: 'A' was not declared in this scope
7 | vector<char>abc{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z};
| ^
a.cc:7:19: error: 'B' was not declared in this scope
7 | vector<char>abc{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z};
... |
s735249686 | p03919 | C++ | #include <iostream>
#include <algorithm>
#include <bits/stdc++.h>
using namespace std;
int main (){
long long int a,b;
char d,e;
string c[30][30];
cin >>a >>b ;
for(int i=0;i<=a;i++){
for(int j=0;j<b;j++)
cin >> c[i][j];
}
d ='A';
for(int i=0;i<=a;i++){
for(int j=0;j<b;j++)
... | a.cc:23:22: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
23 | if( c[i][j] == 'snuke'){
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:23:19: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} ... |
s565980551 | p03919 | C++ | #include <iostream>
#include <algorithm>
#include <bits/stdc++.h>
using namespace std;
int main (){
long long int a,b;
char c,d;
string c[30][30];
cin >>a >>b ;
for(int i=0;i<=a;i++){
for(int j=0;j<b;j++)
cin >> c[i][j];
}
c ='A';
for(char i=0;i<=a;i++){
for(int j=0;j<b;j++)
... | a.cc:23:22: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
23 | if( c[i][j] == 'snuke'){
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:11:10: error: conflicting declaration 'std::string c [30][30]'
11 | string c[30][30];
| ^
a.cc... |
s272263106 | p03919 | C++ | #include <iostream>
#include <algorithm>
#include <bits/stdc++.h>
using namespace std;
int main (){
long long int a,b;
string c[30][30];
cin >>a >>b ;
for(char i=A;i<=Z;i++){
for(int j=0;j<b;j++)
cin >> c[i][j];
}
for(char i=A;i<=Z;i++){
for(int j=0;j<b;j++)
if( c[i][j] ... | a.cc:22:22: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
22 | if( c[i][j] == 'snuke'){
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:14:14: error: 'A' was not declared in this scope
14 | for(char i=A;i<=Z;i++){
| ^
a.cc:14:... |
s843732689 | p03919 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W,h,w;
string s;
for (int i = 0; i < H*W; i++){
cin >> s;
if (s=="snuke") break;
}
h = i/H+1;
w = i-h*H+1;
char p = 'A';
p = p - 1 + w;
cout << p << h;
} | a.cc: In function 'int main()':
a.cc:10:7: error: 'i' was not declared in this scope
10 | h = i/H+1;
| ^
|
s095187536 | p03919 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
string alp="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
cin>>a>>b;
vector<vector<string>> s(a,vector<string> b);
for(int i=0;i<a;i++){
for(int j=0;j<b;j++){
cin>>s[i][j];
if(s[i][j]=="snuke"){
cout<<alp.at(j)<<i+1<<endl;
retu... | a.cc: In function 'int main()':
a.cc:8:45: error: expected primary-expression before 'b'
8 | vector<vector<string>> s(a,vector<string> b);
| ^
|
s810393027 | p03919 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
string alp="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
cin>>a>>b;
vector<vector<string>> s(a,vector<string> b);
for(int i=0;i<a;i++){
for(int j=0;j<b;j++)
cin>>s[i][j];
if(s[i][j]=="snuke"){
cout<<alp.at(j)<<i+1<<endl;
retur... | a.cc: In function 'int main()':
a.cc:8:45: error: expected primary-expression before 'b'
8 | vector<vector<string>> s(a,vector<string> b);
| ^
a.cc:12:15: error: 'j' was not declared in this scope
12 | if(s[i][j]=="snuke"){
| ^
a.cc: A... |
s117139440 | p03919 | C++ | #include<iostream>
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
using namespace std;
int main(){
int H,W;
cin>>H>>W;
FOR(i,0,H){
FOR(i,0,W){
string S;
cin>>S;
if(S=="snuke"){
char a=j+'A';
cout<<a<<i+1<<endl;
}
}
}
}
| a.cc: In function 'int main()':
a.cc:12:16: error: 'j' was not declared in this scope
12 | char a=j+'A';
| ^
|
s839172070 | p03919 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#define ll long long
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) FFOR(i,0,n)
#define SORT(V) sor... | a.cc: In function 'int main()':
a.cc:27:19: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
27 | string a=j+'A';
| ~^~~~
|
s473485757 | p03919 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#define ll long long
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) FFOR(i,0,n)
#define SORT(V) sor... | a.cc: In function 'int main()':
a.cc:26:14: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
26 | if(S[i][j]=="snuke") cout<<j+'A'<<i+1<<endl;
| ^
|
s812400171 | p03919 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(void){
int m,n;
cin >> m >> n;
vector<vector<string>>word(m,vector<string>(n));
for(int m=0;i<m;i++){
for(int j=0;j<n;j++){
cin >> word[i][j];
}
}
int a;
char b;
for(int i=;i<n;i++){
for(int j=0;j<n;j++){
... | a.cc: In function 'int main()':
a.cc:9:15: error: 'i' was not declared in this scope
9 | for(int m=0;i<m;i++){
| ^
a.cc:18:13: error: expected primary-expression before ';' token
18 | for(int i=;i<n;i++){
| ^
|
s664799746 | p03919 | C++ | [(print(chr(ord('A')+i)+str(h+1)),quit())for H,W in [map(int,input().split())]for h in range(H)for i,v in enumerate(input().split())if v=="snuke"] | a.cc:1:1: error: expected unqualified-id before '[' token
1 | [(print(chr(ord('A')+i)+str(h+1)),quit())for H,W in [map(int,input().split())]for h in range(H)for i,v in enumerate(input().split())if v=="snuke"]
| ^
|
s301512655 | p03919 | C++ | #include<iostream>
using namespace std;
int main(){
string s[26][26];
int a,b;
cin>>a>>b;
for(int i=0;i<a;i++){
for(int j=0;j<b;j++)cin>>s[i][j];
if(s[i][j]=="snuke")cout<<char(j+'A')<<i+1<<'\n';
}
} | a.cc: In function 'int main()':
a.cc:9:13: error: 'j' was not declared in this scope
9 | if(s[i][j]=="snuke")cout<<char(j+'A')<<i+1<<'\n';
| ^
|
s372569155 | p03919 | C | #include <stdio.h>
int main(){
int h,w;
char a[6];
scanf("%d%d",&h,&w);
for(int i=0;i<w;i++)for(int j=;j<h;j++){
scanf("%s",a);
if(a[2]=='u')printf("%c%d",'a'+i,1+j);
}
return 0;
} | main.c: In function 'main':
main.c:6:33: error: expected expression before ';' token
6 | for(int i=0;i<w;i++)for(int j=;j<h;j++){
| ^
|
s903957219 | p03919 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int x, y;
for (int i = 0; i < x; i++) {
for (int j = 0; j < y; j++) {
string a;
cin >> a;
if (a == "snuke") {
cout << (string)(i + 'A') << 1 + j;
return 0;
}
}
}
} | a.cc: In function 'int main()':
a.cc:10:33: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int)'
10 | cout << (string)(i + 'A') << 1 + j;
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/... |
s700975507 | p03919 | Java | import java.util.*;
public class Main {
static Scanner scanner = new Scanner(System.in);
public static void main(String[]$) {
int h = scanner.nextInt(), w = scanner.nextInt();
for (int i = 1; i <= w; i++) {
for (int j = 0; j < h; j++) {
if (scanner.nextInt().equals("snuke")) {
... | Main.java:10: error: int cannot be dereferenced
if (scanner.nextInt().equals("snuke")) {
^
1 error
|
s461103497 | p03919 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void)
{
char s[10][15][5];
int a,b;
for(int i=0;i<10;i++){
for(int j=0;j<15;j++){
for(int d=0;d<5;d++){
cin>>a[i][j][d];
if(a[i][j][2]=='u')
a=i;
b=j;
}
}
}
switch (a) {
case 0: cout<<'A'<<... | a.cc: In function 'int main()':
a.cc:11:15: error: invalid types 'int[int]' for array subscript
11 | cin>>a[i][j][d];
| ^
a.cc:12:13: error: invalid types 'int[int]' for array subscript
12 | if(a[i][j][2]=='u')
| ^
|
s228653688 | p03919 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void)
{
string snake[10][15];
int code1,code2;
for(int i=0;i<10;i++){
for(int j=0;j<15;j++){
if(snake[i][j]=="snuke"){
code1=i;
code2=j;
}
}
}
char line;
switch(code1){
case 0:cout<<A<<code2<<endl;break;
case ... | a.cc: In function 'int main()':
a.cc:18:18: error: 'A' was not declared in this scope
18 | case 0:cout<<A<<code2<<endl;break;
| ^
a.cc:19:18: error: 'B' was not declared in this scope
19 | case 1:cout<<B<<code2<<endl;break;
| ^
a.cc:20:18: error: 'C' was not d... |
s813467306 | p03919 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void)
{
char snake[10][15];
int code1,code2;
for(int i=0;i<10;i++){
for(int j=0;j<15;j++){
if(snake[i][j]=="snuke"){
code1=i;
code2=j;
}
}
}
char line;
switch(code1){
case 0:cout<<A<<code2<<endl;break;
case 1:... | a.cc: In function 'int main()':
a.cc:10:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
10 | if(snake[i][j]=="snuke"){
| ~~~~~~~~~~~^~~~~~~~~
a.cc:18:18: error: 'A' was not declared in this scope
18 | case 0:cout<<A<<code2<<endl;break;
| ... |
s506205277 | p03919 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int H,W,cnt=1;
char ans=65
string S;
cin >> H >> W;
for(int i=0;i<H*W;i++){
cin >> S;
if(S!="snuke")
cnt++;
if(cnt==W)
cnt=1,ans++;
if(S=="snuke")
cout << ans << cnt << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'string'
7 | string S;
| ^~~~~~
a.cc:10:12: error: 'S' was not declared in this scope
10 | cin >> S;
| ^
|
s025027961 | p03919 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
char c;
string d;
for(int i=i;i<a+1;i++){
for(int j=0;j<b;j++){
cin>>d;
if(d=="snuke"){
c='A'+j
cout<<c<<i<<endl;
}
}
}
} | a.cc: In function 'int main()':
a.cc:13:16: error: expected ';' before 'cout'
13 | c='A'+j
| ^
| ;
14 | cout<<c<<i<<endl;
| ~~~~
|
s512054566 | p03919 | C++ | #include<bits/stdc++.h>
using namespace std ;
int main () {
int a = 0 , b = 0 ;
int w , h ;
cin >> w >> h ;
for (int i = 0 ; i < w ; i++ ) {
for (int j = 0 ; j < h ; j++ ) {
string a ;
cin >> a ;
if ( a == "snuke" ) {
a = i ; b = j ;
}
}
}
vector<char> line ;
line ... | a.cc: In function 'int main()':
a.cc:19:19: error: 'i' was not declared in this scope
19 | cout << line.at(i-1) << j << endl ;
| ^
a.cc:19:27: error: 'j' was not declared in this scope
19 | cout << line.at(i-1) << j << endl ;
| ^
|
s897059352 | p03919 | C++ | #include<bits/stdc++.h>
using namespace std ;
int main () {
int a = 0 , b = 0 ;
int w , h ;
cin >> w >> h ;
for (int i = 0 ; i < w ; i++ ) {
for (int j = 0 ; j < h ; j++ ) {
string a ;
cin >> a ;
if ( a == "snuke" ) {
a = i ; b = j ;
}
}
}
vector<char> line ;
line ... | a.cc: In function 'int main()':
a.cc:18:115: error: expected ';' before 'cout'
18 | line = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'}
| ... |
s059515929 | p03919 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int h, w;
string s;
int ansi, ansj;
cin >> h >> w;
for ( int i = 0; i < h; i++ ){
for ( int j = 0; j < w; j++){
cin >> s;
if ( s == "snuke" ){
ansi = i;
ansj = j;
}
}
}
char c = 'A' + ansj
... | a.cc: In function 'int main()':
a.cc:21:3: error: expected ',' or ';' before 'cout'
21 | cout << c << ansi + 1 << endl;
| ^~~~
|
s948524265 | p03919 | C++ | #include <stdio.h>
#include <string>
#include <iostream>
#include <map>
#include <algorithm>
using namespace std;
int main(void){
char ans1;
int ans2
int h,w;
cin >> h >> w;
string str[h][w],temp;
for(int i=0; i<h; i++){
for(int j=0; j<w; j++){
cin >> temp;
if(te... | a.cc: In function 'int main()':
a.cc:11:5: error: expected initializer before 'int'
11 | int h,w;
| ^~~
a.cc:12:12: error: 'h' was not declared in this scope
12 | cin >> h >> w;
| ^
a.cc:12:17: error: 'w' was not declared in this scope
12 | cin >> h >> w;
| ... |
s343400673 | p03919 | C++ | NG | a.cc:1:1: error: 'NG' does not name a type
1 | NG
| ^~
|
s184954554 | p03919 | C++ | #include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
#include <numeric>
#include <string>
using namespace std;
const double PI = acos(-1.0);
const string alp = "abcdefghijklmnopqrstuvwxyz";
const string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const int INTMAX = 2147483647;
const int INTMIN = -214748... | a.cc:15:23: warning: integer constant is so large that it is unsigned
15 | const long LONGMIN = -9223372036854775808;
| ^~~~~~~~~~~~~~~~~~~
a.cc:16:32: warning: integer constant is so large that it is unsigned
16 | const unsigned long ULONGMAX = 18446744073709551615;
| ... |
s614517467 | p03919 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int h, w;
cin >> h >> w;
int c, r;
for(int i=0;i<h;++i){
for(int j=0;j<w;++j){
string s;
cin >> s;
if(s == "snuke"){
c = j;
r = i;
}
}
}
cout << (char)('A'+c) << j << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:21:28: error: 'j' was not declared in this scope
21 | cout << (char)('A'+c) << j << endl;
| ^
|
s493717119 | p03919 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int h, w;
cin >> h >> w;
string c[h][w];
for(int i = 0;i < h;i++){
for(int j = 0;j < w;j++){
cin >> s[i][j];
if(s[i][j] == "snuke"){
cout << 'A' + j << i + 1 << endl;
return 0;
}
}
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:14: error: 's' was not declared in this scope
9 | cin >> s[i][j];
| ^
|
s907889170 | p03919 | C++ | #include <iostream>
#include <string>
int main() {
int H, W;
std::string S[30][30];
char str[26] = { 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' };
std::cin >> H >> W;
char str[26] = { 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','... | a.cc:13:1: error: extended character is not valid in an identifier
13 |
| ^
a.cc: In function 'int main()':
a.cc:9:14: error: redeclaration of 'char str [26]'
9 | char str[26] = { 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' };
| ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.