submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s756253925
p03762
C++
3 3 1 3 4 1 3 6
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 3 | ^
s809046097
p03762
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UncheckedIOException; import java.util.StringTokenizer; public class D58 { public static void main(String[] args) { SC sc=new SC(System.in); int W=sc.nextInt(); for(long i=0; ...
Main.java:8: error: class D58 is public, should be declared in a file named D58.java public class D58 { ^ 1 error
s360970495
p03762
C++
//file_name:ABC58_D.cpp #include <bits/stdc++.h> #define fi first #define se second #define rep(i,n) for(int i = 0; i < (n); ++i) #define rrep(i,n) for(int i = 1; i <= (n); ++i) #define drep(i,n) for(int i = (n)-1; i >= 0; --i) #define srep(i,s,t) for (int i = s; i < t; ++i) #define rng(a) a.begin(),a.end() #define max...
a.cc: In function 'int main()': a.cc:110:30: error: lvalue required as left operand of assignment 110 | ans += (((y[i]-now)*i+wa)%=mod)*yoko; | ~~~~~~~~~~~~~^~~~
s447401143
p03762
C++
#include<bits/stdc++.h> using namespace std; #define ll long long int main(){ ll n,m; cin>>n>>m; ll x=0,y=0,aj=n*(-1)+1; for(int i=0;i<n;i++){ cin>>a; x+=a*j; j+=2; } x%=1000000007; j=m*(-1)+1; for(int i=0;i<m;i++){ cin>>a; y+=a*j; j+=2; } y%=1000000007; cout<<x*y%1000000007; }
a.cc: In function 'int main()': a.cc:9:6: error: 'a' was not declared in this scope 9 | cin>>a; | ^ a.cc:10:6: error: 'j' was not declared in this scope 10 | x+=a*j; | ^ a.cc:14:1: error: 'j' was not declared in this scope; did you mean 'aj'? 14 | j=m*(-1)+1; | ^ | aj a.cc:16...
s578398465
p03762
Java
import java.util.*; class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); long[] a = new long[n]; long[] x = new long[n]; long[] b = new long[m]; long[] y = new long[m]; ...
Main.java:62: error: ';' expected b_sum += i * 2 - m + 1 ) * b[i]; ^ Main.java:62: error: not a statement b_sum += i * 2 - m + 1 ) * b[i]; ^ 2 errors
s888861919
p03762
C++
#include<iostream> #include<cstdio> using namespace std; long long n,m,x[100001],y[100001]; int main() { cin>>n>>m; for(int i=1;i<=n;i++) cin>>x[i]; for(int j=1;j<=m;j++) cin>>y[i]; long long h=0,w=0; for(int l=1,r=n;l<r;++l,--r) w=(w+(x[r]-x[l])*(r-l)%mod)%mod; for(int i=1,r=m;l<r;++l,--r) h=(h+(y[r]-y[l])*(r-l)...
a.cc: In function 'int main()': a.cc:9:38: error: 'i' was not declared in this scope 9 | for(int j=1;j<=m;j++) cin>>y[i]; | ^ a.cc:11:61: error: 'mod' was not declared in this scope 11 | for(int l=1,r=n;l<r;++l,--r) w=(w+(x[r]-x[l])*(r-l)%mod)%mod; ...
s150035495
p03762
C++
#include "bits/stdc++.h" #ifndef err #define err(...)(void)0 #endif using namespace std; using ll = long long; using ull = decltype(1ull); template<class T>int size(T&&a) { return a.size(); } #define REP(t,a)for(typename make_signed<decltype(a.second)>::type t=a.first,_l##t=a.second;t<_l##t;t++) #define RREP(t,a)for(ty...
a.cc: In function 'Mint<MOD> CombMod(int, int)': a.cc:92:8: error: 'i' was not declared in this scope 92 | repa(i, 2, r + 1) { b *= i; } | ^ a.cc:92:3: error: there are no arguments to 'repa' that depend on a template parameter, so a declaration of 'repa' must be available [-fpermissive] 92 | rep...
s428387790
p03762
C++
#include <iostream> #include <string> #include <vector> #include <climits> #include <algorithm> #include <set> #include <unordered_map> #include <queue> #include <iomanip> #include <map> #define rep(i,n) for(int i=0; i<(int)(n); i++) #define ll long long #define P pair<int, int> using namespace std; int mod = 1000000...
a.cc: In function 'int main()': a.cc:38:39: error: expected ')' before ';' token 38 | sumx += (x.at(i+1)-x.at(i)*mul%mod; | ~ ^ | )
s874102274
p03762
C
#include <stdio.h> int main(void) { int n,m; scanf("%d %d",&n,&m); int x[n],y[m]; int i; for(i=0;i<n;i++){ scanf("%d",&x[i]); } for(i=0;i<m;i++){ scanf("%d",&y[i]); } int s=0,t=0; for(i=0;i<n;i++){ s = s+(2*i-n+1)*x[i]; } for(i=0;i<m;i++...
main.c: In function 'main': main.c:29:5: error: expected declaration or statement at end of input 29 | return 0; | ^~~~~~
s453176762
p03762
C
#include <stdio.h> int main(void) { int n,m; scanf("%d %d",&n,&m); int x[n],y[m]; int i; for(i=0;i<n;i++){ scanf("%d",&x[i]); } for(i=0;i<m;i++){ scanf("%d",&y[i]); } int s=0,t=0; for(i=0;i<n;i++){ s = s+(2*i-n+1)*x[i]; } for(i=0;i<m;i++...
main.c: In function 'main': main.c:29:5: error: expected declaration or statement at end of input 29 | return 0; | ^~~~~~
s831818003
p03762
C
int main(void) { int n,m; scanf("%d %d",&n,&m); int x[n],y[m]; int i; for(i=0;i<n;i++){ scanf("%d",&x[i]); } for(i=0;i<m;i++){ scanf("%d",&y[i]); } int s=0,t=0; for(i=0;i<n;i++){ s = s+(2*i-n+1)*x[i]; } for(i=0;i<m;i++){ t = t+(2*...
main.c: In function 'main': main.c:4:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | scanf("%d %d",&n,&m); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(void) main.c:4:5: warning: i...
s526546037
p03762
C++
#include <iostream> #include<cstdlib> #include<queue> #include<set> #include<vector> #include<string> #include<algorithm> #include<stack> #include<map> #include<deque> #include<cstdio> using namespace std; #define rep(i,a) for(int i=0;i<a;i++) #define mp make_pair #define pb push_back #define ll __int64 //#define ll lo...
a.cc:16:12: error: '__int64' does not name a type; did you mean '__int64_t'? 16 | #define ll __int64 | ^~~~~~~ a.cc:19:7: note: in expansion of macro 'll' 19 | const ll mod=1000000007; | ^~ a.cc:16:12: error: '__int64' does not name a type; did you mean '__int64_t'? 16 | #define ll...
s787977231
p03762
Java
#include<bits/stdc++.h> #define rep(i,n) for(int i=0; i<n; i++) #define rrep(i,n) for(int i=n-1; i>=0; i--) using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int,int> pi; typedef long double lb; const int INF=1<<27; const int MOD=(int)1e9+7; int main(void) { int n, m; ll x[1000...
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:2: error: illegal character: '#' #define rep(i,n) for(int i=0; i<n; i++) ^ Main.java:2: error: class, interface, enum, or record expected #defin...
s213724829
p03762
C++
#include<iostream> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) using namespace std; typedef long long ll; const ll mod=1e9+7; ll abs(ll a){ return (a>0)?a:-1*a; } int main(){ int n,m; cin>>n>>m; ll x[n],y[m]; ll minx=0,miny=0; rep(i,n){ cin>>x[i]; minx=min(minx,x[i]); } if(minx<...
a.cc: In function 'int main()': a.cc:22:36: error: call of overloaded 'abs(ll&)' is ambiguous 22 | if(minx<0)rep(i,n)x[i]+=abs(minx); | ~~~^~~~~~ In file included from /usr/include/c++/14/cstdlib:79, from /usr/include/c++/14/ext/string_conversions.h:43, ...
s639884990
p03762
C++
#include<iostream> #include<cmath> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) using namespace std; typedef long long ll; const ll mod=1e9+7; ll abs(ll a){ return (a>0)?a:-1*a; } int main(){ int n,m; cin>>n>>m; ll x[n],y[m]; ll minx=0,miny=0; rep(i,n){ cin>>x[i]; minx=min(minx,x[i...
a.cc: In function 'int main()': a.cc:23:36: error: call of overloaded 'abs(ll&)' is ambiguous 23 | if(minx<0)rep(i,n)x[i]+=abs(minx); | ~~~^~~~~~ In file included from /usr/include/c++/14/cstdlib:79, from /usr/include/c++/14/ext/string_conversions.h:43, ...
s727489783
p03762
Java
import java.util.*; public class D { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); long[] x = new long[n]; long[] y = new long[m]; for(int i = 0; i < n; i++) { x[i] = sc.nextLong...
Main.java:2: error: class D is public, should be declared in a file named D.java public class D { ^ 1 error
s826781839
p03762
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long MOD = 1000000007; long n = sc.nextLong(); long m = sc.nextLong(); long[] x = new long[n]; long[] y = new long[m]; for(int i = 0; i < n; i++) { x[i] = sc.nextLon...
Main.java:9: error: incompatible types: possible lossy conversion from long to int long[] x = new long[n]; ^ Main.java:10: error: incompatible types: possible lossy conversion from long to int long[] y = new long[m]; ^ 2 errors
s997483641
p03762
C
#include <stdio.h> typedef long long ll; int main(void) { ll int n,m; scanf("%lld %lld",&n,&m); ll int i,j,xtotal=0,ytotal=0; ll int x[n],y[m]; for (i=0;i<n;i++) { scanf("%lld",&x[i]); xtotal += (i-1)*x[i] + (n-i)*x[i]); } for (i=0;i<m;i++) { scanf("%lld",&y[i]); ytotal += (i-1)*y[i] + (...
main.c: In function 'main': main.c:7:6: error: two or more data types in declaration specifiers 7 | ll int n,m; | ^~~ main.c:9:6: error: two or more data types in declaration specifiers 9 | ll int i,j,xtotal=0,ytotal=0; | ^~~ main.c:10:6: error: two or more data types in declaration sp...
s656599301
p03762
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define rep(i,n) for(int i=0;i<(n);i++) const int mod = 1e9+7; int n,m; int x[1000100],y[1000100]; int powmod(int n,int p,int m){ if(p==0)return 1; if(p%2==0){ int t=powmod(n,p/2,m); return t*t%m; } return n*powmod(n,p-1,m); } int a...
/tmp/cc6AmtsX.o: in function `main': a.cc:(.text+0x2c4): relocation truncated to fit: R_X86_64_PC32 against symbol `memo2' defined in .bss section in /tmp/cc6AmtsX.o a.cc:(.text+0x339): relocation truncated to fit: R_X86_64_PC32 against symbol `memo2' defined in .bss section in /tmp/cc6AmtsX.o collect2: error: ld retur...
s837275977
p03762
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define rep(i,n) for(int i=0;i<(n);i++) const int mod = 1e9+7; int n,m; int x[1000100],y[1000100]; int powmod(int n,int p,int m){ if(p==0)return 1; if(p%2==0){ int t=powmod(n,p/2,m); return t*t%m; } return n*powmod(n,p-1,m); } int a...
/tmp/ccDhenxs.o: in function `main': a.cc:(.text+0x2c4): relocation truncated to fit: R_X86_64_PC32 against symbol `memo2' defined in .bss section in /tmp/ccDhenxs.o a.cc:(.text+0x339): relocation truncated to fit: R_X86_64_PC32 against symbol `memo2' defined in .bss section in /tmp/ccDhenxs.o collect2: error: ld retur...
s986333175
p03762
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define rep(i,n) for(int i=0;i<(n);i++) const int mod = 1e9+7; int n,m; int x[1000100],y[1000100]; int powmod(int n,int p,int m){ if(p==0)return 1; if(p%2==0){ int t=powmod(n,p/2,m); return t*t%m; } return n*powmod(n,p-1,m); } int a...
/tmp/ccqazpbp.o: in function `main': a.cc:(.text+0x2c4): relocation truncated to fit: R_X86_64_PC32 against symbol `memo2' defined in .bss section in /tmp/ccqazpbp.o a.cc:(.text+0x339): relocation truncated to fit: R_X86_64_PC32 against symbol `memo2' defined in .bss section in /tmp/ccqazpbp.o collect2: error: ld retur...
s593291339
p03762
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=a;i<b;i++) #define REP(i,b) FOR(i,0,b) #define INF 1e9 using ll = long long; const ll mod = LLONG_MAX; int main(){ int n,m; long long x[100010],y[100010],sum; cin>>n>>m REP(i,n) { cin>>x[i]; } REP(i,m) { cin>>y[i]; }...
a.cc: In function 'int main()': a.cc:14:12: error: expected ';' before 'for' 14 | cin>>n>>m | ^ | ; a.cc:16:7: error: 'i' was not declared in this scope 16 | REP(i,n) { | ^ a.cc:3:32: note: in definition of macro 'FOR' 3 | #define FOR(i,a,b) for(int i=a;i<b;i+...
s733576079
p03762
Java
import java.math.BigInteger; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); BigInteger CONST = new BigInteger("0"); CONST = CONST.add(BigInteger.valueOf((long)Mat...
Main.java:47: error: reached end of file while parsing } ^ 1 error
s520167672
p03762
C++
#include<cstdio> #include<cmath> #include<conio.h> using namespace std; #define MOD 1000000007 int n,m; long long x,y; long long dx[50005],dy[50005]; int main(){ scanf("%d%d",&n,&m); for(int i=0;i<n;i++){ scanf("%lld",&dx[i]); } for(int i=0;i<m;i++){ scanf("%lld",&dy[i]); } for(int i=0;i<n;i++){ for(int j=...
a.cc:3:9: fatal error: conio.h: No such file or directory 3 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s272339890
p03762
C++
/* 2 次元平面上に x 軸と平行な直線が m 本と y 軸と平行な直線が n 本引いてあります。 x 軸と平行な直線のうち下から i 番目は y=yi で表せます。 y 軸と平行な直線のうち左から i 番目は x=xi で表せます。 この中に存在しているすべての長方形についてその面積を求め、 合計を 109+7 で割ったあまりを出力してください。 つまり、1≤i<j≤n と 1≤k<l≤m を満たすすべての組 (i,j,k,l) について、 直線 x=xi, x=xj, y=yk, y=yl で囲まれる 長方形の面積を求め、合計を 109+7 で割ったあまりを出力してください。 制約 2≤n,m≤105 −109≤x1<…<xn...
a.cc: In function 'int main()': a.cc:26:16: error: expected ';' before ')' token 26 | for(k=0;k<n,k++) | ^ | ; a.cc:28:16: error: expected ';' before ')' token 28 | for(k=0;k<m,k++) | ^ | ; a.cc:33:18: error: expected ';' before '...
s644255644
p03763
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; string S, T, B = "~"; bool isOK(string A1, string A2) { for (int i = 0; i < A1.size(); i++) { if (A1[i] != '?' && A1[i] != A2[i])return false; } return true; } int main() { cin >> S >> T; for (int i = 0; i <= (int)S.size() - (int)T.s...
a.cc:59:5: error: redefinition of 'int main()' 59 | int main() { | ^~~~ a.cc:12:5: note: 'int main()' previously defined here 12 | int main() { | ^~~~
s225347905
p03763
C++
#include<iostream> #include<algorithm> #include<cstring> #include<math.h> #include<queue> #include<deque> #include<map> #include<set> #include<vector> int az[26]; using namespace std; int main() { string s; int n; cin >> n; int i,j; for (j = 0; j < 26; j++) { az[j] = 100; } for (i = 0; i < n; i++) { cin ...
a.cc: In function 'int main()': a.cc:25:36: error: no matching function for call to 'min(std::__iterator_traits<__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >, void>::difference_type, int&)' 25 | az[j] = min(count(s.cbegin(), s.cend(), 'a' + j), az[j]); | ...
s168514766
p03763
C++
#include <bits/stdc++.h> using namespace::std; #define all(x) (x).begin(), (x).end() #define sz(x) (int)(x).size() typedef long long ll; typedef array<int, 3> tri; typedef long double ld; template <class T> istream& operator>>(istream& I, vector<T>& v) {for (T &e: v) I >> e; return I;} template <class T> ostream& op...
a.cc: In function 'void _main()': a.cc:25:35: error: no matching function for call to 'min(int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 25 | freq = min(freq, count(all(v[i]), c)); | ...
s884159200
p03763
C++
#include <bits/stdc++.h> using namespace::std; #define all(x) (x).begin(), (x).end() #define sz(x) (int)(x).size() typedef long long ll; typedef array<int, 3> tri; typedef long double ld; template <class T> istream& operator>>(istream& I, vector<T>& v) {for (T &e: v) I >> e; return I;} template <class T> ostream& op...
a.cc: In function 'void _main()': a.cc:25:35: error: no matching function for call to 'min(int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 25 | freq = min(freq, count(all(v[i]), c)); | ...
s530391392
p03763
C++
#include<bits/stdc++.h> using namespace std; using ll = long long; using Graph = vector<vector<int>>; const ll mod=1000000007; const int MAX_N = 1000; // n の最大値 // nCk を取得 double nCk(int n, int k) { double res=1.0; for(int i=0; i<n; i++){ res*=0.5;} for(int i=0; i<k; i++){ res*=(double)(n-i); res/=(double)(k-...
a.cc: In function 'int main()': a.cc:36:14: error: expected ')' before ';' token 36 | b[k]=min(a[k];b[k]);} | ~ ^ | ) a.cc:36:19: error: expected ';' before ')' token 36 | b[k]=min(a[k];b[k]);} | ^ | ; a.cc:39:9: error: 'k' was no...
s415303560
p03763
C++
n=int(input()) it=[input() for i in range(n)] s="abcdefghijklmnopqrstuvwxyz" ss={} j=0 for i in s: ss[i]=j j+=1 st=[0 for i in range(26)] for i in it[0]: st[ss[i]]+=1 for i in range(1,n): aa={} for j in it[i]: try: aa[j]+=1 except: aa[j]=1 k=[0]*26 for...
a.cc:1:1: error: 'n' does not name a type 1 | n=int(input()) | ^ a.cc:5:1: error: 'j' does not name a type 5 | j=0 | ^ a.cc:14:5: error: expected unqualified-id before 'for' 14 | for j in it[i]: | ^~~
s528698596
p03763
Java
import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Scanner; import java.util.TreeMap; //@Slf4j public class test1 { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); int n = sc.n...
Main.java:10: error: class test1 is public, should be declared in a file named test1.java public class test1 { ^ 1 error
s755417300
p03763
C++
#include<bits/stdc++.h> #include <iostream> #include <string> using namespace std; #define ll long long #define rep(i, n) for (ll i = 0; i < (n); i++) #define FOR(i,a,b) for(ll i=(a);i<(b);i++) #define FORR(i,a,b)for(ll i=(a);i<=(b);i++) #define repR(i,n) for(ll i=n;i>=0;i--) #define all(v)(v).begin(),(v).end() #define...
a.cc: In function 'int main()': a.cc:16:21: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<char>') 16 | #define COUT(x) cout<<(x)<<endl | ~~~~^~~~~ | | | std::ostream {aka std::basi...
s895812969
p03763
C++
#include<bits/stdc++.h> #include <iostream> #include <string> using namespace std; #define ll long long #define rep(i, n) for (ll i = 0; i < (n); i++) #define FOR(i,a,b) for(ll i=(a);i<(b);i++) #define FORR(i,a,b)for(ll i=(a);i<=(b);i++) #define repR(i,n) for(ll i=n;i>=0;i--) #define all(v)(v).begin(),(v).end() #define...
a.cc: In function 'int main()': a.cc:42:16: error: expected ';' before '<' token 42 | for(int i=1,i<n;i++){ | ^ | ; a.cc:42:16: error: expected primary-expression before '<' token a.cc:16:21: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::bas...
s732150549
p03763
C++
#include <bits/stdc++.h> #define Maxn 100 #define rint register int using namespace std; int read() { rint s = 0, f = 1; register char ch = getchar(); while (!isdigit(ch)) { if (ch == '-') f = -1; ch = getchar(); } while (isdigit(ch)) { s = s * 10 + ch - '0'; ch = getchar(); } return s * f; } int n; char s[Ma...
a.cc: In function 'int read()': a.cc:7:8: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 7 | rint s = 0, f = 1; register char ch = getchar(); | ^ a.cc:7:15: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 7 | rint s = 0, f = 1...
s416055952
p03763
C++
#include <bits/stdc++.h> #define Maxn 100 #define rint register int using namespace std; int read() { rint s = 0, f = 1; register char ch = getchar(); while (!isdigit(ch)) { if (ch == '-') f = -1; ch = getchar(); } while (isdigit(ch)) { s = s * 10 + ch - '0'; ch = getchar(); } return s * f; } int n; char s[Ma...
a.cc: In function 'int read()': a.cc:7:8: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 7 | rint s = 0, f = 1; register char ch = getchar(); | ^ a.cc:7:15: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 7 | rint s = 0, f = 1...
s415562996
p03763
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define fo(a,b) for(int a=0;a<b;a++) #define Sort(a) sort(a.begin(),a.end()) int wari(int a,int b) { if(a%b==0) return a/b; else return a/b+1; } int keta(int a){ double b=a; b=log10(b); int c=b; return c+1; } int souwa(int a...
a.cc: In function 'int main()': a.cc:68:6: error: no match for call to '(std::vector<long long int>) (long long int&, long long int&)' 68 | d(o,p); | ~^~~~~
s648977804
p03763
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define fo(a,b) for(int a=0;a<b;a++) #define Sort(a) sort(a.begin(),a.end()) int wari(int a,int b) { if(a%b==0) return a/b; else return a/b+1; } int keta(int a){ double b=a; b=log10(b); int c=b; return c+1; } int souwa(int a...
a.cc: In function 'int main()': a.cc:68:6: error: no match for call to '(std::vector<long long int>) (long long int&, long long int&)' 68 | d(o,p); | ~^~~~~ a.cc:85:17: error: expected '}' at end of input 85 | cout<<s<<endl; | ^ a.cc:57:14: note: to match this '{' 57 | sig...
s095230983
p03763
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define fo(a,b) for(int a=0;a<b;a++) #define Sort(a) sort(a.begin(),a.end()) int wari(int a,int b) { if(a%b==0) return a/b; else return a/b+1; } int keta(int a){ double b=a; b=log10(b); int c=b; return c+1; } int souwa(int a...
a.cc: In function 'int main()': a.cc:68:6: error: no match for call to '(std::vector<long long int>) (int, int)' 68 | d(26,0); | ~^~~~~~ a.cc:85:17: error: expected '}' at end of input 85 | cout<<s<<endl; | ^ a.cc:57:14: note: to match this '{' 57 | signed main(){ | ...
s605349507
p03763
C++
using namespace std; int main() { int n; cin>>n; string S[50]; for (int i(0);i<n;i++)cin>>S[i]; int ans[30]={0}; for (int i(0);i<30;i++)ans[i]=10000; for (int i(0);i<n;i++){ int list[30]={0}; for (int j(0);j<S[i].size();j++){ list[S[i][j]-'a']+=1; } for (int j(0);j<30;j++){ an...
a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin>>n; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:6:3: error: 'string' ...
s717996132
p03763
C++
#include <iostream> #include <vector> #include <functional> #include <algorithm> #include <string> #include <map> #include <cmath> using namespace std; int main() { vector<int> mincnt(26, 100); int n; cin >> n; string s; for (int i = 0; i < n;i++) { cin >> s; vector<int> cnt(...
a.cc: In function 'int main()': a.cc:37:21: error: expected primary-expression before 'char' 37 | cout << char(ifstream + 'a'); | ^~~~
s011894685
p03763
C++
#include <vector> #include <string> #include <algorithm> using namespace std; int main(){ int n; cin >> n; vector<vector<char>> s; s = vector<vector<char>>(n); string temp; for(int i=0; i<n; ++i){ cin >> temp; for(int j=0; j<temp.size(); ++j){ s[i].push_back(temp[j]); } } for(int ...
a.cc: In function 'int main()': a.cc:9:3: error: 'cin' was not declared in this scope 9 | cin >> n; | ^~~ a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 3 | #include <algorithm> +++ |+#include <iostream> 4 | a.cc:47:3: erro...
s200153171
p03763
C++
#include <iostream> #include <vector> #include <string> using namespace std; int main(){ int n; cin >> n; vector<vector<char>> s; s = vector<vector<char>>(n); string temp; for(int i=0; i<n; ++i){ cin >> temp; for(int j=0; j<temp.size(); ++j){ s[i].push_back(temp[j]); } } for(int i...
a.cc: In function 'int main()': a.cc:24:18: error: 'count' was not declared in this scope 24 | int moto = count(s[0].begin(), s[0].end(), s[0][j]); | ^~~~~ a.cc:32:43: error: no matching function for call to 'find(std::vector<char>::iterator, std::vector<char>::iterator, __gnu_cxx::__all...
s165693821
p03763
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<string> s(n); for(int i=0;i<n;i++){ cin >> s[i]; } string c; for(int i=0;i<s[0].size();i++){ c.push_back(s[0][i]); } for(int i=0;i<n;i++){ if(c.size()==0){ ...
a.cc: In function 'int main()': a.cc:22:9: error: expected ',' or ';' before 'for' 22 | for(int j=0;j<c.size();j++){ | ^~~ a.cc:22:21: error: 'j' was not declared in this scope 22 | for(int j=0;j<c.size();j++){ | ^
s672664486
p03763
C++
#include <bits/stdc++.h> using namespace std; void hawawa() { int n; cin >> n; map<char, int> cnt; for (char c = 'a'; c <= 'z'; c++) { cnt[c] = numeric_limits<int>::max(); } while (n--) { string str; cin >> str; sort(begin(str), end(str)); for (char c = 'a'; c <= 'z'; c++) { cnt[c] = min(cnt[c], up...
a.cc: In function 'void hawawa()': a.cc:18:121: error: expected ')' before ';' token 18 | cnt[c] = min(cnt[c], upper_bound(begin(str), end(str), c) - lower_bound(begin(str), end(str), c); | ~ ...
s341378066
p03763
C++
#include <bits/stdc++.h> using namespace std; void hawawa() { int n; cin >> n; map<char, int> cnt; for (char c = 'a'; c <= 'z'; c++) { cnt[c] = numeric_limits<int>::max(); } while (n--) { string str; cin >> str; sort(begin(str), end(str)); for (char c = 'a'; c <= 'z'; c++) { cnt[c] = min(cnt[c], up...
a.cc: In function 'void hawawa()': a.cc:18:37: error: no matching function for call to 'min(std::map<char, int>::mapped_type&, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >::difference_type)' 18 | cnt[c] = min(cnt[c], upper_bound(begin(str), end(str), c) - lower_bound...
s561127894
p03763
C++
#include <bits/stdc++.h> using namespace std; void hawawa() { int n; cin >> n; map<char, int> cnt; for (char c = 'a'; c <= 'z'; c++) { cnt[c] = numeric_limits<int>::max(); } while (n--) { string str; cin >> str; sort(begin(str), end(str)); for (char c = 'a'; c <= 'z'; c++) { cnt[c] = min(cnt[c], up...
a.cc: In function 'void hawawa()': a.cc:18:37: error: no matching function for call to 'min(std::map<char, int>::mapped_type&, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >::difference_type)' 18 | cnt[c] = min(cnt[c], upper_bound(begin(str), end(str), c) - lower_bound...
s824715227
p03763
C++
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; string s[n]; for (int i = 0; i < n; i++) cin >> s[i]; string res = ""; for (int i = 0; i < n; i++) sort(s[i].begin(), s[i].end()); for (char c = 'a'; c <= 'z'; c++) { int m = 100; ...
a.cc: In function 'int main()': a.cc:16:14: error: no matching function for call to 'min(int&, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >::difference_type)' 16 | m = min(m, upper_bound(s[i].begin(), s[i].end(), c) - lower_bound(s[i].begin(), s[i].end(), c)); | ~~~^~~...
s942447433
p03763
C++
N = int(input()) S = [[] for i in range(N)] for i in range(N): S[i] += list(input()) res="" for i in range(97,97+26): c = chr(i) curr = N for j in range(N): curr = min(curr,S[j].count(c)) res += c*curr print(res)
a.cc:1:1: error: 'N' does not name a type 1 | N = int(input()) | ^
s077083421
p03763
C++
#include<vector> #include<iostream> #include<string> include<algorithm> using namespace std; int main() { int n; cin >> n; int count[n][26] = {{0}}; for(int i = 0; i < n; i++){ string s; cin >> s; for(int j = 0; j < s.length(); j++){ ...
a.cc:4:1: error: 'include' does not name a type 4 | include<algorithm> | ^~~~~~~ a.cc: In function 'int main()': a.cc:9:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 9 | cin >> n; | ^~~ | std::cin In file included from a.cc:2: /usr/include/c++...
s224987370
p03763
C++
#include<vector> #include<iostream> #include<string> include<algorithm> using namespace std; int main() { int n; cin >> n; int count[n][26] = {{0}}; for(int i = 0; i < n; i++){ string s; cin >> s; for(int j = 0; j < s.length(); j++){ ...
a.cc:4:1: error: 'include' does not name a type 4 | include<algorithm> | ^~~~~~~ a.cc: In function 'int main()': a.cc:9:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 9 | cin >> n; | ^~~ | std::cin In file included from a.cc:2: /usr/include/c++...
s117514856
p03763
C++
n = int(input()) Ss = [] for i in range(n): Ss.append(input()) minfreq = dict() for i in range(ord('a'), ord('z')+1): minfreq[chr(i)] = 500000 for S in Ss: freq = dict() for i in range(ord('a'), ord('z')+1): freq[chr(i)] = 0 for c in S: freq[c] += 1 for c in freq: min...
a.cc:1:1: error: 'n' does not name a type 1 | n = int(input()) | ^
s320338044
p03763
C++
import java.util.*; public class Main { static Scanner sc = new Scanner(System.in); static class Str{ int[] chars = new int[26]; } public static void main(String[] args) { int n = sc.nextInt(); Str[] words = new Str[n]; for (int i = 0; i < n; i++) { String s...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main | ^~~~~~
s872252431
p03763
C++
#include<iostream> 2 #include<cstring> 3 #include <cmath> 4 #include <algorithm> 5 using namespace std; 6 ​ 7 int main(){ 8 int number = 0; 9 cin >> number; 10 char** input = new char*[number]; 11 ​ 12 for(int i = 0; i < number; i++){ 13 input[i] = new char[51]; 14 cin >> input[i]; 15 ...
a.cc:2:1: error: expected unqualified-id before numeric constant 2 | 2 | ^ In file included from a.cc:3: /usr/include/c++/14/cstring:78:11: error: 'memchr' has not been declared in '::' 78 | using ::memchr; | ^~~~~~ /usr/include/c++/14/cstring:79:11: error: 'memcmp' has not been declared ...
s404977217
p03763
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; string str; int ans[26]; int main() { memset(ans, 1, sizeof(ans)); int n; cin >> n; for (int i = 0; i < n; i++) { cin >> str; int cnt[26] = { 0, }; for (int j = 0; j < str.size(); j++) { cnt[str[j] - 'a']++; } for (int j = ...
a.cc: In function 'int main()': a.cc:9:9: error: 'memset' was not declared in this scope 9 | memset(ans, 1, sizeof(ans)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+#include <c...
s668870846
p03763
C++
ji
a.cc:1:1: error: 'ji' does not name a type 1 | ji | ^~
s541012093
p03763
C
#include <stdio.h> #include <string.h> #include <stdlib.h> #define MAXN 60 #define MAXS 3600 int n; char* strings[MAXN]; int min(const int a, const int b) { return a > b ? a : b; } void read_str(int idx) { char buf[MAXN]; fgets(buf, MAXN, stdin): int len = strlen(buf); if(buf[len - 1] == '\n') buf[...
main.c: In function 'read_str': main.c:14:28: error: expected ';' before ':' token 14 | fgets(buf, MAXN, stdin): | ^ | ; main.c:16:12: error: 'len' undeclared (first use in this function) 16 | if(buf[len - 1] == '\n') buf[--len] = '\0'; ...
s686737607
p03763
C++
#include <iostream> #include <string> #include <vector> using namespace std; int main(){ int max_num; vector < vector < int > > arr (26); cin >> max_num; for(int j=0;j<max_num;j++){ string po; cin >> po; vector<int> l(0,26); for(int i=0;i<26;i++) arr[i].push_back(0);//要...
a.cc: In function 'int main()': a.cc:22:20: error: 'min_element' was not declared in this scope 22 | int min = *min_element(arr[i].begin(), arr[i].end()); | ^~~~~~~~~~~
s685428983
p03763
C++
#include <iostream> #include <string> #include <vector> using namespace std; int main(){ int max_num; vector < vector < int > > arr (26); cin >> max_num; for(int j=0;j<max_num;j++){ string po; cin >> po; vector<int> l(0,26); for(int i=0;i<26;i++) arr[i].push_back(0);//要...
a.cc: In function 'int main()': a.cc:22:25: error: 'min_element' is not a member of 'std'; did you mean 'tuple_element'? 22 | int min = *std::min_element(arr[i].begin(), arr[i].end()); | ^~~~~~~~~~~ | tuple_element
s884636636
p03763
C++
#include <iostream> #include <string> #include <vector> using namespace std; int main(){ int max_num; vector < vector < int > > arr (26); cin >> max_num; for(int j=0;j<max_num;j++){ string po; cin >> po; vector<int> l(0,26); for(int i=0;i<26;i++) arr[i].push_back(0);//要...
a.cc: In function 'int main()': a.cc:22:24: error: 'min_element' was not declared in this scope 22 | for(int j=0;j<*min_element(arr[i].begin(), arr[i].end());j++){ | ^~~~~~~~~~~
s307332670
p03763
C++
$n = <>; $first = 1; for (1..$n) { $_ = <>; my %hash; chomp; @a = split(''); for (@a) { $hash{$_}++; } if ($first) { %glbl = %hash; } else { for (keys %glbl) { if ($glbl{$_} > $hash{$_}) { $glbl{$_} = $hash{$_}; } }...
a.cc:4:6: error: too many decimal points in number 4 | for (1..$n) { | ^~~~~ a.cc:8:5: error: stray '@' in program 8 | @a = split(''); | ^ a.cc:8:16: error: empty character constant 8 | @a = split(''); | ^~ a.cc:9:10: error: stray '@' in program 9 | ...
s734816120
p03763
C++
#include <iostream> #include <vector> #include <map> using namespace std; #define INF 1e7 int main(void){ int n; string s; cin >> n; string ret; map<char, int> buf; for(char c='a'; c<='z'; c++){ buf[c] = INF; } for(int i=0; i<n; i++){ cin >> s; for(char c='a'; c<=...
a.cc: In function 'int main()': a.cc:18:38: error: 'count' was not declared in this scope 18 | buf[c] = min(buf[c], int(count(s.begin(), s.end(), c))); | ^~~~~
s412883792
p03763
Java
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Sample { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int an[][]=new int[n][26]; int bn[][]=new int[n][26]; int min=50; int ans[] =new in...
Main.java:4: error: class Sample is public, should be declared in a file named Sample.java public class Sample { ^ 1 error
s056724335
p03763
C++
#include<bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define F first #define S second #define fo(i, n) for(int i = 1; i <= n; ++i) #define rep(i, a, b) for(int (i) = (a); (i) < (b); ++(i)) typedef long long ll; typedef pair <int, int> pii; typedef pair <ll, ll> pll; const int N = ...
a.cc: In function 'int main()': a.cc:32:26: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 32 | cnt[i][s - 'a']++; | ~ ^ ~~~ | | | | | char...
s149805440
p03763
C++
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from random import * def readln(): _res = list(map(int,str(input()).split(' '))) return _res n = readln()[0] a = {} char = 'abcdefghijklmnopqrstuvwxyz' for i in char: a.update({i:1000000}) for i in range(0,n): s = input() b = {} for ch in char: ...
a.cc:1:2: error: invalid preprocessing directive #! 1 | #!/usr/bin/env python3 | ^ a.cc:2:3: error: invalid preprocessing directive #- 2 | # -*- coding: utf-8 -*- | ^ a.cc:12:8: warning: multi-character literal with 26 characters exceeds 'int' size of 4 bytes 12 | char = 'abcdefghijklmnopqrstu...
s668775812
p03763
C++
easfaqw
a.cc:1:1: error: 'easfaqw' does not name a type 1 | easfaqw | ^~~~~~~
s684424626
p03763
C++
#include<bits/stdc++.h> using namespace std; typedef pair<int,int> pii; typedef long long ll; typedef vector<int> vi; #define rep(i,j) for(int i=0;i<(j);i++) #define reps(i,j,k) for(int i=j;i<k;i++) #define in(i,j,k) ((i)>=(j)&&(i)<=(k)) #define INF (1<<28) #define pb push_back #define fs first #define sc second con...
a.cc: In function 'int main()': a.cc:36:29: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 36 | vv[s-'a']++; | ~^~~~ | | | | ...
s010052792
p03763
Java
3 a aa b
Main.java:1: error: class, interface, enum, or record expected 3 ^ 1 error
s323068856
p03763
C++
3 3 1 3 4 1 3 6
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 3 | ^
s613047168
p03763
C++
#include <iostream> #include <cstring> #include <set> using namespace std; int main() { int am[26], n; string s; memset(am, 63, sizeof am); cin >> n; while (n--) { cin >> s; for (int c = 0; c < 26; ++c) am[c] = min(am[c] + 0u, multiset<char>(s.begin(), s.end()).coun...
a.cc: In function 'int main()': a.cc:17:24: error: no matching function for call to 'min(unsigned int, std::multiset<char>::size_type)' 17 | am[c] = min(am[c] + 0u, multiset<char>(s.begin(), s.end()).count(c + 'a')); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
s953004729
p03763
Java
import java.util.Scanner; public class main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner scan = new Scanner(System.in); int n = scan.nextInt(); String[] S = new String[n]; char c; int[][] count = new int[n][26]; S[0]=scan.nextLine(); for(int i =0;i<n;i++){ S[i]=scan....
Main.java:3: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s756626005
p03763
C++
// A.cpp : Defines the entry point for the console application. // #include <iostream> #include <string> #include <stdlib.h> using namespace std; int main() { int n; cin >> n; char s[50][60]; int alpha[50][26]; for (int i = 0; i < 50; i++) { for (int j = 0; j < 60; j++) { s[i][j] = 0; } } for (int i = 0;...
a.cc: In function 'int main()': a.cc:29:37: error: 'strlen' was not declared in this scope 29 | for (int j = 0; j < strlen(s[i]); j++) { | ^~~~~~ a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>...
s682840279
p03763
C++
#include <iostream> #include <algorithm> using namespace std; const int N = 51; int n; string s[N]; bool next[N][26][26]; int Nx[26][26]; int f[N][N], trace[N][N]; int mx; int main() { ios_base :: sync_with_stdio(false); cin.tie(0); mx = 1; cin >> n; for (int i = 1; i <= n; i++) { cin >> s[i]; ...
a.cc: In function 'int main()': a.cc:23:17: error: reference to 'next' is ambiguous 23 | next[i][s[i][ii] - 'a'][s[i][jj] - 'a'] = true; | ^~~~ In file included from /usr/include/c++/14/string:47, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s547010840
p03763
C++
#include <iostream> #include <algorithm> using namespace std; const int N = 51; int n; string s[N]; bool next[N][26][26]; int Nx[26][26]; int f[N][N], trace[N][N]; int mx; int main() { ios_base :: sync_with_stdio(false); cin.tie(0); mx = 1; cin >> n; for (int i = 1; i <= n; i++) { cin >> s[i]; ...
a.cc: In function 'int main()': a.cc:23:17: error: reference to 'next' is ambiguous 23 | next[i][s[i][ii] - 'a'][s[i][jj] - 'a'] = true; | ^~~~ In file included from /usr/include/c++/14/string:47, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s591602941
p03763
C++
#include <stdio.h> int main() { int a[50][50] = {}; int N = 0; char str[100]; scanf("%d", &N); for (int i = 0; i < N; i++) { scanf("%s", str); for (int j = 0, jlim = strlen(str); j < jlim; j++) { a[i][str[j] - 'a']++; } } for (char c = 'a'; c <= 'z'; c++) { int max = 999; for...
a.cc: In function 'int main()': a.cc:12:28: error: 'strlen' was not declared in this scope 12 | for (int j = 0, jlim = strlen(str); j < jlim; j++) { | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 |...
s160576724
p03763
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <functional> #include <numeric> using namespace std; int main(void) { int paperNum; cin >> paperNum; int maxCharNum = 50; vector<int> minChars('z' - 'a', maxCharNum); for (int _numOfPaper = 0; _numOfPaper < paperNum; _numOfPaper...
a.cc: In function 'int main()': a.cc:18:21: error: expected '(' before 'each' 18 | for each (auto chr in paper) chars[chr - 'a']++; | ^~~~ | ( a.cc:18:27: error: expected primary-expression before 'auto' 18 | for each (auto chr in...
s194019086
p03763
C++
#include <iostream> #include <string> #include <vector> #include <utility> #include <map> #include <algorithm> using namespace std; int main() { int n; cin >> n; vector<int> counts(26, -1); for (int i = 0; i < n; ++i) { string s; cin >> s;...
a.cc:2:81: warning: extra tokens at end of #include directive 2 | #include <string> #include <vector> | ^ a.cc: In function 'int main()': a.cc:13:3: error: 'vector' was...
s494649366
p03763
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; int main() { int n; cin >> n; vector<string> S(n); for (auto &S_i : S) cin >> S_i; string ans = ""; for (char c = 'a'; c <= 'z'; ++c) { int num = 99999; for (const auto &s : S) { num = min(num, count(s.begi...
a.cc: In function 'int main()': a.cc:19:34: error: no matching function for call to 'min(int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 19 | num = min(num, count(s.begin(), s.end(), c)); | ...
s186533736
p03763
C++
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<sstream> #include<cstdio> #include<cstdlib> #include<cstring> #include<climits> #include<cmath> #include<string> #include<vector> #include<set> #include<map> #include<queue> #include<numeric> #include<functional> #include<algorithm> #include<bitset> #include<t...
a.cc: In function 'int main()': a.cc:43:39: error: no matching function for call to 'min(int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 43 | rep(j, 26)cnt[j] = min(cnt[j], | ~~~^~~~...
s793687957
p03763
C++
//Jai Shree Krishna #include <vector> #include <list> #include <map> #include <set> #include "queue" #include <deque> #include <stack> #include <numeric> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <complex> #include <iostream> #include ...
a.cc: In function 'int main()': a.cc:82:32: error: expected ';' before 'l' 82 | cout<<(char)(i+'a')l; | ^ | ;
s864212557
p03763
C++
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<sstream> #include<cstdio> #include<cstdlib> #include<cstring> #include<climits> #include<cmath> #include<string> #include<vector> #include<set> #include<map> #include<queue> #include<numeric> #include<functional> #include<algorithm> #include<bitset> #include<t...
a.cc: In function 'int main()': a.cc:43:39: error: no matching function for call to 'min(int&, std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type)' 43 | rep(j, 26)cnt[j] = min(cnt[j], | ~~~^~~~...
s940747087
p03763
C++
#include <bits/stdc++.h> using namespace std; 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 push_back #define mk make_pair #define fr first #define sc second #define ll long long #define reps(i,j,...
a.cc: In function 'int main()': a.cc:43:29: error: '\U000000e5' was not declared in this scope 43 | cout << ans << endl;å | ^
s943891040
p03763
C++
n = input() counter = [108]* 26 alphabet = "abcdefghijklmnopqrstuvwxyz" for i in range(n): s = raw_input() for c in range(26): counter[c] = min(counter[c], s.count(alphabet[c])) res = "" for c in range(26): res += alphabet[c] * counter[c] print res
a.cc:1:1: error: 'n' does not name a type 1 | n = input() | ^
s316375349
p03763
C++
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; char b[100],c[100],d[100]; int i,j,l,n; int main() { scanf("%d\n",&n); for (i=1;i<=26;i++) c[i]=100; for (i=1;i<=n;i++) { gets(b+1); l=strlen(b+1); memset(d,0,sizeof(d)); for (j=1;j<=l;j++) d[b[j]-96]++; for (j=1;j<=26;...
a.cc: In function 'int main()': a.cc:17:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 17 | gets(b+1); | ^~~~ | getw
s659318565
p03763
C++
// package atcoder.arc.arc071; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.InputMismatchException; public class Main { public static void main(String[] args) { InputReader in = new InputReader(System.in); PrintWriter...
a.cc:3:1: error: 'import' does not name a type 3 | import java.io.IOException; | ^~~~~~ 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 | import java.io.InputStream; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodu...
s319286498
p03763
C++
#include <cstdio> #include <cstring> #include <algorithm> static const int MAXN = 54; static const int ALPHABET = 26; int n; char s[MAXN]; int ct[ALPHABET], min[ALPHABET]; int main() { scanf("%d", &n); getchar(); for (int i = 0; i < ALPHABET; ++i) min[i] = MAXN; for (int i = 0; i < n; ++i) { gets(...
a.cc: In function 'int main()': a.cc:16:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 16 | gets(s); | ^~~~ | getw
s955535570
p03763
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; typedef pair<int,int> pii; typedef pair<ll,ll> pll; typedef int _loop_int; #define REP(i,n) for(_loop_int i=0;i<(_loop_int)(n);++i) #define FOR(i,a,b) for(_loop_int i=(_loop_int)(a);i<(_loop_int)(b);++i...
a.cc: In function 'int main()': a.cc:20:25: error: no matching function for call to 'min(int&, std::iterator_traits<char*>::difference_type)' 20 | #define CHMIN(a,b) a=min((a),(b)) | ~~~^~~~~~~~~ a.cc:48:7: note: in expansion of macro 'CHMIN' 48 | CHMIN(cnt[j],count(s[i],s[i]+strl...
s865009474
p03764
C++
あ
a.cc:1:1: error: '\U00003042' does not name a type 1 | あ | ^~
s050888891
p03764
C++
n,m=map(int,input().split()) aa=list(map(int,input().split())) bb=list(map(int,input().split())) mod=10**9+7 ss=0 for i in range(n-1): ss+=(aa[i+1]-aa[i])*(i+1)*(n-i-1) ss%=mod tt=0 for i in range(m-1): tt+=(bb[i+1]-bb[i])*(i+1)*(m-i-1) tt%=mod print((ss*tt)%mod)
a.cc:1:1: error: 'n' does not name a type 1 | n,m=map(int,input().split()) | ^
s035088620
p03764
C++
#include<bits/stdc++.h> //#pragma GCC optimize("O3") //#pragma GCC target ("sse4") using namespace std; #define PB push_back #define all(x) (x).begin(),(x).end() #define MEM(x,a) memset((x),a,sizeof((x))) #define F first #define S second #define imx INT_MAX #define inI(x) scanf("%d",&x) #define inI2(x,y) scanf("%d %d",...
a.cc: In function 'int main()': a.cc:31:9: error: ambiguous overload for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__int128') 31 | cout<<cc; | ~~~~^~~~ | | | | | __int128 | std::ostream {aka std::basic_ostream<char>} In fi...
s412024931
p03764
C++
#pragma GCC optimize ("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #include <bits/stdc++.h> using namespace std; using Int = long long; typedef pair<int,int> P; typedef pair<Int,Int> Pl; static const int mod = 1e9+7; #define END {cout<<ans<<'\n'; return 0;} #define ALL(v) (v)....
a.cc: In instantiation of 'std::istream& operator>>(std::istream&, ModInt<1000000007>&)': a.cc:93:19: required from here 93 | rep(i,n)cin>>a[i]; rep(i,m)cin>>b[i]; | ^ a.cc:68:9: error: call of overloaded 'ModInt(int64_t&)' is ambiguous 68 | a = ModInt< mod >(t); | ^~...
s957665221
p03764
C++
#include <bits/stdc++.h> using namespace std; #define long long ll; const int MAX=1e5+100; const int INF=99999999; const int MOD=1e9+7; ll x[MAX],y[MAX]; int main() { ll n,m; cin>>n>>m; for(int i=1; i<=n; i++) cin>>x[i]; for(int i=1; i<=m; i++) cin>>y[i]; ll ax=0,ay=0; for(int i=1...
a.cc:7:1: error: 'll' does not name a type 7 | ll x[MAX],y[MAX]; | ^~ a.cc: In function 'int main()': a.cc:10:5: error: 'll' was not declared in this scope 10 | { ll n,m; | ^~ a.cc:11:10: error: 'n' was not declared in this scope; did you mean 'yn'? 11 | cin>>n>>m; | ^ ...
s846104533
p03764
C++
#include <iostream> #include <vector> #include<list> #include <algorithm> #include <string> #include <math.h> #include<map> #include <utility> #include<queue> using namespace std; #define REP(i,k,n) for(int i=k;i<n;i++) #define INF 1844674407370955161 typedef long long unsigned int ll; #define SIZE_OF_ARRAY(array) (...
a.cc: In function 'int main()': a.cc:108:3: error: expected ',' or ';' before 'cout' 108 | cout << ans<< endl; | ^~~~
s586484583
p03764
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N=100005; const int MOD=1e9+7; ll x[N],y[N]; int n,m; int main() { int n; scanf("%d%d",&n,&m); int maxX=-(1e9+7),minX=1e9+7; int maxY=-(1e9+7),minY=1e9+7; for(int i=1;i<=n;i++) { scanf("%lld",&x[i]); } for(int i=1;i<=m;i++) { ...
a.cc: In function 'int main()': a.cc:28:73: error: expected ';' before ')' token 28 | ans1=(ans1%MOD+((x[i+1]-x[i])%MOD*i%MOD*(n-i)%MOD)%MOD)%MOD)%MOD; | ^ | ...
s517396805
p03764
C++
#include<iostream> using namespace std; int main(){ long n,m,sum1=0,sum2=0,,b4a,a,ans,mod=1000000007,i; cin>>n>>m; cin>>b4a; for(i=1;i<n;i++){ cin>>a; sum1=(sum1+(a-b4a)*i%mod*(n-i)%mod)%mod; } cin>>b4a; for(i=1;i<m;i++){ cin>>a; sum2=(sum2+(a-b4a)*i%mod*(n-i)%mod)%mod; } ans=sum1*sum2...
a.cc: In function 'int main()': a.cc:4:26: error: expected unqualified-id before ',' token 4 | long n,m,sum1=0,sum2=0,,b4a,a,ans,mod=1000000007,i; | ^
s400391506
p03764
C++
#include<bits/stdc++.h> using namespace std; #define int long long const int mod=1e9+7; signed main(){ int n,m;cin>>n>>m; vector<int> x(n),y(m); for(auto&& w:x)cin>>w; for(auto&& w:y)cin>>w; sort(begin(x),end(x)); sort(begin(y),end(y)); int x0=x[0],y0=y[0]; for(auto&& w:x)w-=x0; for(auto&& w:y)w-=y0; vector...
a.cc: In function 'int main()': a.cc:26:1: error: expected primary-expression before '}' token 26 | }} | ^ a.cc:25:27: error: expected ']' before '}' token 25 | s[ | ^ | ] 26 | }} | ~
s967462500
p03764
C++
#include <iostream> #include <iomanip> #include <algorithm> #include <vector> #include <string> #include <sstream> #include <set> #include <map> #include <iostream> #include <utility> #include <cctype> #include <queue> #include <stack> #include <cstdio> #include <cstdlib> #include <cmath> #include <unordered_set> #incl...
a.cc: In function 'LL g(LL*, int)': a.cc:104:51: error: expected ')' before ';' token 104 | REP(i,N) res+=(1LL*(2LL*i-L+1)*Z[i]%MOD,res%=MOD; | ~ ^ | )
s344115816
p03764
C++
#include<iostream> #include<stdint> using namespace std; const int MOD = 1000000007; // 今回使う余り int main() { int n, m, x, y; cin >> n >> m; int64_t xsum = 0, ysum = 0; for (int i = 0;i < n;i ++) { cin >> x; xsum = (xsum + (int64_t)(2 * i + 1 - n) * x) % MOD; } for (int i = 0;i < m;i ++) { cin >> y; ysum...
a.cc:2:9: fatal error: stdint: No such file or directory 2 | #include<stdint> | ^~~~~~~~ compilation terminated.
s548011874
p03764
C
#include<cstdio> #include<algorithm> #define MN 200001 using namespace std; const int MOD=1e9+7; int n,m,a[MN],b[MN],A=0,B=0; int main(){ scanf("%d%d",&n,&m); for (int i=1;i<=n;i++) scanf("%d",&a[i]);sort(a+1,a+1+n); for (int i=1;i<=m;i++) scanf("%d",&b[i]);sort(b+1,b+1+m); for (int i=1;i<n;i++) A=(1L...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s475944616
p03764
C++
#include <iostream> #include <vector> int main() { const long long mod = 1000000007; long long n, m; std::cin >> n >> m; std::vector<long long> x(n); std::vector<long long> y(m); for (int i = 0; i < n; ++i) { std::cin >> x[i]; } for (int i = 0; i < m; ++i) { std::cin >> y[i]; } std::sort(x....
a.cc: In function 'int main()': a.cc:16:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 16 | std::sort(x.begin(), x.end()); | ^~~~ | qsort a.cc:17:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 17 | std::sort(y.begin(), y.end()); | ^~~~...