submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s961812733 | p00948 | C++ | #include <iostream>
#include <cstring>
#include <vector>
#include <map>
using namespace std;
int low[200001], hi[200001];
int main() {
int n, m;
cin >> n >> m;
for (int i = 0; i < n; ++i) {
low[i] = hi[i] = i;
}
std::vector<std::pair<int, int>> arm;
for (int i = 0; i < m; ++i) {
int x, y;
ci... | a.cc: In function 'int main()':
a.cc:23:3: error: 'sort' was not declared in this scope; did you mean 'short'?
23 | sort(arm.begin(), arm.end());
| ^~~~
| short
|
s425064886 | p00948 | C++ | #include <iostream>
#include <cstring>
#include <vector>
#include <map>
using namespace std;
int low[200001], hi[200001];
int main() {
int n, m;
cin >> n >> m;
for (int i = 0; i < n; ++i) {
low[i] = hi[i] = i;
}
std::vector<std::pair<int, int>> arm;
for (int i = 0; i < m; ++i) {
int x, y;
ci... | a.cc: In function 'int main()':
a.cc:23:3: error: 'sort' was not declared in this scope; did you mean 'short'?
23 | sort(arm.begin(), arm.end());
| ^~~~
| short
|
s664262698 | p00948 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#define REP(i, N) for(ll i = 0; i < N; ++i)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
int main(void) {
int n, m;
cin>>n>>m;
vector<P> arm(m);
REP(i, m) {
cin>>arm[i].first>>arm[i].second;
--arm[i].second;
}
sort(ALL(arm));
vect... | a.cc: In function 'int main()':
a.cc:17:14: error: 'ALL' was not declared in this scope
17 | sort(ALL(arm));
| ^~~
|
s886963308 | p00948 | C++ | #include<iostream>
#include<cstdlib>
#include<algorithm>
#include<cstdio>
#include<cstring>
using namespace std;
int m,n;
int ans[200100],len[200100][1]/*0?和上?1?和下?*/;
struct node
{
int x,y;
}a[200100];
bool compare(node a,node b)
{
return a.x<b.x;
}
int main()
{
scanf("%d%d",&n,&m);
for(int i=1;i<=m;i++)
scanf("... | a.cc: In function 'int main()':
a.cc:36:33: error: expected ';' before '}' token
36 | else printf("%d",ans[i])
| ^
| ;
37 | }
| ~
|
s508469421 | p00948 | C++ | #include <iostream>
#include <vector>
#include <utility>
using namespace std;
int main(){
int n,m;
cin >> n >> m;
vector<pair<int,int> > arm(m);
for(int i=0; i<m; i++){
int x,y;
cin >> x >> y;
arm[i]=make_pair(x,y);
}
sort(arm.begin(), arm.end());
vector<int> ub(n+1), lb(n+1);
for(int i=0; i<=n; i++)... | a.cc: In function 'int main()':
a.cc:16:9: error: 'sort' was not declared in this scope; did you mean 'short'?
16 | sort(arm.begin(), arm.end());
| ^~~~
| short
|
s829334594 | p00948 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long long int n,m;
cin>>n>>m;
vector<set<int>>VSI(n);
for(int i = 0; i < n; i++){
VSI[i].insert(i);
}
vector<pair<long long int, long long int>>xy(m);
for(int i = 0; i < m; i++){
cin >> xy[i].first >> xy[i].second;
}
sort(xy.begin(), xy.end());
f... | In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/c++allocator.h:33,
from /usr/include/c++/14/bits/allocator.h:46,
from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc... |
s567121172 | p00948 | C++ | #include <bits/stdc++.h> using namespace std; #define INF 1001000100010001000 #define MOD 1000000007 #define EPS 1e-10 #define int long long #define rep(i, N) for (int i = 0; i < N; i++) #define Rep(i, N) for (int i = 1; i < N; i++) #define For(i, a, b) for (int i = (a); i < (b); i++) #define pb push_back #define eb em... | a.cc:1:26: warning: extra tokens at end of #include directive
1 | #include <bits/stdc++.h> using namespace std; #define INF 1001000100010001000 #define MOD 1000000007 #define EPS 1e-10 #define int long long #define rep(i, N) for (int i = 0; i < N; i++) #define Rep(i, N) for (int i = 1; i < N; i++) #define For(i, a,... |
s755335241 | p00948 | C++ | #include <bits/stdc++.h>
using namespace std;
#define INF 1001000100010001000
#define MOD 1000000007
#define EPS 1e-10
#define int long long
#define rep(i, N) for (int i = 0; i < N; i++)
#define Rep(i, N) for (int i = 1; i < N; i++)
#define For(i, a, b) for (int i = (a); i < (b); i++)
#define pb push_back
#de... | a.cc:23:19: error: stray '#' in program
23 | #define fir first #define sec second
| ^
a.cc:35:22: note: in expansion of macro 'fir'
35 | rep(i, n) { kyoko[i].fir = kyoko[i].sec = i; // min, max
| ^~~
a.cc:23:19: error: stray '#' in program
23 | #define fir fir... |
s743591351 | p00949 | C | #include <iostream>
#include <cstring>
#include <vector>
#include <map>
using namespace std;
string a, b;
vector<int> cnt;
int n, ans;
map<vector<int>, bool> c;
int main() {
cin >> a >> b; n = a.size();
a = '!' + a; b = '!' + b;
cnt.assign(26, 0);
for(int i = 1; i <= n; ++i) {
for(int j = 0; j < 26; ++j) cnt[j]... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s590381433 | p00949 | C | #include <iostream>
#include <cstring>
#include <vector>
#include <map>
using namespace std;
string a, b;
vector<int> cnt;
int n, ans;
map<vector<int>, bool> c;
int main() {
cin >> a >> b; n = a.size();
a = '!' + a; b = '!' + b;
cnt.assign(26, 0);
for(int i = 1; i <= n; ++i) {
for(int j = 0; j < 26; ++j) cnt[j]... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s359000395 | p00949 | C++ | /*input
anagram
grandmother
*/
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(v) (v).begin(), (v).end()
#define rep(i,a,b) for(int (i) = (a); (i) < (b); ++(i))
#define mset(x, v) memset((x), (v), sizeof (x) )
#define buff() ios::syn... | a.cc: In function 'int main()':
a.cc:88:38: error: 'struct rollingHash' has no member named 'val'
88 | memo.insert(make_pair(rk.val[0], rk.val[1]) );
| ^~~
a.cc:88:49: error: 'struct rollingHash' has no member named 'val'
88 | memo.insert(make_pai... |
s714935070 | p00949 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
map<vector<int>> memo;
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
string s1, s2;
cin >> s1 >> s2;
const int n1 = s1.size(), n2 = s2.size();
for (int i = 0; i < n1; ++i) {
vector<int> cnt(26, 0);
... | a.cc:7:15: error: wrong number of template arguments (1, should be at least 2)
7 | map<vector<int>> memo;
| ^~
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/bits/st... |
s522736217 | p00949 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <set>
using namespace std;
int main() {
string s, t;
cin>>s>>t;
set<vector<uint16_t>> m;
vector<uint16_t> v(26, 0);
for (int i = 0; i < s.length(); ++i) {
for (int k = 0; k < 26; ++k) v[k] = 0;
for (int j = 1; j < s.length() - i + 1; +... | a.cc: In function 'int main()':
a.cc:11:14: error: 'uint16_t' was not declared in this scope
11 | set<vector<uint16_t>> m;
| ^~~~~~~~
a.cc:5:1: note: 'uint16_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
4 | #include <set>
+++ |+#include <cstd... |
s316335605 | p00949 | C++ | #include <iostream>
#include <vector>
#include <set>
using namespace std;
using ull = unsigned long long;
constexpr int MAX = 4000;
constexpr ull B = 100000007ULL;
vector<vector<int>> make(const string& str)
{
int N = str.size();
vector<vector<int>> cnt(N + 1, vector<int>(26));
for (int i = 0; i < N; i++... | a.cc: In function 'int main()':
a.cc:54:9: error: 'sort' was not declared in this scope; did you mean 'short'?
54 | sort(vec[i].begin(), vec[i].end());
| ^~~~
| short
a.cc:55:22: error: 'unique' was not declared in this scope
55 | vec[i].erase(unique(vec[i].begin(), vec... |
s482437859 | p00949 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef unsigned __int128 Hash;
const Hash m=1e18+9;
const Hash a=1e9+7;
const Hash b=1e3+7;
int sq(int x){return x*x;}
Hash hasher(char x){
return (sq(x-'a'+2)*a+(x-'a'+2)*b)%m;
}
int main(){
string s[2];
cin>>s[0]>>s[1];
int res=0;
for(int len=1;len<=4000;len... | a.cc: In function 'int main()':
a.cc:23:31: error: no match for 'operator<' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
23 | for(int j=0;j<len-1 && j<s[i]s.size();j++){
| ~^~~~~
| | |
| ... |
s042707777 | p00949 | C++ | #include <bits/stdc++.h>
#include <stdio.h>
#define ff(i,x,y)for(int i=x;i<y+1;i++)
#define fs(i,x,y)for(int i=x;i>y-1;i--)
#define all(x) x.begin(),x.end()
#define Ins(x) inserter(x,x.begin())
using namespace std;
char s1[4010],s2[4010];
int len1,len2,pre1[30][4010],pre2[30][4010];
unsigned long long now1,now2;
const ... | a.cc: In function 'bool check(int)':
a.cc:41:23: error: lvalue required as left operand of assignment
41 | if(hash1[now1]&&hash2[now2]=1)
|
s115226472 | p00949 | C++ | #include <cstdio>
#include <iostream>
#include <string.h>
#include <string>
#include <unordered_map>
#include <queue>
#include <vector>
#include <set>
#include <algorithm>
#include <math.h>
#include <cmath>
#include <bitset>
#define mem0(a) memset(a,0,sizeof(a))
#define meminf(a) memset(a,0x3f,sizeof(a))
using namespa... | a.cc: In function 'ull hash(int*)':
a.cc:30:1: warning: no return statement in function returning non-void [-Wreturn-type]
30 | }
| ^
a.cc: In function 'int main()':
a.cc:44:35: error: reference to 'hash' is ambiguous
44 | HashTable[hash(a)]++;
| ... |
s248784000 | p00949 | C++ | #include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp> // <-- add!!!
using namespace std;
using namespace boost::multiprecision; // <-- add!!!
const int dx[]={1,0,-1,0,1,-1,-1,1};
const int dy[]={0,1,0,-1,1,1,-1,-1};
const int INF = 1e9;
const long long LINF = 1e18;
const double EPS = 1e-8;
#define pb pus... | a.cc:2:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
2 | #include <boost/multiprecision/cpp_int.hpp> // <-- add!!!
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s017519539 | p00949 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const ll MOD = 1000000007;
int main(){
string s1, s2;
cin >> s1 >> s2;
const ll base = 9973;
vector<ll> base_pow(26);
base_pow[0] = 1;
for(int i=1;i<26;i++){
base_pow[i] = (base_pow[i - 1... | a.cc: In function 'int main()':
a.cc:40:26: error: no matching function for call to 'max(int&, short int&)'
40 | ans = max(ans, it->second);
| ~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c... |
s975857751 | p00949 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<numeric>
#include<map>
#include<unordered_map>
#include<set>
#include<stack>
#include<queue>
#include<sstream>
#include<iomanip>
#define reps(i,j,k) for(int i=(j);i<(k);i++)
#define rep(i,j) reps(i,0,j)
#define fs first
#define sc second... | In file included from /usr/include/c++/14/algorithm:61,
from a.cc:4:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = _Rb_tree_const_iterator<vector<short int> >; _Compare = __gnu_cxx::__ops:... |
s370663649 | p00949 | C++ | #!/usr/bin/env python
from collections import deque
import itertools as it
import sys
sys.setrecursionlimit(1000000)
S1 = raw_input()
S2 = raw_input()
m = {}
for i in range(len(S1)):
lst = [0 for j in range(26)]
for j in range(i, len(S1)):
lst[(ord(S1[j]) - ord('a'))] += 1
m[hash(tuple(lst)... | a.cc:1:2: error: invalid preprocessing directive #!
1 | #!/usr/bin/env python
| ^
a.cc:3:1: error: 'from' does not name a type
3 | from collections import deque
| ^~~~
a.cc:14:1: error: expected unqualified-id before 'for'
14 | for i in range(len(S1)):
| ^~~
|
s436082055 | p00950 | Java | // ID:61516672
import java.util.*;
import java.io.*;
import java.text.*;
//import javax.script.*;
public class E {
// static ScriptEngineManager sem = new ScriptEngineManager();
// static ScriptEngine engine = sem.getEngineByName("javascript");
public static void main(String[] args){
BufferedReader br = new Buffer... | Main.java:7: error: class E is public, should be declared in a file named E.java
public class E {
^
1 error
|
s323421231 | p00950 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<sstream>
#include<deque>
#include<algorithm>
#include<map>
#include<set>
#include<cstdlib>
#include<climits>
#include<cassert>
#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
#define all(x) x.begin(),x.end()
using namespace std;
typede... | a.cc:23:1: error: expected ',' or ';' before 'const'
23 | const string opr = "01+-*=()";
| ^~~~~
a.cc: In function 'int dfs(int, int, std::vector<char>&)':
a.cc:148:14: error: 'opr' was not declared in this scope
148 | rep(i,(int)opr.size()) {
| ^~~
a.cc:13:34: note: in definition of mac... |
s361324500 | p00950 | C++ | #include "bits/stdc++.h"
#include <sys/timeb.h>
#include <fstream>
using namespace std;
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define replrev(i,a,b) for(int i=(int)(b)-1;i>=(int)(a);i--)
#define reprev(i,n) replrev(i,0,n)
#define repi(itr,ds) for(auto itr=ds.begin();itr!=... | a.cc: In function 'bool isQ(std::string&, std::map<char, char>&)':
a.cc:184:39: error: cannot bind non-const lvalue reference of type 'State&' {aka 'std::__cxx11::basic_string<char>::const_iterator&'} to an rvalue of type '__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >'
184 | if ... |
s542549895 | p00950 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <cassert>
using namespace std;
typedef pair<bool, int> P;
string letters = "01+-*()=";
string s;
class Equation {
string s;
public:
void init(string s) { this->s = s; }
//[l, r)
bool Q(int l, int r) {
int i;
... | a.cc: In function 'int main()':
a.cc:136:41: error: 'cassert' was not declared in this scope; did you mean 'assert'?
136 | if (s.length() > 4 && ans >= 0) cassert(0);
| ^~~~~~~
| assert
a.cc: In member function 'P Equa... |
s393558348 | p00951 | C++ | #include <bits/stdc++.h>
#define int long long
#define N 310
using namespace std;
const int mod = (1e9)+7;
const double EPS = 1e-8;
const double PI = 6.0 * asin(0.5);
template<class T> T Max(T &a,T b){return a=max(a,b);}
template<class T> T Min(T &a,T b){return a=min(a,b);}
typedef pair<int,int> P;
vector<int> G[N];
i... | a.cc: In function 'void merge(std::vector<std::pair<long long int, long long int> >&, std::vector<std::pair<long long int, long long int> >&, std::vector<std::pair<long long int, long long int> >&, long long int)':
a.cc:29:17: error: 'P' {aka 'struct std::pair<long long int, long long int>'} has no member named 'seocon... |
s777071382 | p00951 | C++ | #include<bits/stdc++.h>
using namespace std;
using Int = long long;
struct edge{
int from,to;
edge(){}
edge(int from,int to):from(from),to(to){}
};
signed main(){
const int MAX = 333;
vector<vector<bool> > G(MAX,vector<bool>(MAX,0));
auto D=G;
map<string, int> R;
int sz=0;
{
string p,q;
cin>... | a.cc: In function 'int main()':
a.cc:73:16: error: no match for 'operator|=' (operand types are 'std::vector<bool>::reference' and 'bool')
73 | G[i][j]|=G[i][k]&&G[k][j];
| ~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
fr... |
s957426512 | p00952 | C | #include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int main()
{
int k;
cin>>k;
int a[500002];
double tot=1;
for(int i=1;i<=k;++i)
{
int o;
cin>>o;
double mm=1/pow(2,o);
if(tot-mm>=0)
{
cout<<"Yes"<<endl;
tot=tot-mm;
}
else cout<<"No"<<endl;
}
} | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s428859364 | p00952 | C++ | #include <cmath>
#include <cstdio>
#include <cstring>
#include <bitset>
#define maxn 500300
using namespace std;
bitset<1000000006> S;
int n;
ll a[maxn];
char s[10000];
void read(int &x){
char ch=' ';
while ( ( ch>'9')||(ch<'0') )
ch=getchar();
int tmp=0;
while ( ( ch<='9')&&(ch>='0') )
{
tmp=tmp*10+ch-'... | a.cc:11:1: error: 'll' does not name a type
11 | ll a[maxn];
| ^~
a.cc: In function 'int main()':
a.cc:40:23: error: 'a' was not declared in this scope
40 | scanf("%lld",&a[i]);
| ^
|
s578816915 | p00952 | C++ | #include <cmath>
#include <cstdio>
#include <cstring>
#include <bitset>
#define maxn 500300
using namespace std;
bitset<1000000006> S;
int n;
int a[maxn];
char s[10000];
inline void read(int &x) {
char ch;
bool flag = false;
for (ch = getchar(); !isdigit(ch); ch = getchar())if (ch == '-') flag = true... | a.cc: In function 'int main()':
a.cc:74:31: error: no matching function for call to 'std::bitset<1000000006>::count(int&)'
74 | while (S.count(pre))pre++;
| ~~~~~~~^~~~~
In file included from a.cc:4:
/usr/include/c++/14/bitset:1366:7: note: candidate: 'std::size_t std::bi... |
s181788925 | p00952 | C++ | #include <iostream>
#include <cstdio>
#include <cctype>
#include <algorithm>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <set>
#include <stack>
#include <sstream>
#include <queue>
#include <map>
#include <functional>
#include <bitset>
#include <cstdlib>
using namespace std;
#define... | a.cc: In function 'int main()':
a.cc:72:12: error: 'cnt' was not declared in this scope; did you mean 'int'?
72 | if(cnt){
| ^~~
| int
|
s075535324 | p00953 | C++ | #include<bits/stdc++.h>
using namespace std;
#define MAX_N 100005
#define MAX_M 100005
int n,m;
int x[MAX_M],y[MAX_M],w[MAX_M];
vector<int> G[MAX_N];
vector<int> g[MAX_N];
vector<int> group[MAX_N];
int id[MAX_N];
bool visited[MAX_N];
vector<int> vd;
int dp[MAX_N];
bool dfs(int pos,int prev,int root){
id[pos]=roo... | a.cc: In function 'int solve(int, int&)':
a.cc:107:21: error: 'root' was not declared in this scope
107 | for(int pos:group[root])
| ^~~~
|
s661831468 | p00955 | C++ | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
struct P {
double x, y;
P() {
}
P(double _x, double _y) :
x(_x), y(_y) {
}
P operator+(const P&p) const {
return P(x + p.x, y + p.y);
}
P operator-(const P&p) const {
retu... | a.cc: In function 'double ffy(double)':
a.cc:146:19: error: 'min_element' was not declared in this scope
146 | double l=*min_element(y,y+n),r=*max_element(y,y+n);
| ^~~~~~~~~~~
a.cc: In function 'double ffx()':
a.cc:158:19: error: 'min_element' was not declared in this scope
158 | ... |
s990147512 | p00956 | Java | #include <bits/stdc++.h>
using namespace std;
double value[45];
int size[45];
double get_value(string &pile){
bool b_can_move = 0, w_can_move = 0;
double b_max, w_min;
double last_value = 0;
for(int i=0;i<pile.length();i++){
double value;
if(pile[i]=='B'){
/*if(b_can_move)... | Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
^
Main.java:5: error: class, interface, enum, or record expected
double value[45];
^
Main.java:6: error: class, interface, enum, or record expected
int s... |
s604146201 | p00956 | C++ | #include <bits/stdc++.h>
using namespace std;
double value[45];
int size[45];
double get_value(string &pile){
bool b_can_move = 0, w_can_move = 0;
double b_max, w_min;
double last_value = 0;
for(int i=0;i<pile.length();i++){
double value;
if(pile[i]=='B'){
if(b_can_move){
... | a.cc: In function 'void enumerate(int, int, std::unordered_map<double, int>&, double, int)':
a.cc:62:70: error: reference to 'size' is ambiguous
62 | enumerate(st+1, ed, table, value_sum + value[st], size_sum + size[st]);
| ^~~~
In fi... |
s910174662 | p00957 | C | #include<iostream>
#include<cstdio>
using namespace std;
#define ll long long
ll a,b,c,d,e,q[1007]={0};
int main(){
scanf("%lld%lld",&a,&b);
q[1]=1;
q[b]=1;
for (int i=1;i<=a;i++){
q[i]=q[i]+q[i-2]+q[i-b-1];
}
ll ans=0;
for (int i=1;i<=a;i++) ans+=q[i];
printf("%lld",ans);
return 0;
}
| main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s172438814 | p00957 | C | #include <cstdio>
#include <cstring>
long long dp[111][3];
long long l,k,ans;
int main()
{
scanf("%lld%lld",&l,&k);
dp[0][0] = 1;
ans = 0;
for (int i = 1; i <= l; i++)
{
dp[i][0] = dp[i - 1][1];
dp[i][1] = dp[i - 1][0];
if (i >= k) {
dp[i][1] += dp[i - k][0];
}
ans += dp[i][1];
}
printf("%lld\n", ... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s582267180 | p00957 | C | #include <iostream>
#include <stdlib.h>
#include <stdio.h>
typedef long long ll;
using namespace std;
ll get(long m,long n){
ll ans = 1;
for(long i = 0; i < n; i++){
ans*=m-i;
ans/=(i+1);
}
return ans;
}
int main()
{
// printf("%lld\n", get(1, 0));
ll l, k;
scanf("%lld%lld", &l, &k);
... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s034298095 | p00957 | C | #include<bits/stdc++.h>
using namespace std;
typedef long long LL;
double C(LL n, LL m)
{
if(m == 0 || m == n) return 1;
double ans1 = 1, ans2 = 1;
for(LL i = m + 1; i <= n; i++) ans1 *= i;
for(LL i = 1; i <= n - m; i++) ans2 *= i;
return ans1 / ans2;
}
int main()
{
int l, k;
scanf("%d%d", &l, &k);
int ma;
i... | main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s656865364 | p00957 | C++ |
#include <iostream>
#include <cstring>
#include<cstdio>
using namespace std;
long long int c(long long m,long long n)
{
long long ans=1;
for(long long k=1; k<=n; k++)
{
ans=(ans*(m-n+k))/k;
}
return ans;
}
int main()
{
long long l, k;
while(cin >> l >> k)
{
long long i... | a.cc: In function 'int main()':
a.cc:33:14: error: expected '}' at end of input
33 | return 0;
| ^
a.cc:16:1: note: to match this '{'
16 | {
| ^
|
s320561013 | p00957 | C++ | #include <iostream>
#include <stdlib.h>
#define SHIRO 0
#define USUI 1
#define ATSUI 2
using namespace std;
int l, k;
double array[1000];
void print (int *pole)
{
for (int i = 0; i < l; i++)
printf ("%d ", pole[i]);
printf("\n");
}
bool check (int *pole, int len)
{
// l ?????????????¶????????????????
if (l <... | a.cc: In function 'double shiro(int*, int)':
a.cc:44:13: error: reference to 'array' is ambiguous
44 | if (array[len] != -1){
| ^~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51,
from /usr/include/c++... |
s043564708 | p00958 | C | /**
* ┏┓ ┏┓
* ┏┛┻━━━┛┻┓
* ┃ ┃
* ┃ ━ ┃
* ┃ ┳┛ ┗┳ ┃
* ┃ ┃
* ┃ ┻ ┃
* ┃ ┃
* ┗━┓ ┏━┛Codes are far away from bugs with the animal protecting
* ┃ ┃ 神兽保佑,代码无bug
* ┃ ┃
* ┃ ┗━━━┓
* ┃ ┣┓
* ┃ ┏┛
* ┗┓┓┏━┳┓┏┛
* ┃┫┫ ┃┫┫
* ┗┻┛ ┗┻┛... | main.c:21:10: fatal error: bits/stdc++.h: No such file or directory
21 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s146949639 | p00958 | C++ | #include <iostream>
#include <cstring>
#include <map>
#include <vector>
#include <cstdlib>
using namespace std;
struct Pos {
int x, y;
};
int N;
Pos p[16];
vector<vector<int>> g;
int gcd(int x, int y) {
if (y == 0) return x;
return gcd(y, x%y);
}
pair<int, int> grad(const Pos&a, const Pos& b) {
int x = a.x... | a.cc: In function 'int main()':
a.cc:61:5: error: 'sort' was not declared in this scope; did you mean 'short'?
61 | sort(g.begin(), g.end(), [](const auto& a, const auto& b){ return a.size() > b.size();});
| ^~~~
| short
|
s693428164 | p00958 | C++ | #include <iostream>
#include <cstring>
#include <map>
#include <vector>
#include <cstdlib>
#include <algorithm>h
using namespace std;
struct Pos {
int x, y;
};
int N;
Pos p[16];
vector<vector<int>> g;
int gcd(int x, int y) {
if (y == 0) return x;
return gcd(y, x%y);
}
pair<int, int> grad(const Pos&a, const P... | a.cc:6:10: fatal error: algorithm>: No such file or directory
6 | #include <algorithm>h
| ^~~~~~~~~~~~
compilation terminated.
|
s905800801 | p00958 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <cmath>
#include <string>
using namespace std;
#define MAX 100005
int n, t;
int h[MAX];
int c[MAX];
int s[MAX];
int o[MAX];
int main() {
scanf("%d %d", &n, &t);
c[1] = 0;
... | a.cc: In function 'int main()':
a.cc:40:7: error: 'l' was not declared in this scope
40 | t = l - c[1];
| ^
|
s818020425 | p00958 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <cmath>
#include <string>
using namespace std;
#define MAX 100005
int n, t;
int h[MAX];
int c[MAX];
int s[MAX];
int o[MAX];
int main() {
scanf("%d %d", &n, &t);
c[1] = 0;
... | a.cc: In function 'int main()':
a.cc:40:7: error: 'l' was not declared in this scope
40 | t = l - c[1];
| ^
|
s893050788 | p00958 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <numeric>
using namespace std;
int M;
vector<int> X, Y;
int nc2(int x){
if(x < 2)
return 0;
return x * (x-1) / 2;
}
int get_counts(map<pair<int, int>, int> &counts){
int res = 0;
for(auto p: counts)
res += nc2(p.second);
... | a.cc: In function 'std::pair<int, int> get_fraction(int, int)':
a.cc:26:13: error: '__gcd' was not declared in this scope; did you mean 'std::__detail::__gcd'?
26 | int g = __gcd(dx, dy);
| ^~~~~
| std::__detail::__gcd
In file included from a.cc:4:
/usr/include/c++/14/numeric:... |
s750011485 | p00958 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <numeric>
using namespace std;
int M;
vector<int> X, Y;
int nc2(int x){
if(x < 2)
return 0;
return x * (x-1) / 2;
}
int get_counts(map<pair<int, int>, int> &counts){
int res = 0;
for(auto p: counts)
res += nc2(p.second);
... | a.cc: In function 'std::pair<int, int> get_fraction(int, int)':
a.cc:26:13: error: '__gcd' was not declared in this scope; did you mean 'std::__detail::__gcd'?
26 | int g = __gcd(dx, dy);
| ^~~~~
| std::__detail::__gcd
In file included from a.cc:4:
/usr/include/c++/14/numeric:... |
s429372524 | p00958 | C++ | #include <bits/stdc++.h>
using namespace std;
using Int = long long;
short dp[16][16][10][1<<16];
template<typename T>
void chmax(T &a,T b){
if(a<b) a=b;
}
signed main(){
cin.tie(0);
ios::sync_with_stdio(0);
Int n;
cin>>n;
using P = pair<Int, Int>;
vector<P> v;
for(Int i=0;i<n;i++){
Int x,y;
cin... | a.cc: In function 'int main()':
a.cc:64:22: error: no matching function for call to 'chmax(short int&, Int)'
64 | chmax(dp[s][t][k+1][nb],dp[i][j][k][b]+k);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:6:6: note: candidate: 'template<class T> void chmax(T&, T)'
6 | void ... |
s086593468 | p00959 | C | #include <cstdio>
#include <cstring>
#include <string>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <vector>
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
const int MaxN = 1e5 + 5;
int main() {
int ... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s647272353 | p00959 | C | import sys
if locals()['__file__'][-2:] == 'py':
sys.stdin = open('in.txt', 'r')
rd = lambda: map(int, input().split())
n, t = rd()
last = 0
lastsum = 0
ma = 0
lastans = 0x3f3f3f3f3f3f3f3f
for i in range(n):
nowsb = int(input())
lastsum += nowsb
time = t - lastsum
ma = max(ma, nowsb)
lastans = t... | main.c:1:1: error: unknown type name 'import'
1 | import sys
| ^~~~~~
main.c:2:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'if'
2 | if locals()['__file__'][-2:] == 'py':
| ^~
main.c:2:13: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
2 | i... |
s731965670 | p00959 | C++ | #include <queue>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <iostream>
#include <cstring>
#include <cctype>
#include <list>
#include <map>
#define mem(a, what) memset(a,what,sizeof(a))
#define close_stdio std::ios::sync_with_stdio(false)
#define ULL unsigned long long
#define inf 0x3f3f3f3f
#def... | a.cc:28:4: error: 'long long int time' redeclared as different kind of entity
28 | LL time;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
... |
s569696119 | p00959 | C++ | #include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <map>
using namespace std;
int main()
{
int n,t,q;
while(~scanf("%d%d",&n,&t))
{
long long sum=0;
long long m=-1;
for(int i=0; i<n; i++)
{
scanf("%d",&q);
... | a.cc: In function 'int main()':
a.cc:18:18: error: no matching function for call to 'max(long long int&, int&)'
18 | m=max(m,q);
| ~~~^~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /u... |
s189433196 | p00959 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <cmath>
#include <string>
using namespace std;
#define MAX 100005
int n, t;
int h[MAX];
int c[MAX];
int s[MAX];
int o[MAX];
int main() {
scanf("%d %d", &n, &t);
c[1] = 0;
... | a.cc: In function 'int main()':
a.cc:40:7: error: 'l' was not declared in this scope
40 | t = l - c[1];
| ^
|
s311841202 | p00959 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <cmath>
#include <string>
using namespace std;
#define MAX 100005
int n, t;
int h[MAX];
int c[MAX];
int s[MAX];
int o[MAX];
int main() {
scanf("%d %d", &n, &t);
c[1] = 0;
... | a.cc: In function 'int main()':
a.cc:40:7: error: 'l' was not declared in this scope
40 | t = l - c[1];
| ^
|
s044712767 | p00959 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <cmath>
#include <string>
using namespace std;
#define MAX 100005
int n, t;
int h[MAX];
int c[MAX];
int s[MAX];
int o[MAX];
int main() {
scanf("%d %d", &n, &t);
c[1] = 0;
... | a.cc: In function 'int main()':
a.cc:40:7: error: 'l' was not declared in this scope
40 | t = l - c[1];
| ^
|
s250681766 | p00959 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <cmath>
#include <string>
using namespace std;
#define MAX 100005
int n, t;
int h[MAX];
int c[MAX];
int s[MAX];
int o[MAX];
int main() {
scanf("%d %d", &n, &t);
c[1] = 0;
... | a.cc: In function 'int main()':
a.cc:40:7: error: 'l' was not declared in this scope
40 | t = l - c[1];
| ^
|
s518299706 | p00959 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<int(n);++i)
typedef long long ll;
int main(void){
int n,t;
cin>>n>>t;
vector<ll> s(n+1);
ll cycle = 0;
rep(i,n) {
ll h;
cin>>h;
s[i+1] = s[i] + h;
cycle = max(cycle, h);
ll tt = t-s[... | a.cc: In function 'int main()':
a.cc:19:18: error: no matching function for call to 'max(ll&, int)'
19 | cout<<max(res,0)<<endl;
| ~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s685061132 | p00961 | C | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#define MAXN 1<<19
#define inf 1000000007
using namespace std;
int n,k;
int tt;
int w[MAXN];
char a[MAXN],b[MAXN];
int f[MAXN];
int seg[MAXN << 1];
void modify(int sit,int x)
{
seg[sit+=MAXN]=x;
for(sit >>= 1; sit ; sit>>=1)
{
seg[sit]=min(se... | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s642011100 | p00961 | C | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
const int MaxN = 500000;
using namespace std;
int dp[MaxN + 5];
char s[MaxN + 5], t[MaxN + 5];
int n, K;
int main()
{
while(~scanf("%d%d", &n, &K)) {
scanf("%s%s", s + 1, t + 1);
int ans = 0;
for (int i = 1; i <= n; i++) {
if(s[i] !... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s305192958 | p00961 | C++ | #include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 30;
struct SegNode
{
int v;
SegNode(int v) : v(v) {}
SegNode operator*(const SegNode &r) const
{
return (v < r.v ? *this : r);
}
} e(INF);
struct SegmentTree
{
int sz;
vector< SegNode > seg;
SegmentTree(int n)
{
sz = 1;
... | a.cc: In function 'int main()':
a.cc:75:103: error: expected ')' before ';' token
75 | dp[i] = min(dp[i - 1] + (S[i - 1] != T[i - 1], (seg.query(i - K, i - 1).v + 3 + sweep[i - 1]) / 2);
| ~ ^
| ... |
s797594337 | p00962 | C++ | #include <iostream>
#include <vector>
#include <queue>
#include <cassert>
#include <tuple>
#include <map>
#define show(x) cerr << #x << " = " << x << endl
using namespace std;
using ll = long long;
template <typename T>
constexpr T INF = numeric_limits<T>::max() / 16;
template <typename T>
ostream& operator<<(ostrea... | a.cc:13:19: error: 'numeric_limits' was not declared in this scope
13 | constexpr T INF = numeric_limits<T>::max() / 16;
| ^~~~~~~~~~~~~~
a.cc:13:35: error: expected primary-expression before '>' token
13 | constexpr T INF = numeric_limits<T>::max() / 16;
| ... |
s133311017 | p00962 | C++ | #include <iostream>
#include <vector>
#include <queue>
#include <cassert>
#include <tuple>
#include <map>
#define show(x) cerr << #x << " = " << x << endl
using namespace std;
using ll = long long;
template <typename T>
constexpr T INF = numeric_limits<T>::max() / 16;
template <typename T>
ostream& operator<<(ostrea... | a.cc:13:19: error: 'numeric_limits' was not declared in this scope
13 | constexpr T INF = numeric_limits<T>::max() / 16;
| ^~~~~~~~~~~~~~
a.cc:13:35: error: expected primary-expression before '>' token
13 | constexpr T INF = numeric_limits<T>::max() / 16;
| ... |
s029311671 | p00962 | C++ | #include <iostream>
#include <vector>
#include <queue>
#include <set>
#include <cassert>
#include <tuple>
#include <map>
#define show(x) cerr << #x << " = " << x << endl
using namespace std;
using ll = long long;
template <typename T>
constexpr T INF = numeric_limits<T>::max() / 16;
template <typename T>
ostream& op... | a.cc:14:19: error: 'numeric_limits' was not declared in this scope
14 | constexpr T INF = numeric_limits<T>::max() / 16;
| ^~~~~~~~~~~~~~
a.cc:14:35: error: expected primary-expression before '>' token
14 | constexpr T INF = numeric_limits<T>::max() / 16;
| ... |
s603264006 | p00962 | C++ | #include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using ll = long long;
#define rep(i, j) for(int i = 0; i < (int)(j); i++)
#define debug(x) cerr << #x << " : " << x << endl
template<class T> ostream&
operator << (ostream &os , const vector<T> &v) { for(const T &t : v) os << "\t" << t; return ... | a.cc: In function 'std::set<int> enumerate_bridges(const EdgeList&)':
a.cc:48:8: error: no match for call to '(std::function<void(int, int)>) (int)'
48 | dfs(0);
| ~~~^~~
In file included from /usr/include/c++/14/functional:59,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53... |
s584887496 | p00962 | C++ | #include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<queue>
#include<map>
#include<tuple>
#include<vector>
#include<iostream>
#include<algorithm>
#define maxn 100050
#define INF 0x3f3f3f3f
#define eps 1e-8
using namespace std;
typedef long long ll;
int n,m,a,b,x;
struct graph
{
int from[ma... | a.cc: In member function 'void node::solve()':
a.cc:116:26: error: no match for 'operator[]' (operand types are 'std::map<std::tuple<int, int, int>, int>' and 'std::pair<int, int>')
116 | if(i<v)mo[make_pair(i,v)]++;
| ^
In file included from /usr/include/c++/14/map:63,
... |
s740227987 | p00965 | Java | import java.util.Scanner;
public class I{
public static final int MP = 200010; //MaxPassengers
public static final int MSN = 100010; //MaxStationNumber
public static class p{
int bp; //boarding point
int dp; //deplaning
}
public static void main(String[] args){
int P1 = 0,... | Main.java:5: error: class I is public, should be declared in a file named I.java
public class I{
^
1 error
|
s534271370 | p00965 | Java | import java.util.Scanner;
public class I{
public static final int MP = 200010; //MaxPassengers
public static final int MSN = 100010; //MaxStationNumber
public static class p{
int bp; //boarding point
int dp; //deplaning
}
public static void main(String[] args){
int P1 = 0,... | Main.java:5: error: class I is public, should be declared in a file named I.java
public class I{
^
1 error
|
s910456539 | p00965 | C++ | import java.util.Scanner;
public class Main{
public static final int MP = 200010; //MaxPassengers
public static final int MSN = 100010; //MaxStationNumber
public static class p{
int bp; //boarding point
int dp; //deplaning
}
public static void main(String[] args){
int P1 =... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: expected unqualified-id before 'public'
5 | public class Main{
| ^~~~~~
|
s307025432 | p00965 | C++ | #include <bits/stdc++.h>
using namespace std;
using Int = long long;
template <typename T,typename E>
struct SegmentTree{
typedef function <T(T,T)> F;
typedef function <T(T,E)> G;
int n;
F f;
G g;
T d1;
E d0;
vector<T> dat;
SegmentTree(){};
SegmentTree(int n_,F f,G g,T d1,
vector<T> v = vect... | a.cc: In function 'int main()':
a.cc:57:3: error: expected unqualified-id before 'return'
57 | return 0;
| ^~~~~~
a.cc:56:10: error: expected ';' before 'return'
56 | for(int
| ^
| ;
57 | return 0;
| ~~~~~~
a.cc:57:3: error: expected primary-expression befo... |
s837796514 | p00966 | C++ | from bisect import bisect
n, a, b, q = map(int, input().split())
W = [input().split() for i in range(a)]
X = [int(x) for x, c in W]
C = [c for x, c in W]
P = [list(map(int, input().split())) for i in range(b)]
Y = [y for y, h in P] + [n+1]
D = [0]*b
for i in range(b):
y0, h = P[i]; y1 = Y[i+1]
l = y1 - y0
... | a.cc:48:27: error: empty character constant
48 | print(*map(check, Z), sep='')
| ^~
a.cc:1:1: error: 'from' does not name a type
1 | from bisect import bisect
| ^~~~
a.cc:13:19: error: 'y1' does not name a type
13 | y0, h = P[i]; y1 = Y[i+1]
| ... |
s604684592 | p00967 | 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: In function 'long long int dfs2(long long int, long long int, long long int)':
a.cc:87:1: warning: no return statement in function returning non-void [-Wreturn-type]
87 | }
| ^
a.cc: In function 'int main()':
a.cc:141:21: error: 'a' was not declared in this scope
141 | rep(i,m)if(!(0<=a[i]&&a[i]<n)... |
s262404361 | p00967 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
int n,m;
vector<int> G[100001];
vector<int> mdfG[100001];
bool used[100001];
vector<int> route;
int cmp[100001];
int all=0;
int ans=0;
set<deque<int> > se;
void dfs(int v,int p){
used[v]=true;
route.push_back(v);
for(int i=... | a.cc: In function 'int main()':
a.cc:80:24: error: request for member 'size' in 'all', which is of non-class type 'int'
80 | if(all.size()>=50)break;
| ^~~~
a.cc:80:35: error: break statement not within loop or switch
80 | if(all.size()>=50)break;
... |
s076412072 | p00967 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
int n,m;
vector<int> G[100001];
vector<int> mdfG[100001];
bool used[100001];
vector<int> route;
int cmp[100001];
int all=0;
int ans=0;
set<deque<int> > se;
void dfs(int v,int p){
used[v]=true;
route.push_back(v);
for(int i=... | a.cc: In function 'int main()':
a.cc:80:28: error: break statement not within loop or switch
80 | if(all>=50)break;
| ^~~~~
|
s682185310 | p00990 | Java | package aoj_1500_id;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.LinkedList;
/**
* http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1500
*
*/
public class TMain {
private static int calcCompareNum(int sum, int lack... | Main.java:13: error: class TMain is public, should be declared in a file named TMain.java
public class TMain {
^
1 error
|
s727661306 | p00990 | Java |
import java.io.IOException;
import java.util.Scanner;
import sun.launcher.resources.launcher;
public class Main {
public static void main(String[] args) throws IOException {
new Main().run();
}
private void run() throws IOException {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
... | Main.java:5: error: package sun.launcher.resources is not visible
import sun.launcher.resources.launcher;
^
(package sun.launcher.resources is declared in module java.base, which does not export it)
1 error
|
s148115419 | p00990 | 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 ... | main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s304078507 | p00990 | C++ | package aoj_1500_id;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.LinkedList;
public class Main {
private static int calcCombineNum(int sum, int lack, int[] list) {
// 計算
int combiNum=(int)Math.pow(list.length, lack);
in... | a.cc:1:1: error: 'package' does not name a type
1 | package aoj_1500_id;
| ^~~~~~~
a.cc:3:1: error: 'import' does not name a type
3 | import java.io.BufferedReader;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
4 | impor... |
s607671701 | p00990 | C++ | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.LinkedList;
public class Main {
private static int calcCombineNum(int sum, int lack, int[] list) {
// 計算
int combiNum=(int)Math.pow(list.length, lack);
int[] sums=new int[combi... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.BufferedReader;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.IOException;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fm... |
s048544281 | p00990 | C++ | #include<iostream>
#include<string>
using namespace std;
#define N 100000
int q2n[10] = {0,2,4,6,8,1,3,5,7,9};
int main() {
int n, a[10], m, dp[N+1][10];
string s;
cin >> n >> s;
cin >> m;
for(int j=0; j<10; ++j) dp[0][j] = 0;
for(int i=0; i<m; ++i) cin >> a[i];
dp[0][0] = 1;
for(i... | a.cc: In function 'int main()':
a.cc:42:14: error: expected '}' at end of input
42 | return 0;
| ^
a.cc:9:12: note: to match this '{'
9 | int main() {
| ^
|
s868912470 | p00990 | C++ | n = gets.to_i
s = gets.chomp
gets
candidates = gets.split.map(&:to_i)
dp = [1] + [0] * 9
(0..s.size-1).each do |i|
new_dp = [0] * 10
(s[i] == ?* ? candidates : [s[i].to_i]).each do |c|
if (s.size - i).even?
c = (c * 2).to_s.split("").map(&:to_i).inject(:+)
end
(0..9).each do ... | a.cc:6:2: error: too many decimal points in number
6 | (0..s.size-1).each do |i|
| ^~~~~~~~~~~
a.cc:12:10: error: too many decimal points in number
12 | (0..9).each do |j|
| ^~~~
a.cc:1:1: error: 'n' does not name a type
1 | n = gets.to_i
| ^
|
s332959806 | p00990 | C++ | #include<iostream>
#include<vector>
using namespace std;
int n;
string s;
vector<int> V;
int ans;
void input(){
cin >> n;
cin >> s;
int m;
cin >> m;
while(m--){
int in;
cin >> in;
V.push_back(in);
}
}
bool isValid(string str){
reverse(str.begin(),str.end());
int num = 0;
for(int i ... | a.cc: In function 'bool isValid(std::string)':
a.cc:26:3: error: 'reverse' was not declared in this scope
26 | reverse(str.begin(),str.end());
| ^~~~~~~
|
s478805329 | p00990 | C++ | 15
2***9*2*6*1199*
9
0 1 2 3 4 6 7 8 9 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 15
| ^~
|
s057762950 | p00990 | C++ | w//41
#include<iostream>
using namespace std;
int n;
int d(int p,int i){
int j=i*2;
return (p%2)?j/10+j%10:i;
}
int main(){
char ID[100001];
int m;
int a[10];
cin>>n>>ID>>m;
for(int i=0;i<m;i++){
cin>>a[i];
}
static int dp[100001][10];
dp[0][0]=1;
for(int i=0;i<n;i++){
for(int j=0;j<10... | a.cc:1:1: error: 'w' does not name a type
1 | w//41
| ^
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:2:
/usr/include... |
s433463758 | p00990 | C++ | w//41
#include<iostream>
using namespace std;
int n;
int d(int p,int i){
int j=i*2;
return (p%2)?j/10+j%10:i;
}
int main(){
char ID[100001];
int m;
int a[10];
cin>>n>>ID>>m;
for(int i=0;i<m;i++){
cin>>a[i];
}
static int dp[100001][10];
dp[0][0]=1;
for(int i=0;i<n;i++){
for(int j=0;j<10... | a.cc:1:1: error: 'w' does not name a type
1 | w//41
| ^
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:2:
/usr/include... |
s427757328 | p00990 | C++ | #include <iostream>
#include <cstring>
#include <cstdio>
#include <string>
using namespace std;
#define rep(i,a,b) for(int i=(a); i<(b); i++)
// i番目(0-index)にnが来た
int dig(int i, int n){
if(i%2 == 1) n*=2;
if(n>9) n = n/10 + n%10;
return n;
}
int n,m;
string id;
int a[10];
unsigned int dp[100000][10];
int mai... | a.cc: In function 'int main()':
a.cc:34:3: error: 'reverse' was not declared in this scope
34 | reverse(id.begin(), id.end());
| ^~~~~~~
|
s216398590 | p00990 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int n, m;
string id;
cin >> n >> id >> m;
vector<int> v(m);
for(int i=0;i<m;i++)cin >> v[i];
reverse(id.begin(), id.end());
int checksum = 0;
vector<int> star;
for(int i=0;i<id.size();i++){
if(id[i] == '*'){
star.push_back(i);
... | a.cc: In function 'int main()':
a.cc:14:9: error: 'reverse' was not declared in this scope
14 | reverse(id.begin(), id.end());
| ^~~~~~~
|
s306723419 | p00990 | C++ | #include<cstdio>
#include<iostream>
#define NMAX 100000
#define MMAX 10
#define AMAX 9
#define KMAX 7
using namespace std;
int n;
char inp;
int ID[NMAX+20];
int m;
int cand[MMAX+5];
int OVERSUM(int x){
return x%10+x/10;
}
int ID_CHECK(int cnt,int sum){
if(cnt==n){a
if(sum%10==0) return 1;
else return 0;
}
... | a.cc: In function 'int ID_CHECK(int, int)':
a.cc:22:20: error: 'a' was not declared in this scope
22 | if(cnt==n){a
| ^
a.cc:24:17: error: expected '}' before 'else'
24 | else return 0;
| ^~~~
a.cc:22:19: note: to match this '{'
22 | ... |
s000742673 | p00991 | C | #include<stdio.h>
#include<math.h>
int E[2],A[2],B[9][2],i,j,k,m=1<<30,R,M=100000007,P[1005][1005]={0};
int d(int a[2],int b[2]){return abs(a[0]-b[0])+abs(a[1]-b[1]);}
int min(int a,int b){return a<b?a:b;}
int C(int p,int q)
{
P[0][0]=1;
for(int i=0;i<=p;i++)
for(int j=0;j<=q;j++)
{
if(i==0||j==0)P[i][j]=1;
... | main.c: In function 'd':
main.c:4:33: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
4 | int d(int a[2],int b[2]){return abs(a[0]-b[0])+abs(a[1]-b[1]);}
| ^~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
2 | #incl... |
s310916247 | p00991 | C++ | import sys
from math import factorial
sys.setrecursionlimit(10000)
def comb (x,y):
return factorial(x)//factorial(x-y)//factorial(y)
w,h,ax,ay,bx,by=map(int,input().split())
dx=min(w-abs(ax-bx),abs(ax-bx))
dy=min(h-abs(ay-by),abs(ay-by))
ans=1
if dx*2==w:ans*=2
if dy*2==h:ans*=2
ans*=comb(dx+dy,dx)
print(ans%10000000... | a.cc:1:1: error: 'import' does not name a type
1 | import sys
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s857851857 | p00991 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int dp[1000][1000];
int solve(int h,int w){
for(int i=1;i<h;i++)for(int j=1;j<w;j++)dp[i][j]=0;
for(int i=0;i<w;i++)dp[0][i]=1;
for(int i=0;i<h;i++)dp[i][0]=1;
for(int i=1;i<h;i++)for(int j=1;j<w;j++)dp[i][j]=(dp[i-1][j]+dp[i][j-1])%100000007;
return dp[h... | a.cc: In function 'int main()':
a.cc:15:46: error: expected primary-expression before '}' token
15 | if(a==c&&b==d){cout<<"0"<<endl;return}
| ^
a.cc:15:46: error: expected ';' before '}' token
15 | if(a==c&&b==d){cout<<"0"<<endl;return}
| ... |
s357768922 | p00991 | C++ | #include <cstdio>
#include <algorithm>
#define MOD (100000007)
typedef __int64 lint;
using namespace std;
lint memo[1024][1024];
lint getWay(int x, int y)
{
if (x == 0 || y == 0){
return (1);
}
if (memo[x][y]){
return (memo[x][y]);
}
return (memo[x][y] = (getWay(x, y - 1) + getWay(x - 1, y)) % MOD);
}
... | a.cc:6:9: error: '__int64' does not name a type; did you mean '__int64_t'?
6 | typedef __int64 lint;
| ^~~~~~~
| __int64_t
a.cc:10:1: error: 'lint' does not name a type; did you mean 'uint'?
10 | lint memo[1024][1024];
| ^~~~
| uint
a.cc:12:1: error: 'lint' does not name a... |
s124750749 | p00991 | C++ | #include <cstdio>
#include <algorithm>
#define MOD (100000007)
typedef __int64 lint;
using namespace std;
lint memo[1024][1024];
lint getWay(int x, int y)
{
if (x == 0 || y == 0){
return (1);
}
if (memo[x][y]){
return (memo[x][y]);
}
return (memo[x][y] = (getWay(x, y - 1) + getWay(x - 1, y)) % MOD);
}
... | a.cc:6:9: error: '__int64' does not name a type; did you mean '__int64_t'?
6 | typedef __int64 lint;
| ^~~~~~~
| __int64_t
a.cc:10:1: error: 'lint' does not name a type; did you mean 'uint'?
10 | lint memo[1024][1024];
| ^~~~
| uint
a.cc:12:1: error: 'lint' does not name a... |
s741166670 | p00991 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<map>
#include<algorithm>
#include<functional>
#define all(c) c.begin(),c.end()
#define uni(c) c.erase(unique(c.begin(),c.end()),c.end())
#define pb push_back
using namespace std;
typedef __int64 ll;
ll mod=100000007;
int comb[2003][2003];
void Comb(int c){
... | a.cc:11:9: error: '__int64' does not name a type; did you mean '__int64_t'?
11 | typedef __int64 ll;
| ^~~~~~~
| __int64_t
a.cc:12:1: error: 'll' does not name a type; did you mean 'all'?
12 | ll mod=100000007;
| ^~
| all
a.cc: In function 'void Comb(int)':
a.cc:25:38: erro... |
s457322492 | p00991 | C++ | #include <cstdlib>
#include <iostream>
#include <vector>
using namespace std;
const int dx[9] = {0, 0, 0, 1, -1, -1, -1, 1, 1};
const int dy[9] = {0, -1, 1, 0, 0, -1, 1, -1, 1};
const long long mod = 100000007;
long long mod_pow(long long m, long long k) {
long long res = 1;
while(k > 0) {
if(k & 1)
(res *= m... | a.cc: In function 'int main()':
a.cc:41:16: error: no matching function for call to 'std::basic_istream<char>::tie(bool)'
41 | cin.tie(false);
| ~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/ios:46,
from /usr/include/c++/14/ostream:40,
from /usr/incl... |
s521405945 | p00991 | C++ | #include <cstdlib>
#include <iostream>
#include <vector>
using namespace std;
const int dx[9] = {0, 0, 0, 1, -1, -1, -1, 1, 1};
const int dy[9] = {0, -1, 1, 0, 0, -1, 1, -1, 1};
const long long mod = 100000007;
long long mod_pow(long long m, long long k) {
long long res = 1;
while(k > 0) {
if(k & 1)
(res *= m... | a.cc: In function 'int main()':
a.cc:41:16: error: no matching function for call to 'std::basic_istream<char>::tie(bool)'
41 | cin.tie(false);
| ~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/ios:46,
from /usr/include/c++/14/ostream:40,
from /usr/incl... |
s543756033 | p00992 | Java | import java.util.*;
public class War {
public static void main (String[] args){
int n=0;
int sum=1;
ArrayList<Integer> h = new ArrayList<Integer>();
Scanner scan = new Scanner(System.in);
n=scan.nextInt();
for(int i=0; i<n; i++){
h.add(scan.nextInt());
}
Collections.sort(h);
Collections.revers... | Main.java:3: error: class War is public, should be declared in a file named War.java
public class War {
^
1 error
|
s171498834 | p00992 | Java | mport java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
class Main {
public static void main (String[] args) throws java.lang.Exception{
int n=0;
int sum=1;
ArrayList<Integer> h = new ArrayList<Integer>();
Scanner scan = new Scanner(System.in);
n=scan.nextInt();
for(int i=0; i... | Main.java:1: error: class, interface, enum, or record expected
mport java.util.ArrayList;
^
Main.java:2: error: class, interface, enum, or record expected
import java.util.Collections;
^
Main.java:3: error: class, interface, enum, or record expected
import java.util.Scanner;
^
3 errors
|
s826418617 | p00992 | Java | mport java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
class Main {
public static void main (String[] args) throws java.lang.Exception{
int n=0;
long sum=1;
ArrayList<Integer> h = new ArrayList<Integer>();
Scanner scan = new Scanner(System.in);
n=scan.nextInt();
for(int i=0; ... | Main.java:1: error: class, interface, enum, or record expected
mport java.util.ArrayList;
^
Main.java:2: error: class, interface, enum, or record expected
import java.util.Collections;
^
Main.java:3: error: class, interface, enum, or record expected
import java.util.Scanner;
^
3 errors
|
s599852469 | p00992 | C++ | include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
int main(){
int n,area[4];
ll h;
cin >> n;
vector<ll> hs;
ull ans = 0;
area[0] = area[1] = area[2] = area[3] = 0;
for(int i=0;i<n;i++){
cin >> h;
hs.push_back(h);
... | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/vector:62,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.