submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s179610614 | p04001 | C++ | #include<bits/stdc++.h>
#include<windows.h>
#define ll long long
using namespace std;
int main(){
string s;
cin>>s;
ll ans=0,num=0;
for(int i=0;i<(1<<s.size()-1);i++){
for(int j=0;j<s.size();j++){
num=num*10+s[j]-'0';
if(i & 1<<j){
ans+=num;
num=0;
}
}
ans+=num;
num=0;
}
Sleep(10000);
co... | a.cc:2:9: fatal error: windows.h: No such file or directory
2 | #include<windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s735392892 | p04001 | C++ | #include<bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
string s;
cin>>s;
ll ans=0,num=0;
for(int i=0;i<(1<<s.size()-1);i++){
for(int j=0;j<s.size();j++){
num=num*10+s[j]-'0';
if(i & 1<<j){
ans+=num;
num=0;
}
}
ans+=num;
num=0;
}
Sleep(1000);
cout<<ans<<endl;
retur... | a.cc: In function 'int main()':
a.cc:19:9: error: 'Sleep' was not declared in this scope; did you mean 'sleep'?
19 | Sleep(1000);
| ^~~~~
| sleep
|
s174501931 | p04001 | C++ | #include <iostream>
#include <vector>
#include <cstdio>
#include <cstdlib>
using namespace std;
typedef long long ll;
int n;
ll ans;
bool flg[12];
string s;
void calc() {
vector<string> v;
int idx = 0;
string tmp;
while (true) {
if (idx > 0 && flg[idx - 1]) {
v.push_back(tmp);
tmp = "";
... | a.cc: In function 'int main()':
a.cc:53:5: error: 'memset' was not declared in this scope
53 | memset(flg, 0, sizeof(flg));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <cstdlib>
+++ |+#include <cstring>
... |
s375026741 | p04001 | C++ | s = input()
n = len(s)
ans = 0
for i in range(1 << (n-1)):
formula = s[0]
for j in range(n-1):
if (i >> j) & 1 == 1:
formula += s[j+1]
else:
formula += '+' + s[j+1]
ans += eval(formula)
print(ans)
| a.cc:1:1: error: 's' does not name a type
1 | s = input()
| ^
|
s936770644 | p04001 | C++ | #include <bits/stdc++.h>
#typedef long long ll
using namespace std;
inline ll pow10(ll a){
if(!a)return 1;
return pow10(a-1)*10;
}
int main(){
ll a,ans;
cin>>a;
ans+=a;
ll dig=log10(a)+1;
for(ll i=dig;i>0;i--){
for(ll j=dig-i;j>=0;j--){
ans+=a/pow10(j)%pow10(i)<<i-1;
}
}
cout<<a;
}
| a.cc:2:2: error: invalid preprocessing directive #typedef
2 | #typedef long long ll
| ^~~~~~~
a.cc:4:8: error: 'll' does not name a type
4 | inline ll pow10(ll a){
| ^~
a.cc: In function 'int main()':
a.cc:9:3: error: 'll' was not declared in this scope
9 | ll a,ans;
| ^~
a.cc:... |
s081511213 | p04001 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long long a;
cin>>a;
a+=a/10+a%1e9+((a/1e2+a/10%1e8+a%1e8)<<1)+((a/1e3+a/1e2%1e7+a/10%1e7+a%1e7)<<2)+((a/1e4+a/1e3%1e6+a/1e2%1e6+a/10%1e6+a%1e6)<<3)+((a/1e5+a/1e4%1e5+a/1e3%1e5+a/1e2%1e5+a/10%1e5+a%1e5)<<4)+((a/1e6+a/1e5%1e4+a/1e4%1e4+a/1e3%1e4+a/1e2%1e4+a... | a.cc: In function 'int main()':
a.cc:6:12: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
6 | a+=a/10+a%1e9+((a/1e2+a/10%1e8+a%1e8)<<1)+((a/1e3+a/1e2%1e7+a/10%1e7+a%1e7)<<2)+((a/1e4+a/1e3%1e6+a/1e2%1e6+a/10%1e6+a%1e6)<<3)+((a/1e5+a/1e4%1e5+a/1e3%1e5+a/1e2%1e5+a/10%1e5+a%1e5)<<... |
s849820243 | p04001 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
ll a;
cin>>a;
a+=a/10+a%1e9+((a/1e2+a/10%1e8+a%1e8)<<1)+((a/1e3+a/1e2%1e7+a/10%1e7+a%1e7)<<2)+((a/1e4+a/1e3%1e6+a/1e2%1e6+a/10%1e6+a%1e6)<<3)+((a/1e5+a/1e4%1e5+a/1e3%1e5+a/1e2%1e5+a/10%1e5+a%1e5)<<4)+((a/1e6+a/1e5%1e4+a/1e4%1e4+a/1e3%1e4+a/1e2%1e4+a/10%1e4... | a.cc: In function 'int main()':
a.cc:4:3: error: 'll' was not declared in this scope
4 | ll a;
| ^~
a.cc:5:8: error: 'a' was not declared in this scope
5 | cin>>a;
| ^
|
s457328566 | p04001 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <queue>
#include <set>
#include <numeric>
#include <cmath>
using namespace std;
typedef long long int ll;
#define all(x) x.begin(),x.end()
const ll mod = 1e9+7;
const ll INF = 1e9;
const ll MAXN = 1e9;
int main(... | a.cc: In function 'int main()':
a.cc:30:17: error: 'bitset' was not declared in this scope
30 | cout << bitset<8>(bit) << endl;
| ^~~~~~
a.cc:10:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>'
9 | #include <cmath>
+++ ... |
s205618704 | p04001 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <queue>
#include <set>
#include <numeric>
#include <cmath>
using namespace std;
typedef long long int ll;
#define all(x) x.begin(),x.end()
const ll mod = 1e9+7;
const ll INF = 1e9;
const ll MAXN = 1e9;
int main(... | a.cc: In function 'int main()':
a.cc:30:17: error: 'bitset' was not declared in this scope
30 | cout << bitset<8>(bit) << endl;
| ^~~~~~
a.cc:10:1: note: 'std::bitset' is defined in header '<bitset>'; this is probably fixable by adding '#include <bitset>'
9 | #include <cmath>
+++ ... |
s528674807 | p04001 | Java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.*;
import java.util.*;
import static main.Main_1.sc;
/**
*
* @author baito
*/
public class Main
{
static Stri... | Main.java:10: error: package main does not exist
import static main.Main_1.sc;
^
Main.java:10: error: static import only from classes and interfaces
import static main.Main_1.sc;
^
2 errors
|
s176761882 | p04001 | C++ | #include<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
#include<iostream>
#include<cmath>
#include<cstdlib>
#include<queue>
#include<vector>
#define pa pair<int,int>
using namespace std;
const int MAXN=1000010;
int dis[MAXN];
vector <pa> g[MAXN];
vector <int> new_g[MAXN],all[MAXN];
int visit[MAXN],p... | a.cc: In function 'int main()':
a.cc:54:31: error: 'x' was not declared in this scope
54 | new_g[x].push_back(newn);
| ^
|
s369664444 | p04001 | C++ | (ns Atcoder.ARC061-A)
(def S (read-line))
(def len (count S))
(defn char2int [c]
(- (int c) (int \0))
)
(defn calc [i]
(loop [j 1 now (char2int (nth S 0)) sum 0]
(if (= len j)
(+ sum now)
(if (= (bit-and 1 (bit-shift-right i (dec j))) 1)
(recur (inc j) (char2int (nth S j)) (+ sum now))
... | a.cc:8:19: error: stray '\' in program
8 | (- (int c) (int \0))
| ^
a.cc:1:4: error: expected ')' before 'Atcoder'
1 | (ns Atcoder.ARC061-A)
| ~ ^~~~~~~~
| )
|
s161893456 | p04001 | C++ | s = raw_input()
l = len(s)
ans = 0
for p in range(l):
for q in range(p+1,l+1):
ans += int(s[p:q]) * (2**max(p-1,0)) * (2**max(l-q-1,0))
print ans
| a.cc:1:1: error: 's' does not name a type
1 | s = raw_input()
| ^
|
s721958750 | p04001 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <cstdio>
using namespace std;
string S;
long long all_sum = 0;
void search(int i, int j, int sum)
{
if(i == S.length())
{
all_sum += (sum + stoll(S.substr(j)));
}
else
{
search(i+1, i, sum + stoll(S.substr(j, i-j)));
search(i+1, ... | a.cc:42:8: error: redefinition of 'std::string S'
42 | string S;
| ^
a.cc:8:8: note: 'std::string S' previously declared here
8 | string S;
| ^
a.cc:44:11: error: redefinition of 'long long int all_sum'
44 | long long all_sum = 0;
| ^~~~~~~
a.cc:10:11: note: 'long lon... |
s850822619 | p04001 | C++ | #include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n,m) for (int i=n; i<m; i++)
#define all(v) (v).begin(), (v).end()
#define pb(q) push_back(q)
#define Abs(a,b) max(a,b)-min(a,b)
#define YES(condition) if(condition){cout << "YES" << endl;}else{cout << "NO" << endl;}
#def... | a.cc: In function 'int main()':
a.cc:30:8: error: too few arguments to function 'bool dfs(int, int, long long int, std::string, int)'
30 | dfs(1,0,0);
| ~~~^~~~~~~
a.cc:16:6: note: declared here
16 | bool dfs(int i, int d, long long sum, string s, int l);
| ^~~
a.cc: In function 'int dfs(... |
s086647760 | p04001 | C++ | in = input()
print(in) | a.cc:1:1: error: 'in' does not name a type; did you mean 'int'?
1 | in = input()
| ^~
| int
|
s680958297 | p04001 | C++ | S=input() | a.cc:1:1: error: 'S' does not name a type
1 | S=input()
| ^
|
s167420146 | p04001 | C++ | S=input()
l=len(S)
out = 0;
for i in range(l):
out += int(S[i:l]) | a.cc:1:1: error: 'S' does not name a type
1 | S=input()
| ^
a.cc:6:1: error: expected unqualified-id before 'for'
6 | for i in range(l):
| ^~~
|
s832463051 | p04001 | C++ | //http://codeforces.com/problemset/problem
#include <string>
#include<iostream >
#include<utility>
#include<cstdlib>
#include <cstdio>
#include <vector>
#include <queue>
#include <cmath>
#include <map>
#include <set>
#include <algorithm>
#include <deque>
#include <stdio.h>
#include <fstream>
#include <ctime>
#include ... | a.cc:3:9: fatal error: iostream : No such file or directory
3 | #include<iostream >
| ^~~~~~~~~~~
compilation terminated.
|
s427670269 | p04001 | C++ | #include<bits\\stdc++.h>
using namespace std;
char s[12345];
int main(){
scanf("%s",s);
int len=strlen(s);
long long ans=0;
for(int t=0;t<(1<<(len-1));t++){
long long num=s[0]-'0';
for(int i=0;i<len-1;i++){
if(t&(1<<i)){
ans+=num;
num=0;
}
num=num*10+s[i+1]-'0';
}
ans+=num;
}
cout<<ans;
} | a.cc:1:9: fatal error: bits\\stdc++.h: No such file or directory
1 | #include<bits\\stdc++.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s757310469 | p04001 | C++ | #include<bits\\stdc++.h>
using namespace std;
int n;
char wcz[1007];
int czy[1007];
long long wyn;
void check(){
czy[n]=1;
long long aktu=0;
for(int i=1;i<=n;i++){
aktu*=10;
aktu+=wcz[i]-'0';
if(czy[i]){
wyn+=aktu;
aktu=0;
}
}
}
void rek(int v){
if(v==n){
check();
return;
}
czy[v]=0;
rek(v+1);... | a.cc:1:9: fatal error: bits\\stdc++.h: No such file or directory
1 | #include<bits\\stdc++.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s366934603 | p04001 | C++ | #include <iostream>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <random>
#include <string>
#include <bitset>
#include <map>
#include <vector>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <cstring>
#include <cstdlib>
#include <cctype>
#define rep(i, n) for(int i = 0; i ... | a.cc: In function 'int main()':
a.cc:60:12: error: 'S' was not declared in this scope
60 | cin >> S;
| ^
|
s635890124 | p04001 | C++ | #include <iostream>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <random>
#include <string>
#include <bitset>
#include <map>
#include <vector>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <cstring>
#include <cstdlib>
#include <cctype>
#define rep(i, n) for(int i = 0; i ... | a.cc: In function 'int main()':
a.cc:61:16: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
61 | n = strlen(S);
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/incl... |
s359583889 | p04001 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
ll stoll(string s) {
ll res = 0;
for (int i = 0; i < s.size(); i++) {
res = res * 10 + (s[i] - '0');
}
return res;
}
ll dfs(string &s, int p, int w, ll sum) {
if (p + w == s.size()) return sum + stoll(s.subs... | a.cc: In function 'll dfs(std::string&, int, int, ll)':
a.cc:16:44: error: call of overloaded 'stoll(std::__cxx11::basic_string<char>)' is ambiguous
16 | if (p + w == s.size()) return sum + stoll(s.substr(p, w));
| ~~~~~^~~~~~~~~~~~~~~~
a.cc:7:4: note: candidate: 'll sto... |
s181162962 | p04001 | C++ | #include <iostream>
#include <cmath>
#include <string>
using namespace std;
#define MAX_S 10
// 入力
char s[MAX_S];
long long ans = 0;
long long arr[MAX_S] = {1, 11, 112, 1124, 11248, 112496, 1124992, 11249984, 112499968, 1124999936};
int main() {
cin >> s;
int le = strlen(s);
for (int i = 0; i < le; ++... | a.cc: In function 'int main()':
a.cc:18:14: error: 'strlen' was not declared in this scope
18 | int le = strlen(s);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <cmath>
+++ |+#include <cstring>
... |
s459112209 | p04001 | C++ | #include <iostream>
#include <cmath>
using namespace std;
#define MAX_S 10
// 入力
char s[MAX_S];
long long ans = 0;
long long arr[MAX_S] = {1, 11, 112, 1124, 11248, 112496, 1124992, 11249984, 112499968, 1124999936};
int main() {
cin >> s;
int le = strlen(s);
for (int i = 0; i < le; ++i) {
ans +... | a.cc: In function 'int main()':
a.cc:17:14: error: 'strlen' was not declared in this scope
17 | int le = strlen(s);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <cmath>
+++ |+#include <cstring>
... |
s171404370 | p04001 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cmath>
#include <queue>
#include <map>
#include <unordered_map>
#include <set>
#include <bitset>
#include <functional>
using namespace std;
typedef long long ll;
vector<pair<int, int>> edg[100003];
set<pair<int, int>> used;
priori... | a.cc: In function 'int main()':
a.cc:27:43: error: expected ';' before '}' token
27 | edg[q].push_back({ p, c })
| ^
| ;
28 | }
| ~
|
s139283810 | p04001 | C | /*
cat <<EOF >mistaken-paste
*/
#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#define BIG 2000000007
#define MOD 1000000007
typedef uint64_t ull;
typedef int64_t sll;
#define N_MAX... | main.c: In function 'solve':
main.c:353:23: error: 's' undeclared (first use in this function)
353 | slen = strlen(s);
| ^
main.c:353:23: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:394:21: error: 's' und... |
s486913063 | p04001 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <queue>
#include <cmath>
#define MOD 1000000007;
#define PI 3.14159265358979323846;
using namespace std;
typedef long long ll;
ll mod = 1000000007;
string S;
int total = 0;
vector<string> split(const st... | a.cc: In function 'int main()':
a.cc:80:1: error: a function-definition is not allowed here before '{' token
80 | {
| ^
a.cc:96:1: error: a function-definition is not allowed here before '{' token
96 | {
| ^
a.cc:105:1: error: a function-definition is not allowed here before '{' token
105 | {
... |
s043267055 | p04001 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
int keta(int n){
int ans=0;
while(n>0){
ans++;
n/=10;
}
return ans;
}
int main(void){
string s;
cin>>s;
vector<long long> a(s.size());
for(int i=0;i<s.size();i++){
fo... | a.cc: In function 'int main()':
a.cc:20:19: error: 'pow' was not declared in this scope
20 | a[i]+=pow(2,j)*pow(10,i-j);
| ^~~
a.cc:23:15: error: 'pow' was not declared in this scope
23 | a[i]+=pow(10,keta(a[i]));
| ^~~
|
s669885295 | p04001 | C++ | 9999999999
12656242944
Program ended with exit code: 0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 9999999999
| ^~~~~~~~~~
|
s019138142 | p04001 | C++ | #include"stdio.h"
#include"stdlib.h"
#include"string.h"
#include"math.h"
int main(){
unsigned _int64 S = 0;
unsigned _int64 SS = 0;
int N = 0;
int i = 0, j = 0;
char str[11];
int plus[9] = {};
_int64 stack = 0;
scanf("%s", str);
N = strlen(str);
for (i = 0; i < pow((double)2, N - 1) ; i++){
stack ... | a.cc: In function 'int main()':
a.cc:9:25: error: expected initializer before 'S'
9 | unsigned _int64 S = 0;
| ^
a.cc:10:25: error: expected initializer before 'SS'
10 | unsigned _int64 SS = 0;
| ^~
a.cc:16:9: error: '_int64' was not dec... |
s678435426 | p04001 | C++ | #include"stdio.h"
#include"stdlib.h"
#include"string"
int flag(int plus[], int N){
int S = 1;
for (int i = 0; i < N - 1; i++){
S *= plus[i];
}
return S;
}
int main(){
long long int S = 0;
long long int SS = 0;
int N = 0;
int i = 0, j = 0;
char str[10];
int plus[9] = {};
int data[10] = {};
int stack = 0... | a.cc: In function 'int main()':
a.cc:25:13: error: 'strlen' was not declared in this scope
25 | N = strlen(str);
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include"string"
+++ |+#include <cstring>
... |
s018029376 | p04001 | C++ | #include"stdio.h"
#include"stdlib.h"
#include"string"
int flag(int plus[], int N){
int S = 1;
for (int i = 0; i < N - 1; i++){
S *= plus[i];
}
return S;
}
int main(){
long long int S = 0;
long long int SS = 0;
int N = 0;
int i = 0, j = 0;
char str[10];
int plus[9] = {};
int data[10] = {};
int stack = 0... | a.cc: In function 'int main()':
a.cc:25:13: error: 'strlen' was not declared in this scope
25 | N = strlen(str);
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include"string"
+++ |+#include <cstring>
... |
s349888422 | p04001 | C++ | #include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define ld double
#define ll long long
#define int long long
using namespace std;
const int MAXN = 301 * 1001 , MOD = 1e9 + 7 , sq = 333 ;
unordered_map < int , int > d[MAXN];
unordered_map < int , vector < int> > adj2[MAXN] ;
int... | a.cc: In function 'int32_t main()':
a.cc:56:25: error: invalid types 'long long int[long long int]' for array subscript
56 | if(dis[x]>dis[x][c])
| ^
|
s126351023 | p04001 | C++ |
/**
* @Author Mehdi Maick
* Created on 10/12/2016.
*/
import java.util.*;
import java.io.*;
import static java.lang.Math.*;
public class Main {
public static void solve(FastReader fs, PrintWriter pw) {
char[] s = fs.next().toCharArray();
long ans = 0;
int n = s.length;
for (in... | a.cc:7:1: error: 'import' does not name a type
7 | import java.util.*;
| ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: 'import' does not name a type
8 | import java.io.*;
| ^~~~~~
a.cc:8:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:10:1:... |
s218021890 | p04001 | C++ | #include <cstdio>
#include <cstdlib>
#include <typeinfo>
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
typedef long long ll;
#define MAX_L (10)
char S[MAX_L + 1];
void print_array(int *ar, int n) {
for (size_t i = 0; i < n; i++) {
printf("%d ", ar[i]);
}
printf("\n");
}
... | a.cc: In function 'int main()':
a.cc:57:11: error: 'strlen' was not declared in this scope
57 | int L = strlen(S);
| ^~~~~~
a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include <algorithm>
+++ |+#include <cstring>
... |
s945714494 | p04001 | C++ | import java.io.BufferedReader;
import java.io.InputStreamReader;
class Main {
static BufferedReader br;
public static void main(String[] args) {
try {
br = new BufferedReader(new InputStreamReader(System.in));
String S = br.readLine();
double length = S.length();
double sum = 0;
for (int i = 0; i <... | 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.InputStreamReader;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available wit... |
s028629265 | p04001 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <map>
using namespace std;
typedef long long ll;
const int N = 100010;
int a[N], b[N];
map<pair<int, int> , int> hash;
long long ans[10];
int cal(int x, int y) {
int res = 0;
for (int i = x; i <= x + 2; i++)
for (int j = y; j... | a.cc: In function 'int cal(int, int)':
a.cc:19:29: error: reference to 'hash' is ambiguous
19 | if (hash.find(make_pair(i, j)) != hash.end()) {
| ^~~~
In file included from /usr/include/c++/14/string_view:50,
from /usr/include/c++/14/bits/bas... |
s534796907 | p04001 | C++ | dp=["","+"]
s=input()
su=0
for i in range(2**(len(s)-1)):
val=""
for j in range(len(s)-1):
val+=s[j]
val+=dp[int(bin(i)[j+2])]
val+=s[len(s)-1]
su+=eval(val)
print(su)
| a.cc:1:1: error: 'dp' does not name a type
1 | dp=["","+"]
| ^~
|
s546077838 | p04001 | Java | import java.util.Scanner;
public class main{
static int[] fact = new int[10];
static int[] sum = new int[10];
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.next();
long[] num = new long[str.length()];
for(int i=0; i<str.length(); i++){
num[i] = str.charAt... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main{
^
1 error
|
s445344906 | p04001 | C++ | #include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
using namespace std;
#define GETBIT(X, Data) ((Data >> (X)) & 0x01)
#define SETBIT_ON(X, Data) ((0x01 << (X)) | Data)
#define SETBIT_OFF(X, Data) ((~(0x01 << (X))) & Data)
unsigned long long SubInt(const int& s, const int& e, const strin... | a.cc: In function 'long long unsigned int SubInt(const int&, const int&, const std::string&)':
a.cc:15:9: error: 'memcpy' was not declared in this scope
15 | memcpy(str, &input[s], e - s + 1);
| ^~~~~~
a.cc:4:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding... |
s526660745 | p04001 | C++ | #include <iostream>
#include <vector>
#include <string>
using namespace std;
#define GETBIT(X, Data) ((Data >> (X)) & 0x01)
#define SETBIT_ON(X, Data) ((0x01 << (X)) | Data)
#define SETBIT_OFF(X, Data) ((~(0x01 << (X))) & Data)
unsigned long long SubInt(const int& s, const int& e, const string& input)
{
char st... | a.cc: In function 'long long unsigned int SubInt(const int&, const int&, const std::string&)':
a.cc:14:9: error: 'memcpy' was not declared in this scope
14 | memcpy(str, &input[s], e - s + 1);
| ^~~~~~
a.cc:3:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding... |
s322237156 | p04001 | C++ | #include <iostream>
#include <vector>
#include <string>
using namespace std;
#define GETBIT(X, Data) ((Data >> (X)) & 0x01)
#define SETBIT_ON(X, Data) ((0x01 << (X)) | Data)
#define SETBIT_OFF(X, Data) ((~(0x01 << (X))) & Data)
unsigned long long SubInt(const int& s, const int& e, const string& input)
{
char st... | a.cc: In function 'long long unsigned int SubInt(const int&, const int&, const std::string&)':
a.cc:14:9: error: 'memcpy' was not declared in this scope
14 | memcpy(str, &input[s], e - s + 1);
| ^~~~~~
a.cc:3:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding... |
s898319423 | p04001 | C++ | #include <iostream>
#include <vector>
#include <string>
using namespace std;
#define GETBIT(X, Data) ((Data >> (X)) & 0x01)
#define SETBIT_ON(X, Data) ((0x01 << (X)) | Data)
#define SETBIT_OFF(X, Data) ((~(0x01 << (X))) & Data)
unsigned __int64 SubInt(const int& s, const int& e, const string& input)
{
char str[... | a.cc:11:18: error: expected initializer before 'SubInt'
11 | unsigned __int64 SubInt(const int& s, const int& e, const string& input)
| ^~~~~~
a.cc:18:18: error: expected initializer before 'SolveOptStr'
18 | unsigned __int64 SolveOptStr(const int& opts, const string& input)
| ... |
s228859513 | p04001 | C++ | あsdfghjkl | a.cc:1:1: error: '\U00003042sdfghjkl' does not name a type
1 | あsdfghjkl
| ^~~~~~~~~~
|
s988818728 | p04001 | C++ | s = input()
int_s = [int(i) for i in s]
l = len(int_s)
total_patterns = 2 << (l - 2)
def calc_sum(s):
# '+'を区切りとして和を求める
num = s.split('+')
return sum(list(map(int, num)))
ans = 0
for i in range(total_patterns):
between = format(i,'b').zfill(l - 1) # 10進数を2進数に変換
tmp = ''
for j in range(len(bet... | a.cc:8:7: error: invalid preprocessing directive #'+'を区切りとして和を求める
8 | # '+'を区切りとして和を求める
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:14:42: error: stray '#' in program
14 | between = format(i,'b').zfill(l - 1) # 10進数を2進数に変換
| ^
a.cc:15:11: error: empty cha... |
s085162333 | p04001 | C++ | #include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG
#define debug(...) printf(__VA_ARGS__)
#else
#define debug(...) (void)0
#endif
#define mp make_pair
#define pb push_back
#define LL long long
#define pii pair<int,int>
#define PII pair<long long, long long... | a.cc: In function 'int main()':
a.cc:80:25: error: 'dis' was not declared in this scope; did you mean 'div'?
80 | int D = -dis[u];
| ^~~
| div
|
s605430341 | p04001 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <set>
#include <map>
#include <unordered_map>
#include <vector>
#include <queue>
#include <string>
#include <iomanip>
#include <stdio.h>
#include <cstring>
#include <random>
#include <chrono>
#include <bitset>
#include <fstream>
#inclu... | a.cc: In function 'int main()':
a.cc:108:21: error: invalid operands of types 'll*' {aka 'long long int*'} and 'll' {aka 'long long int'} to binary 'operator&'
108 | scanf("%d %d" , &n &m);
| ~~ ^~
| | |
| | ll {aka long long int}
| ... |
s590732453 | p04001 | C++ | #include<iostream>
#include<iomanip>
#include<map>
#include<unordered_set>
#include<set>
#include<vector>
#include<array>
#include<string>
#include<stack>
#include<queue>
#include<algorithm>
#include<cassert>
#include<functional>
#include<random>
#define int int32_t
#define REP(i, a, b) for (int32_t i = (int32_t)(a); i... | In file included from /usr/include/c++/14/bits/hashtable.h:35,
from /usr/include/c++/14/bits/unordered_set.h:33,
from /usr/include/c++/14/unordered_set:41,
from a.cc:4:
/usr/include/c++/14/bits/hashtable_policy.h: In instantiation of 'std::__detail::_Hash_code_base<_Ke... |
s234442167 | p04001 | C++ | #include <bits/stdc++.h>
#define FOR(i,a,b) for(LL i=(a);i<(LL)(b);i++)
#define REP(i,b) FOR(i,0,b)
#define ALL(c) c.begin(),c.end()
#define PB push_back
#define FF first
#define SS second
#define cat //cout << __LINE__ << endl;
using namespace std;
typedef long long LL;
typedef double ld;
typedef LL ut;
typedef vector... | a.cc: In function 'int main()':
a.cc:38:27: error: no matching function for call to 'std::vector<std::pair<long long int, long long int> >::push_back(const ut&)'
38 | edge[i].PB(INF);
| ~~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/vector:66,
from /u... |
s630101181 | p04001 | C++ | #include <climits>
#include <cmath>
#include <vector>
#include <queue>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <iostream>
using namespace std;
#define MODULE 1000000007
#define MP make_pair
template<class T, class U>
inline void chmin(T &t, U f) { if (t > f)t = f; }
template<class T, clas... | a.cc:39:23: error: 'iLL' was not declared in this scope; did you mean 'LL'?
39 | void sumVector(vector<iLL> &nums){
| ^~~
| LL
a.cc:39:26: error: template argument 1 is invalid
39 | void sumVector(vector<iLL> &nums){
| ^
a.cc:3... |
s936433065 | p04001 | C++ | #include <climits>
#include <cmath>
#include <vector>
#include <queue>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <iostream>
using namespace std;
#define MODULE 1000000007
#define MP make_pair
template<class T, class U>
inline void chmin(T &t, U f) { if (t > f)t = f; }
template<class T, clas... | a.cc:39:23: error: 'iLL' was not declared in this scope; did you mean 'LL'?
39 | void sumVector(vector<iLL> &nums){
| ^~~
| LL
a.cc:39:26: error: template argument 1 is invalid
39 | void sumVector(vector<iLL> &nums){
| ^
a.cc:3... |
s639701597 | p04001 | C++ | #include<iostream>
#include<cmath>
#include<stack>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;
typedef unsigned long long ll;
ll stol(string s){
ll res=0;
rep(i,s.size()){
res+=(int)(s[i]-'0')*pow(10,s.size()-i-1);
}
return res;
}
ll cal(stack<char> ta){
ll res=0,... | a.cc: In function 'int main()':
a.cc:32:15: error: call of overloaded 'stol(std::string&)' is ambiguous
32 | n=stol(s);
| ~~~~^~~
a.cc:9:4: note: candidate: 'll stol(std::string)'
9 | ll stol(string s){
| ^~~~
In file included from /usr/include/c++/14/string:54,
... |
s650624158 | p04001 | C++ | #include <iostream>
#include <string>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
int main(int argc, char* argv[])
{
string S;
cin>>S;
long long sum=0;
int i=0;
int sLen = S.length();
char *pStr = (char*)S.c_str();
for (i=0;i<sLen;i++){
sum+=pStr[i]-'0';
}
sum+=_atoi64((char*)S.c_str());
lo... | a.cc: In function 'int main(int, char**)':
a.cc:18:14: error: '_atoi64' was not declared in this scope; did you mean 'atoi'?
18 | sum+=_atoi64((char*)S.c_str());
| ^~~~~~~
| atoi
|
s155797838 | p04001 | C++ | #include<iostream>
#include<string>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<vector>
#include<set>
#include<map>
#include<queue>
#include<functional>
#include<algorithm>
#define ms0(a) memset(a,0,sizeof(a))
#define ms1(a) memset(a,-1,sizeof(a))
#define pb(a) push_back(a)
using names... | a.cc:17:9: error: '__int64' does not name a type; did you mean '__int64_t'?
17 | typedef __int64 ll;
| ^~~~~~~
| __int64_t
a.cc:25:1: error: 'll' does not name a type
25 | ll c[15];
| ^~
a.cc:27:1: error: 'll' does not name a type
27 | ll asr =0;
| ^~
a.cc: In function '... |
s524940699 | p04001 | C++ | // Author : SAGORIKA DAS
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define CLEAR(a) memset(a,0,sizeof a)
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define fr freopen("input.txt", "r", stdin);
#define fw f... | a.cc:38:2: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
38 | main() {
| ^~~~
a.cc: In function 'int main()':
a.cc:46:55: error: no matching function for call to 'max(long long int&, long long unsigned int)'
46 | ret += val*(_pow(2,max(i-1,zero)))*(_pow(2,max(zero,s.s... |
s187565908 | p04001 | C++ | // Author : SAGORIKA DAS
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define CLEAR(a) memset(a,0,sizeof a)
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define fr freopen("input.txt", "r", stdin);
#define fw f... | a.cc:28:2: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
28 | main() {
| ^~~~
a.cc: In function 'int main()':
a.cc:36:53: error: no matching function for call to 'max(long long int&, long long unsigned int)'
36 | ret += val*(pow(2,max(i-1,zero)))*(pow(2,max(zero,s.siz... |
s303916349 | p04001 | C++ | // Author : SAGORIKA DAS
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define CLEAR(a) memset(a,0,sizeof a)
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define fr freopen("input.txt", "r", stdin);
#define fw f... | a.cc:28:2: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
28 | main() {
| ^~~~
a.cc: In function 'int main()':
a.cc:35:52: error: no matching function for call to 'max(long long int, long long unsigned int)'
35 | ret += val*(pow(2,max(i-1,0LL)))*(pow(2,max(0LL,s.size()... |
s949626958 | p04001 | C++ | #include<cstdio>
#include<cstring>
using namespace std;
const int MAX = 10 + 10;
char arr[MAX];
char tmp[MAX];
int main(){
gets(arr);
int len = strlen(arr);
long long ans = 0;
for(int i = 0 ; i < (1<<(len-1)) ; i++){
memset(tmp, 0, sizeof(tmp));
int now = 0;
for(int j = 0 ; j < len ; j++){
tmp... | a.cc: In function 'int main()':
a.cc:8:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
8 | gets(arr);
| ^~~~
| getw
|
s623471779 | p04001 | C++ | #include <map>
#include <functional>
#include <iterator>
#include <vector>
#include <cstdio>
#include <array>
namespace XX
{
template<template<typename> class Compare, typename T>
inline T& UP(T& x, const T& y){if(Compare<T>()(y, x)) x = y; return x;}
template<typename Compare, typename T>
inline T& ... | a.cc: In function 'int main()':
a.cc:106:13: error: 'strlen' was not declared in this scope
106 | int N = strlen(buf);
| ^~~~~~
a.cc:97:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
96 | #include <algorithm>
+++ |+#include <cstri... |
s233832427 | p04001 | C++ | #include<iostream>
using namespace std;
char s[111];
int n;
long long tot;
void dfs(int dep, long long sum, long long cur) {
if(dep==n) {
tot += sum + cur;
return;
}
if(cur) dfs(dep+1, sum + cur, s[dep] - '0');
dfs(dep+1, sum, cur*10+s[dep]-'0');
}
int main() {
cin>>s;
n = strlen(s);
tot = 0LL;
dfs(0, 0L... | a.cc: In function 'int main()':
a.cc:19:13: error: 'strlen' was not declared in this scope
19 | n = strlen(s);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#include <cstring>
... |
s833209471 | p04001 | C++ | import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
impo... | 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.Closeable;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmod... |
s668971791 | p04002 | C++ | /*-- ILSH --*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double ld;
#define pb push_back
#define pop pop_back
#define mp make_pair
#define vii vector < ll >
#define pii pair< ll, ll >
#define len length
#define fi first
#define se second
#define dt cout<<"HEre\n";
#define sz(x) ... | a.cc: In function 'void solve()':
a.cc:32:31: error: no matching function for call to 'max(int, ll)'
32 | for ( ll i=max(1,a-2);i<=min(h-2,a);i++){
| ~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu... |
s883801970 | p04002 | C++ | #include<stdio.h>
#include<string.h>
#include<algorithm>
#include<iostream>
using namespace std;
typedef long long ll;
ll inf = (ll)1e9 + 7;
ll a[900009];
ll sum[20];
int dx[] = { 0,-1,-2,0,-1,-2,0,-1,-2 };
int dy[] = { 0,0,0,-1,-1,-1,-2,-2,-2 };
int main()
{
ll h, m, n;
scanf_s("%lld%lld%lld", &h, &m, &n);
ll x, y;... | a.cc: In function 'int main()':
a.cc:15:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
15 | scanf_s("%lld%lld%lld", &h, &m, &n);
| ^~~~~~~
| scanf
|
s036090001 | p04002 | C++ | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define ll long long
#define rep2(i,a,b) for(int i=a;i<=b;++i)
#define rep(i,n) for(int i=0;i<n;i++)
#define ios ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;
inline char getcha() {
if (ci - cn == cm) { fread_unlocked(cn, 1, cm, stdin); ci... | a.cc: In function 'char getcha()':
a.cc:9:13: error: 'ci' was not declared in this scope
9 | if (ci - cn == cm) { fread_unlocked(cn, 1, cm, stdin); ci = cn; }
| ^~
a.cc:9:18: error: 'cn' was not declared in this scope; did you mean 'yn'?
9 | if (ci - cn == cm) { fread_unlocked(... |
s118518653 | p04002 | C++ | #include<bits/stdc++.h>
using namespace std;
long long int h,w;
int n;
map<pair<int,int>,int> ma;
long long int ans[10];
int main(){
cin >> h >> w >> d;
for(int i=1;i<=n;i++){
int a,b;
cin >> a >> b;
for(int j=-1;j<=1;j++){
for(int k=-1;k<=1;k++){
int nx = a+j;
int ny = b+k;
if... | a.cc: In function 'int main()':
a.cc:13:26: error: 'd' was not declared in this scope
13 | cin >> h >> w >> d;
| ^
a.cc:37:25: error: 'a' was not declared in this scope
37 | cout << a[i] << endl;
| ^
|
s322144445 | p04002 | C++ | #include<map>
#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
using namespace std;
#define ll long long
#define REP(i,e,s) for(register ll i=e; i<=s; i++)
#define DREP(i,e,s) for(register ll i=e; i>=s; i--)
#define DE(...) fprintf(stderr,__VA_ARGS__)
#define DEBUG(a) DE("DEBUG: %d\n",a)
#define i... | a.cc:27:13: error: extended character
is not valid in an identifier
27 | int ans[10];
| ^
a.cc:27:13: error: '\U00002028' does not name a type
27 | int ans[10];
| ^
a.cc: In function 'int main()':
a.cc:34:13: warning: ISO C++17 does not allow 'register' storage class specif... |
s444638244 | p04002 | C++ |
#include<bits/stdc++.h>
#include<math.h>
#include <stdio.h>
#include<vector>
#include<deque>
#include<stdlib.h>
#include <algorithm>
#include<set>
#include<map>
#include <limits>
#include<iomanip>
#include<string>
#define rep(i,n) for(int i = 0; i < n; i++)
typedef long long ll;
using namespace std;
#define llMAX nume... | a.cc: In function 'int main()':
a.cc:47:71: error: expected ')' before numeric constant
47 | if(i->first.first<=h-3 && i->first.first>=0 &&i->first.second<=w--3&&i->first.second>=0){
| ~ ^
| ... |
s780617323 | p04002 | C++ |
#include<bits/stdc++.h>
#include<math.h>
#include <stdio.h>
#include<vector>
#include<deque>
#include<stdlib.h>
#include <algorithm>
#include<set>
#include<map>
#include <limits>
#include<iomanip>
#include<string>
#define rep(i,n) for(int i = 0; i < n; i++)
typedef long long ll;
using namespace std;
#define llMAX nume... | a.cc: In function 'int main()':
a.cc:47:71: error: expected ')' before numeric constant
47 | if(i->first.first<=h-3 && i->first.first>=0 &&i->first.second<=w--3&&i->first.second>=0){
| ~ ^
| ... |
s020951069 | p04002 | C++ |
#include<bits/stdc++.h>
#include<math.h>
#include <stdio.h>
#include<vector>
#include<deque>
#include<stdlib.h>
#include <algorithm>
#include<set>
#include<map>
#include <limits>
#include<iomanip>
#include<string>
#define rep(i,n) for(int i = 0; i < n; i++)
typedef long long ll;
using namespace std;
#define llMAX nume... | a.cc: In function 'int main()':
a.cc:30:5: error: 'mar' was not declared in this scope; did you mean 'mat'?
30 | mar[a[i]-1][b[i]-1]=true;
| ^~~
| mat
|
s415033230 | p04002 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#ifdef LOCAL_DEBUG
#include "LOCAL_DEBUG.hpp"
#endif
signed main(){
int h,w,n; cin >> h >> w >> n;
set<pair<int,int>> st,table;
for(int i = 0; i < n; i++){
int a,b; cin >> a >> b;
a--,b--;
st.insert({a,b});
for(int dy : {-1,0,... | a.cc: In function 'int main()':
a.cc:36:36: error: 'struct std::_Rb_tree_const_iterator<std::pair<long long int, long long int> >' has no member named 'first'
36 | if(res != st.end() && *res.first == ny && *res.second == nx) cnt++;
| ^~~~~
a.cc:36:56: error: 'struct s... |
s184352491 | p04002 | Java | import java.util.Scanner;
import java.util.Map;
import java.util.HashMap;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long h = sc.nextLong();
long w = sc.nextLong();
int n = sc.nextInt();
Map<Long, Map<Long, Inte... | Main.java:57: error: reached end of file while parsing
}
^
1 error
|
s555605834 | p04002 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1000000007;
const ll inf = (1 << 30) - 1;
const ll infll = (1LL << 61) - 1;
ll H, W, N;
int dx[8] = {0, 1, 1, 1, 0, -1, -1, -1};
int dy[8] = {1, 1, 0, -1, -1, -1, 0, 1};
ll ans[11];
int main()
{
cin >> H >> W >> N;
set<pair<ll,... | a.cc: In function 'int main()':
a.cc:57:27: error: expected primary-expression before ';' token
57 | for (int i = 0; i < 1-; i++)
| ^
|
s801369360 | p04002 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
int h,w,n;cin>>h>>w>>n;
map<pair<int,int>,int>cnt;
for(int i=0;i<n;i++){
int x,y;
cin >>x>>y;
for(int j=-2;j<=2;j++){
for(int k=-2;k<=2;k++){
int x0,y0;
x0=x+j;y0=y+k;
if(1ll<=x0 && x0<=h && 1ll<=y0 && y0<=w)
{pa... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Ite... |
s245585365 | p04002 | C++ | /// Containers Start
#include <algorithm>
#include <bitset>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include... | a.cc: In function 'int main()':
a.cc:110:17: error: invalid types 'long long int[long long int]' for array subscript
110 | cin >> a[i] >> b[i]; // hoge
| ^
a.cc:110:25: error: invalid types 'long long int[long long int]' for array subscript
110 | cin >> a[i] >> b[i]; // hoge
... |
s336952157 | p04002 | C++ | #include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
#define ALL(a) (a).begin(),(a).end()
#define Yes(hoge) cout<<((hoge)?"Yes":"No")<<endl;
#define YES(hoge) cout<<((hoge)?"YES":"NO")<<endl;
u... | a.cc: In function 'int main()':
a.cc:45:23: error: expected unqualified-id before '=' token
45 | for(int ll=k;ll<=k+2;ll++)
| ^
a.cc:45:23: error: expected ';' before '=' token
a.cc:45:23: error: expected primary-expression before '=' token
a.cc:10:12: error: expected primary-... |
s696977022 | p04002 | C++ | #include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
#define ALL(a) (a).begin(),(a).end()
#define Yes(hoge) cout<<((hoge)?"Yes":"No")<<endl;
#define YES(hoge) cout<<((hoge)?"YES":"NO")<<endl;
u... | a.cc: In function 'int main()':
a.cc:34:20: error: no matching function for call to 'max(long long int, int)'
34 | for(int k=max(1LL,bl[i].S-2);k<=min(bl[i].S,w-2);k++){
| ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-... |
s235453201 | p04002 | C++ | #include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) for(int i=0;i<(n);++i)
#define REPr(i,n) for(int i=(n)-1;i>=0; --i)
#define FORq(i, m, n) for(int i = (m);i <= (n);++i)
#define FORqr(i, m , n) for(int i = (n);i >=(m);--i)
#define SCD(n) scanf("%d",&n)
#define SCD2(m,n) scanf("%d%d"... | a.cc:33:1: error: specializing member 'std::basic_ios<char>::sync_with_stdio' requires 'template<>' syntax
33 | ios::sync_with_stdio(false);
| ^~~
|
s190923416 | p04002 | C++ | #include <bits/stdc++.h>
#include <unordered_set>
using namespace std;
#define ll long long
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define repeat(i,s,n) for(int (i)=s; (i)<(n); (i)++)
#define revrep(i,n) for(int (i)=(n)-1;i>=0; i--)
vector<int> dz = {-2,-1,0,1,2};
int main() {
cin.tie(0);
ios::sync_with_st... | a.cc: In function 'int main()':
a.cc:24:32: error: use of deleted function 'std::unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set() [with _Value = std::pair<int, int>; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >]'
24 | ... |
s062397201 | p04002 | C++ | #include <bits/stdc++.h>
using namespace std ;
#define ll long long
map<pair<int,int>,int>mp;
int h , w , n , cnt[ 10 ] ;
int main(){
scanf( "%d%d%d" , &h , &w , &n ) ;
while( n -- ) {
int x , y ;
scanf( "%d%d" , &x , &y ) ;
for( int i = max( 1 , x - 2 ) ; i <= min( h - 2 , x ) ; i ++ ) {
for( int j = m... | a.cc: In function 'int main()':
a.cc:18:56: error: cannot bind rvalue reference of type 'int&&' to lvalue of type 'int'
18 | mp[ make_pair<int,int>(i,j) ] ++ ;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.... |
s569639826 | p04002 | C++ | #include<cstdio>
#include<vector>
#include<utility>
#include<algorithm>
#include<fstream>
using namespace std;
int main(){
long h,w,num[10]={},a,b;
int n,cnt=0;
vector<pair<long,long>> p;
scanf("%ld %ld %d",&h,&w,&n);
for(int i=0;i<n;i++){
scanf("%ld %ld",&a,&b);
for(long j=max((long)1,a-2);j<=min(a,... | a.cc: In function 'int main()':
a.cc:38:5: error: 'cout' was not declared in this scope
38 | cout << num[i] << endl;
| ^~~~
a.cc:6:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
5 | #include<fstream>
+++ |+#include <iostream>
6... |
s780958129 | p04002 | C | /*
cat <<EOF >mistaken-paste
*/
#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#define BIG 2000000007
#define VERYBIG 200000000000007LL
#define MOD 1000000007
typedef uint64_t ull;
ty... | main.c:481:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
481 | typedef pair<sll, sll> sllpair;
| ^
main.c:482:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
482 | typedef priority_queue<sllpair, vector<sllpair>, greater<sllpair> > pairpq... |
s455961352 | p04002 | C++ | module SqIntMap = Map.Make (struct
type t = int * int
let compare = compare
end)
module IntMap = Map.Make (struct
type t = int
let compare = compare
end)
let () =
let h, w, n = Scanf.scanf "%d %d %d\n" (fun h w n -> h, w, n) in
let abs = Array.init n (fun _ -> Scanf.scanf "%d %d\n" (fun a b -> a, b)) in
... | a.cc:14:27: error: stray '@' in program
14 | let dxdys = List.concat @@ Array.to_list @@ Array.init 3 (fun i -> Array.to_list @@ Array.init 3 (fun j -> (i - 2, j - 2))) in
| ^
a.cc:14:28: error: stray '@' in program
14 | let dxdys = List.concat @@ Array.to_list @@ Array.init 3 ... |
s938550007 | p04002 | C++ | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
using namespace std;
#define FOR(I,A,B) for(int I... | a.cc: In function 'int main()':
a.cc:25:41: error: too many initializers for 'int [4]'
25 | int vy[4] = {-1, -1, 0, 1, 1, 1, 0, -1};
| ^
a.cc:26:41: error: too many initializers for 'int [4]'
26 | int vx[4] = {0, 1, 1, 1, 0, -1, -1, -1};
| ... |
s506142771 | p04002 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
#define MOD 1000000007
#define ll long long;
using namespace std;
int main()
{
ll int h, w, n, flag,len;
int a[100005];
int b[100005];
ll int c[1000006] = {};
cin >> h >> w >> n;
int i,j,k;
long long int ans[10] = {};
len = -1;
for (... | a.cc: In function 'int main()':
a.cc:6:17: error: declaration does not declare anything [-fpermissive]
6 | #define ll long long;
| ^~~~
a.cc:11:9: note: in expansion of macro 'll'
11 | ll int h, w, n, flag,len;
| ^~
a.cc:6:17: error: declaration does not declare anythi... |
s635520485 | p04002 | C++ | 1 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1
| ^
|
s488026171 | p04002 | Java | import java.util.Scanner;
import java.awt.Point;
public class Main{
public static void main(String[] args){
new Main().solve();
}
public void solve(){
Scanner scanner = new Scanner(System.in);
long H = scanner.nextLong();
long W = scanner.nextLong();
int N = scanner.nextInt();... | Main.java:22: error: cannot find symbol
HashMap<Point,Integer> hashmap = new HashMap<Point,Integer>();
^
symbol: class HashMap
location: class Main
Main.java:22: error: cannot find symbol
HashMap<Point,Integer> hashmap = new HashMap<Point,Integer>();
^
... |
s709489472 | p04002 | C++ | #include<iostream>
#include<cstdio>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<algorithm>
#include<complex>
#include<set>
#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
#de... | a.cc:70:2: error: stray '#' in program
70 | }#include<iostream>
| ^
a.cc:70:3: error: 'include' does not name a type
70 | }#include<iostream>
| ^~~~~~~
a.cc:89:5: error: redefinition of 'int h'
89 | int h,w;
| ^
a.cc:20:5: note: 'int h' previously declared here
20 | int h,w;
|... |
s934365328 | p04002 | C++ | #include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
//vector<pair<int, int> > mass;
vector<ll> mass;
ll H, W, zero = 0, ans[10];
int N, A, B;
int main() {
cin >> H >> W >> N;
for (int i = 0; i < N; i++) {
cin >> A >> B;
for (int j = A - 1; j <= A + 1; j++) {
for (int k = B - 1; ... | a.cc: In function 'int main()':
a.cc:24:9: error: 'sort' was not declared in this scope; did you mean 'short'?
24 | sort(mass.begin(), mass.end());
| ^~~~
| short
|
s740557165 | p04002 | C++ | use std::collections::BTreeSet;
fn main() {
let (h, w, n) = {
let a = getvec::<i64>();
(a[0], a[1], a[2])
};
let mut black = BTreeSet::new();
let mut cand = BTreeSet::new();
for _ in 0..n {
let (y, x) = {
let a = getvec::<i64>();
(a[0], a[1])
... | a.cc:10:14: error: too many decimal points in number
10 | for _ in 0..n {
| ^~~~
a.cc:38:14: error: too many decimal points in number
38 | for i in 1..10 {
| ^~~~~
a.cc:41:14: error: too many decimal points in number
41 | for i in 0..10 {
| ^... |
s802455611 | p04002 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <map>
using namespace std;
typedef long long ll;
const int N = 100010;
int a[N], b[N];
map<pair<int, int> , int> hash;
long long ans[10];
int cal(int x, int y) {
int res = 0;
for (int i = x; i <= x + 2; i++)
for (int j = y; j... | a.cc: In function 'int cal(int, int)':
a.cc:19:29: error: reference to 'hash' is ambiguous
19 | if (hash.find(make_pair(i, j)) != hash.end()) {
| ^~~~
In file included from /usr/include/c++/14/string_view:50,
from /usr/include/c++/14/bits/bas... |
s150475181 | p04002 | C++ | #include <iostream>
using namespace std;
int main(){
int H,W,N;
cin>>H,W,N;
int arr[H][W]={};
int a,b;
for(int i=0;i<N;i++){
cin>>a,b;
arr[a][b]=1;
}
int hist[10]={};
for(int i=0;i<H-2;i++){
for(int j=0;j<W-2;j++){
int temp=arr[i][j]+arr[i+1][j]+arr[i+2][j]+arr[i][j+1]+arr[i+1][j+1]+arr[... | a.cc: In function 'int main()':
a.cc:21:11: error: 'count' was not declared in this scope
21 | cout<<count<<endl;
| ^~~~~
|
s121164368 | p04002 | C++ | #include <iostream>
using namespace std;
int main(){
int H,W,N;
cin>>H,W,N;
int arr[H][W]={};
int a,b;
for(int i=0;i<N;i++){
cin>>a,b;
arr[a][b]=1;
}
int hist[10]={};
for(int i=0;i<H-2;i++){
for(int j=0;j<W-2;j++){
int temp=arr[i][j]+arr[i+1][j]+arr[i+2][j]+arr[i][j+1]+arr[i+1][j+1]+arr[... | a.cc: In function 'int main()':
a.cc:16:25: error: expected ';' before '}' token
16 | hist[temp]++
| ^
| ;
17 | }
| ~
a.cc:21:11: error: 'count' was not declared in this scope
21 | cout<<count<<end... |
s108452505 | p04002 | C++ | #include <iostream>
using namespace std;
int main(){
int H,W,N;
cin>>H,W,N;
int arr[H][W]={};
int a,b;
for(int i=0;i<N;i++){}
cin>>a,b;
arr[a][b]=1;
}
for(int k=0;k<10;k++)
{
int count=0;
for(int i=0;i<H-2;i++){
for(int j=0;j<W-2;j++){
int temp=arr[i][j]+arr[i+1][j]+arr[i+2][j]+arr[... | a.cc:13:1: error: expected unqualified-id before 'for'
13 | for(int k=0;k<10;k++)
| ^~~
a.cc:13:13: error: 'k' does not name a type
13 | for(int k=0;k<10;k++)
| ^
a.cc:13:18: error: 'k' does not name a type
13 | for(int k=0;k<10;k++)
| ^
a.cc:30:1: error: 'cout' d... |
s340987398 | p04002 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<array>
#include<algorithm>
#include<list>
#include<cmath>
#include<iomanip>
#include<queue>
#include<functional>
#include<climits>
#include<iterator>
#include<unordered_set>
#include<unordered_map>
#include<map>
#include<set>
using namespace std;
const doub... | a.cc: In function 'int main()':
a.cc:42:38: error: use of deleted function 'std::unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set() [with _Value = std::pair<int, int>; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >]'
42 | ... |
s325700158 | p04002 | Java | import java.util.*;
import java.io.*;
import java.awt.geom.*;
import java.math.*;
public class Main {
static final Reader in = new Reader();
static final PrintWriter out = new PrintWriter(System.out,false);
static boolean debug = false;
static void solve() {
int h = in.nextInt();
int w = in.nextInt();
int ... | Main.java:16: error: cannot find symbol
HashMap<Pair<Integer, Integer>,Integer> map = new HashMap<>();
^
symbol: class Pair
location: class Main
Main.java:28: error: cannot find symbol
Pair<Integer, Integer> p = new Pair<>(ny, nx);
^
symbol: class Pair
location: class Main
Main.java:28: ... |
s337273572 | p04002 | C++ | 10 10 20
1 1
1 4
1 9
2 5
3 10
4 2
4 7
5 9
6 4
6 6
6 7
7 1
7 3
7 7
8 1
8 5
8 10
9 2
10 4
10 9 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 10 10 20
| ^~
|
s268473507 | p04002 | C++ | #include <iostream>
#include <vector>
using namespace std;
typedef unsigned long long ull;
ull res[10] = {};
vector<ull> c;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
ull H, W, N;
cin >> H >> W >> N;
ull tot = (H-2)*(W-2);
if(N==0){
cout << tot << endl;
for(int i=1; i<10; ... | a.cc: In function 'int main()':
a.cc:34:5: error: 'sort' was not declared in this scope; did you mean 'short'?
34 | sort(c.begin(), c.end());
| ^~~~
| short
|
s329429802 | p04002 | C++ | #include <cstdio>
#include <algorithm>
#include <iostream>
#include <string>
#include <map>
#include <vector>
#define INT long long int
#define MOD 1000000007
using namespace std;
INT h, w, n, all, sum, ans[10];
map<pair<int, int>, int> check;
int main()
{
cin>>h>>w>>n;
while( n-- )
{
int x, y;
... | a.cc: In function 'int main()':
a.cc:19:31: error: 'f' was not declared in this scope
19 | scanf("%d%d", &x, &y);f
| ^
a.cc:20:26: error: 'i' was not declared in this scope
20 | for(int i = -2 ; i <= 0 ; i++ )
| ^
a.cc:21:30: error... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.