submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s309296398
p03830
C++
#include <bits/stdc++.h> #include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <deque> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <utility> #include <vector> #define pi 3.141592653589...
a.cc: In function 'int main()': a.cc:124:19: error: expected ';' before 'A' 124 | A[100]=583951250 | ^ | ; 125 | A[1000]=972926972; | ~
s766114265
p03830
C++
#include<bits/stdc++.h> #include<vector> using namespace std; typedef long long ll #define mod 10000000007; vector<pair<long long, long long>> pa(ll n){ vector<pair<ll>> res; for(ll a=2;a*a<=n;a++){ if(n%a!=0) continue; ll ex=0; while(n%a==0){ ex++; n/=a; } res.push_back({a,ex}); } ...
a.cc:6:1: error: expected initializer before 'vector' 6 | vector<pair<long long, long long>> pa(ll n){ | ^~~~~~ a.cc: In function 'int main()': a.cc:21:3: error: 'll' was not declared in this scope 21 | ll n,a; | ^~ a.cc:22:8: error: 'n' was not declared in this scope; did you mean 'yn'? 22 | ...
s103413574
p03830
C++
#incldue<iostream> using namespace std; using ll=long long; #define mod 10000000007; vector<pair<ll,ll>> pa(ll n){ vector<pair<ll>> res; for(ll a=2;a*a<=n;a++){ if(n%a!=0) continue; ll ex=0; while(n%a==0){ ex++; n/=a; } res.push_back({a,ex}); } if(n!=1) res.push_back({n,1}); ret...
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include? 1 | #incldue<iostream> | ^~~~~~~ | include a.cc:5:1: error: 'vector' does not name a type 5 | vector<pair<ll,ll>> pa(ll n){ | ^~~~~~ a.cc: In function 'int main()': a.cc:21:3: error: 'cin' was not declared in t...
s543875096
p03830
C++
#include <bits/stdc++.h> using namespace std; const long long MOD = 1000000007; void solve(long long N) { vector<int> morty(n,0); for(int i = 2;i<=N;i++){ int x = i; for(int i1 = 2;i1<=i;i1++){ while(x%i1 == 0){morty[i1]++;x/=i1;} } } long long rick = 1; for(int i = 2;i<=N;...
a.cc: In function 'void solve(long long int)': a.cc:7:27: error: 'n' was not declared in this scope 7 | vector<int> morty(n,0); | ^ a.cc:22:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 22 | int main() { | ^~ a.cc...
s201092357
p03830
C++
#include <iostream> #include <string> #include <algorithm> #include <cmath> #include <vector> #include <numeric> #include <set> #include <cstdlib> #include <queue> using namespace std; typedef long long llint; typedef long double ld; #define inf 1e18 #define mod 1000000007 priority_queue<llint,vector<llint>,greater<l...
a.cc: In function 'void solve()': a.cc:27:9: error: 'memset' was not declared in this scope 27 | memset(dp,0,sizeof(dp)); | ^~~~~~ a.cc:10:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 9 | #include <queue> +++ |+#include <cstri...
s767989463
p03830
C++
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define FOR(i,l,r) for(i=l;i<r;i++) #define REP(i,n) FOR(i,0,n) #define ALL(x) x.begin(),x.end() #define P pair<ll,ll> #define F first #define S second bool PRIME(&x){ for(ll i=2;i*i<=x;i++)if(x%i==0)return 0; return 1; } signed main(){ ll N,...
a.cc:10:13: error: 'x' was not declared in this scope 10 | bool PRIME(&x){ | ^ a.cc: In function 'int main()': a.cc:16:23: error: 'PRIME' cannot be used as a function 16 | FOR(i,2,N+1)if(PRIME(i)){ | ~~~~~^~~
s309189150
p03830
C++
1000
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1000 | ^~~~
s412233295
p03830
C++
#include<bits/stdc++.h> #define rep(i,n)for(int i=0;i<n;++i) #include<string> #include<vector> using namespace std; typedef long long ll; typedef pair<int, int>P; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a ...
a.cc: In function 'int main()': a.cc:64:33: error: invalid operands of types 'int' and 'double' to binary 'operator%' 64 | ll x = p.second % (1e9 + 7); | ~~~~~~~~ ^ ~~~~~~~~~ | | | | int d...
s973350173
p03830
C++
from math import log N=int(input()) lp=[1 for i in range(N+1)]#ind=suuzi for i in range(2,N+1): if lp[i]==1: for j in range(2*i,N+1,i): lp[j]=0 ans=1 MOD=10**9+7 for i in range(2,N+1): if lp[i]==1: count=0 for j in range(int(log(N,i))): count=(count+N//(i**(j+1))%...
a.cc:3:27: error: stray '#' in program 3 | lp=[1 for i in range(N+1)]#ind=suuzi | ^ a.cc:1:1: error: 'from' does not name a type 1 | from math import log | ^~~~
s147829527
p03830
C++
#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) #define fi first #define se second using namespace std; using lint = long long; using uint = unsigned int; using ulint = unsigned long long; using ldouble = long double; using pii = pair<int, int>; usi...
a.cc: In function 'int main()': a.cc:51:11: error: expected unqualified-id before ':' token 51 | for(auto: m){ | ^ a.cc:4:12: error: 'class std::map<int, int>' has no member named 'first' 4 | #define fi first | ^~~~~ a.cc:52:15: note: in expansion of macro 'fi' 52 | int ...
s473369281
p03830
C++
#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) #define fi first #define se second using namespace std; using lint = long long; using uint = unsigned int; using ulint = unsigned long long; using ldouble = long double; using pii = pair<int, int>; usi...
a.cc: In function 'int main()': a.cc:33:10: error: wrong number of template arguments (1, should be at least 2) 33 | map<int> m; | ^ In file included from /usr/include/c++/14/map:63, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152, from a.cc:1: /usr/incl...
s612502752
p03830
C++
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <bits/stdc++.h> /*#pragma GCC optimize("Ofast","unroll-loops","omit-frame-pointer","inline") //Optimization flags #pragma GCC option("arch=native","tune=native","no-zero-upper...
a.cc:127:2: error: stray '#' in program 127 | }#define _CRT_SECURE_NO_WARNINGS | ^ a.cc:127:3: error: 'define' does not name a type 127 | }#define _CRT_SECURE_NO_WARNINGS | ^~~~~~ a.cc:142:11: error: redefinition of 'const int p' 142 | const int p = 1000000007; | ^ a.cc:16:11: note:...
s702778873
p03830
C++
#include <iostream> #include <iomanip> #include <algorithm> using namespace std; #include <cstdio> #include <tuple> #include <string> #include <vector> #include <set> #include <string.h> #include <map> #include <cmath> #include <deque> using ll = long long; using Graph = vector<vector<int>>; #include <queue> #include ...
a.cc:21:1: error: 'bitset' does not name a type 21 | bitset<num> is_prime;// | ^~~~~~ a.cc: In function 'void create_prime_number(int)': a.cc:25:29: error: 'is_prime' was not declared in this scope 25 | for(int i=0;i <= n;i++) is_prime.set(i);//全てON | ^~~~~~~~ a.cc:28:1...
s988385118
p03830
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; ll ans; ll A[1010]; ll N; int main(){ cin>>N; for (int i=2;i<=N;++i){ ll t = i; for (int j=2;j<=i;++j){ ll c = 0; while (t%j == 0){ ++c; t /= j; } A[j] += c; ...
a.cc: In function 'int main()': a.cc:22:55: error: 'MOD' was not declared in this scope 22 | for (int i=1;i<=N;++i)ans = (ans * (A[i]+1) % MOD); | ^~~
s019575463
p03830
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<long long> VLL; typedef vector<pair<int,int>> VP; #define INF (int)(1e9) #define MAXX 1.1529215e+18 #define inf 999999 #define EPS (1e-7) #define rep(i,n) for(int i=0; i<(int)(n);i++) #define REP(i,n) for(int i=1;i<=(int)(n);i++) #defin...
a.cc: In function 'int main()': a.cc:62:13: error: 'j' was not declared in this scope 62 | while(j <= N){ | ^
s613278777
p03830
C++
using namespace std; int main() { long long N,s=1; long long j=0; long long i; cin>>N; for( i=1;i<=N;i++) { s*=i; } for( i=1;i<=s;i++) { if(s%i==0) j++; } cout<<j; return 0; }
a.cc: In function 'int main()': a.cc:8:5: error: 'cin' was not declared in this scope 8 | 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:18:5: error: 'cou...
s383698281
p03830
C++
#include <iostream> #include <vector> #include <bits/stdc++.h> using namespace std; int main() { int n; int ant = 1; cin >> n; vector<int> abcd(n + 1,0); int num = 1; for(int i=1;i<=n;i++){ num *=n; } for (int i = 2; i <= n; i++) { while (num%i == 0) { abcd.at(i)++;  num /= i; } ...
a.cc:23:38: error: extended character   is not valid in an identifier 23 | abcd.at(i)++;  | ^ a.cc: In function 'int main()': a.cc:23:38: error: '\U00003000' was not declared in this scope 23 | abcd.at(i)++;  | ...
s484848987
p03830
C++
#include <iostream> #include <vector> #include <bits/stdc++.h> using namespace std; int main() { int n; int ant = 1; cin >> n; vector<int> abcd(n + 1); int num = 1; for(int i=1;i<=n;i++){ num *=n; } for (int i = 2; i <= n; i++) { while (num%i == 0) { abcd.at(i)++;  num /= i; } }...
a.cc:23:38: error: extended character   is not valid in an identifier 23 | abcd.at(i)++;  | ^ a.cc:30:39: error: extended character   is not valid in an identifier 30 | ant *= abcd.at(i) + 1;  | ...
s385039017
p03830
C++
#include <iostream> #include <vector> #include <bits/stdc++.h> using namespace std; int main() { int n; int ans = 1; cin >> n; vector<int> abcd(n + 1); int num = 1; for(int i=1;i<=n;i++){ num *=n; } for (int i = 2; i <= n; i++) { while (num%i == 0) { x.at(i)++;  num /= i; } } for (in...
a.cc:22:35: error: extended character   is not valid in an identifier 22 | x.at(i)++;  | ^ a.cc:29:36: error: extended character   is not valid in an identifier 29 | ant *= x.at(i) + 1;  | ^ a....
s797710938
p03830
C++
#include <iostream> #include <vector> #include <bits/stdc++.h> using namespace std; int main() { int n; int ans = 1; cin >> n; vector<int> x(n + 1); int num = 1; for(int i=1;i<=n;i++){ num *=n; } for (int i = 2; i <= n; i++) { while (num%i == 0) { x.at(i)++;  num /= i; } } for (int i...
a.cc:22:35: error: extended character   is not valid in an identifier 22 | x.at(i)++;  | ^ a.cc:29:36: error: extended character   is not valid in an identifier 29 | ans *= x.at(i) + 1;  | ^ a....
s682975115
p03830
C++
#include<iostream> #include <vector> using namespace std; int main() { int n; int ans = 1; cin >> n; vector<int> x(n + 1); int num = 1; for(int i=1;i<=n;i++){ num *=n; } for (int i = 2; i <= n; i++) { while (num%i == 0) { x.at(i)++;  num /= i; } } for (int i = 2; i <= n; i++) { a...
a.cc:21:35: error: extended character   is not valid in an identifier 21 | x.at(i)++;  | ^ a.cc:28:36: error: extended character   is not valid in an identifier 28 | ans *= x.at(i) + 1;  | ^ a....
s718165191
p03830
C++
#include<iostream> #include <vector> #include <bits/stdc++.h> using namespace std; long long int a,ant=1; long long int fab(int n){ int n,x[n]; int ans = 1; cin >> n; for(int i=0;i<n;i++){ x[i] = 1; } int num = n; for (int i = 2; i <= n; i++) { while (num%i == 0) { x[i]++;  num /= i; ...
a.cc:22:32: error: extended character   is not valid in an identifier 22 | x[i]++;  | ^ a.cc:29:29: error: extended character   is not valid in an identifier 29 | ans *= x[i];  | ^ a.cc: In function 'lon...
s649240068
p03830
C++
#include<iostream> #include <vector> #include <bits/stdc++.h> using namespace std; long long int a,ant=1; long long int fab(int n){ int n; int ans = 1; cin >> n; vector<int> x(n + 1); int num = n; for (int i = 2; i <= n; i++) { while (num%i == 0) { x.at(i)++;  num /= i; } } for (int i = 2; i <=...
a.cc:19:35: error: extended character   is not valid in an identifier 19 | x.at(i)++;  | ^ a.cc:26:36: error: extended character   is not valid in an identifier 26 | ans *= x.at(i) + 1;  | ^ a....
s347806086
p03830
C++
#include<iostream> #include <vector> #include <bits/stdc++.h> using namespace std; long long int a,ant=1; long long int dfs(n) { int n; int ans = 1; cin >> n; vector<int> x(n + 1); int num = n; for (int i = 2; i <= n; i++) { while (num%i == 0) { x.at(i)++;  num /= i; } } for (int i = 2; i <= n;...
a.cc:20:35: error: extended character   is not valid in an identifier 20 | x.at(i)++;  | ^ a.cc:27:36: error: extended character   is not valid in an identifier 27 | ans *= x.at(i) + 1;  | ^ a....
s627689630
p03830
C++
#include<iostream> #include <vector> #include <bits/stdc++.h> using namespace std; long long int n,ant=1; long long int dfs(n) { int n; int ans = 1; cin >> n; vector<int> x(n + 1); int num = n; for (int i = 2; i <= n; i++) { while (num%i == 0) { x.at(i)++;  num /= i; } } for (int i = 2; i <= n;...
a.cc:20:35: error: extended character   is not valid in an identifier 20 | x.at(i)++;  | ^ a.cc:27:36: error: extended character   is not valid in an identifier 27 | ans *= x.at(i) + 1;  | ^ a....
s103340613
p03830
C++
#include<iostream> #include <vector> #include <bits/stdc++.h> using namespace std; long long int n; long long int dfs(n) { int n; int ans = 1; cin >> n; vector<int> x(n + 1); int num = n; for (int i = 2; i <= n; i++) { while (num%i == 0) { x.at(i)++;  num /= i; } } for (int i = 2; i <= n; i++) ...
a.cc:20:35: error: extended character   is not valid in an identifier 20 | x.at(i)++;  | ^ a.cc:27:36: error: extended character   is not valid in an identifier 27 | ans *= x.at(i) + 1;  | ^ a....
s708058824
p03830
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()) #define rev(a) reverse(a.begin(),a.end()) #define fi first #define se second #define co(a) cout<<a<<endl #define sz size() #define bgn begin() #define en end() #define pb(a) pu...
a.cc: In function 'int main()': a.cc:231:7: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<long long int>') 231 | cout<<e<<endl; | ~~~~^~~ | | | | | std::vector<long long int> | std::ostream {aka std::basic...
s009041028
p03830
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()) #define rev(a) reverse(a.begin(),a.end()) #define fi first #define se second #define co(a) cout<<a<<endl #define sz size() #define bgn begin() #define en end() #define pb(a) pu...
a.cc: In function 'int main()': a.cc:210:8: error: 'plime' was not declared in this scope; did you mean 'prime'? 210 | if(plime(i+1)){ | ^~~~~ | prime a.cc:231:7: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<long lon...
s585319136
p03830
C++
#include<bits/stdc++.h> using namespace std; using ll=long long; using vec=vector<ll>; using mat=vector<vec>; #define For(i,a,b) for(i=a;i<b;i++) #define rep(i,N) For(i,0,N) #define rep1(i,N) For(i,1,N) #define all(v) (v).begin(),(v).end() #define vsort(v) sort(all(v)) #define mod 1000000007 using data=pair<ll,ll>; lon...
a.cc: In function 'int main()': a.cc:38:13: error: expected ';' before '}' token 38 | cnt+=K | ^ | ; 39 | } | ~
s062075267
p03830
C++
#include<bits/stdc++.h> using namespace std; using ll=long long; using vec=vector<ll>; using mat=vector<vec>; #define For(i,a,b) for(i=a;i<b;i++) #define rep(i,N) For(i,0,N) #define rep1(i,N) For(i,1,N) #define all(v) (v).begin(),(v).end() #define vsort(v) sort(all(v)) #define mod 1000000007 using data=pair<ll,ll>; lon...
a.cc: In function 'int main()': a.cc:28:7: error: 'plist' was not declared in this scope; did you mean 'plis'? 28 | plist.push_back(a[i]); | ^~~~~ | plis
s172557925
p03830
C++
#include <bits/stdc++.h> using namespace::std; int main(){ long n; cin>>n; long ans=1; for(int i=2;i<n+1;i++){ bool f=0; for(int j=2;j<i;j++)if(i%j==0)f=1; if(!f)continue; long tmp=0,tmp2=i; while(tmp2<=n){ tmp+=n/tmp2; tmp2*=i; } ans*=tmp; ans%=pow(10,9)+7; } cou...
a.cc: In function 'int main()': a.cc:17:8: error: invalid operands of types 'long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%' 17 | ans%=pow(10,9)+7; | ~~~^~~~~~~~~~~~~ a.cc:17:8: note: in evaluation of 'operator%=(long int, __gnu_cxx::__promote<double>::__type...
s656310311
p03830
C++
#include<bits/stdc++.h> using namespace std; const long long MOD = 1e9 + 7; typedef long long ll; ll arr[1010]; //√1000は31ちょい void factors(int x){ //xを素因数分解した結果をarrに保存 int c = (int) sqrt( (double) x); for(int j = 2; j <= c; j++){ while( x % j == 0){ x /= j; arr[j]++;}} if( x != 1){ arr[x]++;} } int ...
a.cc: In function 'int main()': a.cc:29:26: error: request for member 'size' in 'arr', which is of non-class type 'll [1010]' {aka 'long long int [1010]'} 29 | for(int j = 0; j < arr.size(); j++){ | ^~~~
s665289372
p03830
C++
#include <bits/stdc++.h> using namespace std; int main() { int n; int ans = 1; cin >> n; vector<int> vec(n + 1)={}; int num = n; for (int i = 2; i <= n; i++) { while (num%i == 0){ vec[i]++; num /= i; } } for (int i = 2; i <= n; i++){ ans *= vec[i] + 1; ans=ans%1000000007; } co...
a.cc: In function 'int main()': a.cc:8:25: error: expected ',' or ';' before '=' token 8 | vector<int> vec(n + 1)={}; | ^
s098870068
p03830
C++
#include <bits/stdc++.h> using namespace std; int main() { int n; int ans = 1; cin >> n; vector<int> x(n + 1)={}; int num = n; // 素因数分解する変数num for (int i = 2; i <= n; i++) { while (num%i == 0) { // 素数で割り切れなくなるまで割っていく x[i]++; //割った個数を配列に足す num /= i; } for (int i = 2; i <= n; i++){ ans *...
a.cc:12:12: error: extended character   is not valid in an identifier 12 | x[i]++; //割った個数を配列に足す | ^ a.cc:16:21: error: extended character   is not valid in an identifier 16 | ans *= x[i] + 1; //それぞれを+1して掛けていく | ^ a.cc: In function 'int main()': a.cc:8:23: error:...
s174742688
p03830
C++
#include <bits/stdc++.h> using namespace std; int main() { int n; int ans = 1; cin >> n; vector<int> x(n + 1)={}; int num = n; // 素因数分解する変数num for (int i = 2; i <= n; i++) { while (num%i == 0) { // 素数で割り切れなくなるまで割っていく x[i]++; //割った個数を配列に足す num /= i; } } for (int i = 2; i <= n; i++) { ans *= ...
a.cc:14:32: error: extended character   is not valid in an identifier 14 | x[i]++; //割った個数を配列に足す | ^ a.cc:21:33: error: extended character   is not valid in an identifier 21 | ans *= x[i] + 1; //それぞれを+1して掛けていく | ...
s429446235
p03830
C++
#include <bits/stdc++.h> using namespace std; int main() { int n; int ans = 1; cin >> n; vector<int> x(n + 1); int num = n; // 素因数分解する変数num for (int i = 2; i <= n; i++) { while (num%i == 0) { // 素数で割り切れなくなるまで割っていく x[i]++; //割った個数を配列に足す num /= i; } } for (int i = 2; i <= n; i++) { ans *= x[i...
a.cc:14:32: error: extended character   is not valid in an identifier 14 | x[i]++; //割った個数を配列に足す | ^ a.cc:21:33: error: extended character   is not valid in an identifier 21 | ans *= x[i] + 1; //それぞれを+1して掛けていく | ...
s819710847
p03830
C++
#include <bits/stdc++.h> using namespace std; int main() { int n; int ans = 1; cin >> n; vector<int> x(n + 1); int num = n; // 素因数分解する変数num for (int i = 2; i <= n; i++) { while (num%i == 0) { // 素数で割り切れなくなるまで割っていく x.at(i)++; //割った個数を配列に足す num /= i; } } for (int i = 2; i <= n; i++) { ans *= ...
a.cc:14:35: error: extended character   is not valid in an identifier 14 | x.at(i)++; //割った個数を配列に足す | ^ a.cc:21:36: error: extended character   is not valid in an identifier 21 | ans *= x.at(i) + 1; //それぞれを+1して掛けていく | ...
s438657406
p03830
C++
#include<iostream> #include<algorithm> #include<cmath> using namespace std; const int MOD=1e9+7; int main() { long long ans=1,n,i,j,k,cnt[1000]; cin >> n; for(i=2; i<=n; i++) { for(j=i,k=2; j>1) { if(j%k==0) { cnt[k]++; j/=k; } else { k++; } } } for(i=2;...
a.cc: In function 'int main()': a.cc:10:21: error: expected ';' before ')' token 10 | for(j=i,k=2; j>1) { | ^ | ;
s247805800
p03830
C++
#include<iostream> #include<cstring> #include<cstdio> #include<algorithm> #include<cmath> #define ll long long using namespace std; const int N=2e5+100; const int mod=1e9+7; bool judge(int x) { if(x<=1) return 0; else if(x==2) return 1; int up=sqrt(x); for(int i=2; i<=up; i++) if...
a.cc: In function 'int main()': a.cc:34:11: error: expected ';' before 'tot' 34 | cin>>n | ^ | ; 35 | 36 | tot=0; | ~~~
s329785305
p03830
C++
#include<bits/stdc++.h> #define long long ll using namespace std; int main(){ ll n; ll ans=1; cin >>n; for(ll i=2;i<=n;i++){ bool ok=true; for(ll j=2;j<=pow(i,0.5);j++){ if(i%j==0)ok=false; } if(ok){ ll count=0; for(ll j=2;j<=n;j++){ ll s=j; while(s%i==0){ s/=i; count+...
a.cc: In function 'int main()': a.cc:5:3: error: 'll' was not declared in this scope 5 | ll n; | ^~ a.cc:6:5: error: expected ';' before 'ans' 6 | ll ans=1; | ^~~~ | ; a.cc:7:9: error: 'n' was not declared in this scope; did you mean 'yn'? 7 | cin >>n; | ^ ...
s075879886
p03830
C++
void Eratosthenes(){ for(int i = 0; i < N; i++){ arr[i] = 1; } for(int i = 2; i < sqrt(N); i++){ if(arr[i]){ for(int j = 0; i * (j + 2) < N; j++){ arr[i *(j + 2)] = 0; } } } for(int i = 2; i < N; i++){ if(arr[i]){ //cout << i << endl; } } }
a.cc: In function 'void Eratosthenes()': a.cc:2:28: error: 'N' was not declared in this scope 2 | for(int i = 0; i < N; i++){ | ^ a.cc:3:17: error: 'arr' was not declared in this scope 3 | arr[i] = 1; | ^~~ a.cc:5:33: error: 'N' was ...
s523317400
p03830
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vll; typedef vector<int> vi; const ll MOD=1e9+7; ll fct[20010]; ll ifct[20010]; ll MULT(int x, int y){ return (x*y)%MOD; } ll POW(int x, int n){ ll v=1; while(n>1){ if(n%2==1)v=MULT(v, x); x=MULT(x,x); n/=2; }...
a.cc: In function 'int main()': a.cc:60:30: error: lvalue required as left operand of assignment 60 | (dp[i][j]+=MULT(dp[i-1][j-i*k],MULT(f,ifct[k]))%=MOD; | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:60:67: error: expected ')' before ';' token 60 | (dp[i]...
s018144978
p03830
C++
#include <vector> #include <cstdio> #include <iostream> #include <cmath> #include <string> #include <cstring> #include <algorithm> #include <numeric> #include <cstdlib> #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define REP(i,n) for(int i=0;i<n;i++) #define SORT(...
a.cc: In function 'int main()': a.cc:39:14: error: 'mod' was not declared in this scope; did you mean 'modf'? 39 | ans %= mod; | ^~~ | modf
s845496542
p03830
C++
#include<iostream> #include <vector> using namespace std; int main() { int n; int ans = 1; cin >> n; vector<int> x(n + 1); int num = n; // 素因数分解する変数num for (int i = 2; i <= n; i++) { while (num%i == 0) { // 素数で割り切れなくなるまで割っていく x.at(i)++; //割った個数を配列に足す num /= i; } } for (int i = 2; i <= n; i++) {...
a.cc:17:35: error: extended character   is not valid in an identifier 17 | x.at(i)++; //割った個数を配列に足す | ^ a.cc:24:36: error: extended character   is not valid in an identifier 24 | ans *= x.at(i) + 1; //それぞれを+1して掛けていく | ...
s839322009
p03830
C++
#include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<cmath> #include<algorithm> //deque/functional/iterator/list/map/memory/numeric/queue/set/stack/utility/vector //#include<bits/stdc++.h> #define ll long long using namespace std; int N = 1e5+10; LL mod = 1e9+7; int a[N]; int main() { int...
a.cc:13:1: error: 'LL' does not name a type; did you mean 'll'? 13 | LL mod = 1e9+7; | ^~ | ll a.cc:14:7: error: size of array 'a' is not an integral constant-expression 14 | int a[N]; | ^ a.cc: In function 'int main()': a.cc:29:9: error: 'LL' was not declared in this scope; did you mean '...
s951134344
p03830
C++
from math import factorial n = factorial(int(input())) cnt = 2 k = 1 ans = 1 while n != 1: if n % cnt == 0: n //= cnt k = k + 1 else: ans = ans * k k = 1 cnt += 1 anw = (ans * k) % (10**9 + 7) print(anw)
a.cc:1:1: error: 'from' does not name a type 1 | from math import factorial | ^~~~
s315990289
p03830
C++
import java.io.*; import static java.lang.Math.*; import static java.lang.Math.min; import java.math.BigDecimal; import java.util.*; import static java.util.Arrays.*; import java.util.stream.*; /** * @author baito */ @SuppressWarnings("unchecked") public class Main { static boolean DEBUG = true; static S...
a.cc:16:1: error: stray '@' in program 16 | @SuppressWarnings("unchecked") | ^ a.cc:1399:9: error: stray '@' in program 1399 | @Override | ^ a.cc:1425:9: error: stray '@' in program 1425 | @Override | ^ a.cc:1433:9: error: stray '@' in program 1433 | @Over...
s106423528
p03830
C++
#include<bits/stdc++.h> using namespace std; #define ED return 0; #define UP(a,b) ((a+(b-1))/b) #define SORT(vec) sort(vec.begin(),vec.end()); #define DOUBLECHANGE(count) cout << setprecision(count); #define REV(vec) reverse(vec.begin(),vec.end()); #define ipow(x,y) long(pow(x,y)) const long long int mod = 1000000007;...
a.cc: In function 'int main()': a.cc:22:5: error: 've' was not declared in this scope 22 | ve | ^~ a.cc:24:5: error: 'sosu' was not declared in this scope 24 | sosu.at(0) = 0; | ^~~~
s448106770
p03830
C++
#include <bits/stdc++.h> using namespace std ; map < long long , long long > mp1 ; int a ; long long x , cnt = 1 ; int main () { cin >> a ; for ( int i = 1 ; i <= a ; ++ i ){ x = i ; for ( int j = 2 ; j <= x ; ++ j ){ while ( x % j == 0 ){ mp1 [ j ] ++ ; ...
a.cc: In function 'int main()': a.cc:24:34: error: invalid operands of types 'std::map<long long int, long long int>::mapped_type' {aka 'long long int'} and 'double' to binary 'operator%' 24 | cnt *= ( mp1 [ i ] + 1 ) % 1e9 ; | ~~~~~~~~~~~~~~~~~ ^ ~~~ | |...
s978646377
p03830
C++
#include "bits/stdc++.h" using namespace std; using ll = long long; int main () { cin.tie(0); cin.sync_with_stdio(0); int n; cin >> n; map<int, int> cnt; cnt[1] = 0; for(int v = 2; v <= n; ++v) { int x = i; for(int i = 2; i*i <= x; ++i) if(x % i == 0) { int c = 0; while(x % i == 0) c++, x /...
a.cc: In function 'int main()': a.cc:14:25: error: 'i' was not declared in this scope 14 | int x = i; | ^
s519181221
p03830
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; int n; const int N=1e5+7; int a[N]; int main() { memset(a,0,sizeof(a)); cin>>n; for (int i=2;i<=n;i++) { int x=i; for (int j=2;j<=x;j++) { while(x%j==0) { a[j]++; x/=j; } } a[x]++; } ll ans=1; for (int i=2;i<=n;i++)...
a.cc: In function 'int main()': a.cc:27:15: error: 'sum' was not declared in this scope 27 | cout<<sum; | ^~~
s209172021
p03830
C++
1
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1 | ^
s037853313
p03830
C
#include <iostream> #include <sstream> #include <cstdio> #include <cstdlib> #include <cmath> #include <ctime> #include <cstring> #include <string> #include <vector> #include <stack> #include <queue> #include <deque> #include <map> #include <set> #include <bitset> #include <numeric> #include <utility> #include <iomanip>...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s996753116
p03830
C++
#include <assert.h> #include <ctype.h> #include <errno.h> #include <float.h> #include <fstream> #include <iomanip> #include <iostream> #include <limits> #include <locale> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <wchar.h> #include <wctype.h> #include <algor...
a.cc:53:10: fatal error: conio.h: No such file or directory 53 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s266555703
p03830
C++
int main(){ int A,B,C,D; cin >> A >> B >> C >> D; if(A+B+C+D==7){ cout <<A ; cout <<"+" ; cout <<B ; cout <<"+" ; cout <<C ; cout <<"+" ; cout <<D ; cout <<"=" ; cout <<"7" ; } else if(A+B+C-D==7){ cout <<A ; cout <<"+" ; cout <<B ; cout <<"+" ; cout <<C ; cout <<"-" ; cout <<D ; cout <<"=" ; c...
a.cc: In function 'int main()': a.cc:3:3: error: 'cin' was not declared in this scope 3 | cin >> A >> B >> C >> D; | ^~~ a.cc:5:9: error: 'cout' was not declared in this scope 5 | cout <<A ; | ^~~~ a.cc:15:9: error: 'cout' was not declared in this scope 15 | cout <<A ;...
s625590559
p03830
C++
#include <cstdio> #include <cstring> #include <cmath> #include <algorithm> #include <iostream> using namespace std; #define rp(i,t) for(int i=0;i<(t);i++) #define rep(i,s,t) for(int i=(s);i<=(t);i++) #define rsp(i,s,t) for(int i=(s);i<(t);i++) #define rrp(i,t,s) for(int i=(t);i>=(s);i--) #define rcp(i,s,b,d) for(int i...
a.cc: In function 'void PrimeBuild()': a.cc:42:34: error: reference to 'next' is ambiguous 42 | rep(i,1,1001)if(itp[i-1])next[i]=next[i-1];else next[i]=i-1; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:66, from /usr/include/c++/1...
s383679011
p03830
C++
#include<bits/stdc++.h> #define kq 1000000000+7 using namespace std; long long n,a[10123],b[10123],res=0,c,res1=1; int main() { cin >> n; for(int i=1; i<=n; i++){ c=i; int j=2; while(j<=c){ if(c % j == 0){ a[j]++; c/=j; } ...
a.cc: In function 'int main()': a.cc:23:13: error: 't' was not declared in this scope; did you mean 'tm'? 23 | cout << t; | ^ | tm
s470624122
p03830
C++
#include<bits/stdc++.h> #define kq 1000000000+7 using namespace std; long long n,a[10123],b[10123],res=0,c,res1=1; int main() { cin >> n; for(int i=1; i<=n; i++){ c=i; int j=2; while(j<=c){ if(c % j == 0){ a[j]++; c/=j; } ...
a.cc: In function 'int main()': a.cc:23:13: error: 't' was not declared in this scope; did you mean 'tm'? 23 | cout << t; | ^ | tm
s864377884
p03830
C++
#include<iostream>   using namespace std;   #define REP(i, n) for(int i=0; i<n; i++) #define ll long long   ll n, a, b; ll x[100000]; ll f;   int main(){ cin >> n >> a >> b; REP(i, n){ cin >> x[i]; }   REP(i, n-1){ f += min(a*(x[i+1]-x[i]), b); } cout << f << endl; }
a.cc:2:1: error: extended character   is not valid in an identifier 2 |   | ^ a.cc:4:1: error: extended character   is not valid in an identifier 4 |   | ^ a.cc:7:1: error: extended character   is not valid in an identifier 7 |   | ^ a.cc:11:1: error: extended character   is not valid in a...
s480306682
p03830
C++
#include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <iomanip> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <string> #define FOR(i, a, b) for(int i = a; i <= b; i++) #define DOW(i, b, a) for(int i = b; i >= a; i--) #define maxN 1000000 + 10 const int m...
a.cc: In function 'void init()': a.cc:28:22: error: reference to 'prev' is ambiguous 28 | FOR(i, 2, n) prev[i] = 0; | ^~~~ In file included from /usr/include/c++/14/string:47, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++...
s973802284
p03830
C++
#include<iostream> using namespace std; int dash(int n){ if(n>1){ n=n*dash(n-1); return n; } else return 1; } int main(){ int n; int nd; int count=0; cin>>n; nd=dash(n); for(int i=1;i<=n;i++){ if(nd%i==) count++; } cout<<count; return 0; }
a.cc: In function 'int main()': a.cc:19:14: error: expected primary-expression before ')' token 19 | if(nd%i==) | ^
s038920746
p03830
C++
#include<iostream> using namespace std; int dash(int n){ if(n>1){ n=n*dash(n-1); return n; } else return 1; } int main(){ int n; int nd; int count=0; cin>>n; nd=dash(n); for(int i=1;i<=n;i++){ if(nd%i=0) count++; } cout<<count; return 0; }
a.cc: In function 'int main()': a.cc:19:10: error: lvalue required as left operand of assignment 19 | if(nd%i=0) | ~~^~
s013152827
p03830
C++
#include<stdio.h> #include<string.h> int df(int n,int x) { if(n<x) return 0; else return n/x+df(n/x,x); } int main() { int a[1001]; int i,j; for(i=1;i<1001;i++) a[i]=1; for(i=2;i<1001;i++) { if(a[i]==1) { for(j=i+i;j<1001;j+=i) a[j]=0; } } int n; while(~scanf("%d",&n)) {long long sum=1; for(i=...
a.cc: In function 'int main()': a.cc:28:7: error: 'f' was not declared in this scope 28 | {if(f[i]) | ^
s162711905
p03830
C++
//#include <bits/stdc++.h> #include<cstdio> #include<algorithm> using namespace std; typedef long long LL; const int mod=1e9+7; int a[1010],num; LL bit[1010]; bool isprime(int x){ if(x==1) return false; int q=sqrt(x); for(int i=2;i<=q;i++) if(x%i==0) return false; return true; } void init(){...
a.cc: In function 'bool isprime(int)': a.cc:14:11: error: 'sqrt' was not declared in this scope 14 | int q=sqrt(x); | ^~~~
s775127054
p03830
C
#include <iostream> #define mp make_pair #define pb push_back #define F first #define S second #define ll long long #define ld long double #define sz(a) ((int)(a).size()) #define clr(a,v) memset(a, v, sizeof(a)) #define all(a) (a).begin(),(a).end() #define pii pair<int,int> #define pdd pair<ld,ld> #define rep(i,a,b) f...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s042518111
p03830
C
#include<iostream> #define mp make_pair #define pb push_back #define F first #define S second #define ll long long #define ld long double #define sz(a) ((int)(a).size()) #define clr(a,v) memset(a, v, sizeof(a)) #define all(a) (a).begin(),(a).end() #define pii pair<int,int> #define pdd pair<ld,ld> #define rep(i,a,b) fo...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s013494592
p03830
C
#include<bits/stdc++.h> #define mp make_pair #define pb push_back #define F first #define S second #define ll long long #define ld long double #define sz(a) ((int)(a).size()) #define clr(a,v) memset(a, v, sizeof(a)) #define all(a) (a).begin(),(a).end() #define pii pair<int,int> #define pdd pair<ld,ld> #define rep(i,a,...
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s172352495
p03830
C++
#include <iostream> #include <vector> #include <queue> using namespace std; int n; int qtd[1000]; const long long mod = 1e9+7; int main() { memset(qtd, 0, sizeof qtd); cin >> n; for (int i = 1; i <= n; i++) { int pi = i; int val = 2; while(pi > 1) { int cont = 0; ...
a.cc: In function 'int main()': a.cc:11:5: error: 'memset' was not declared in this scope 11 | memset(qtd, 0, sizeof qtd); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <queue> +++ |+#include <cstring> ...
s868449221
p03830
Java
import java.io.*; import java.util.ArrayList; import java.util.NoSuchElementException; import java.util.Scanner; import javafx.beans.binding.StringBinding; public class Main { static int a[]=new int[1000]; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N=sc.nex...
Main.java:6: error: package javafx.beans.binding does not exist import javafx.beans.binding.StringBinding; ^ Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
s172251606
p03830
C++
#include<iostream> using namespace std; #incldue<math.h> int main(){ int n; cin >> n; cout << n % (pow(10,9) + 7) << endl; }
a.cc:3:2: error: invalid preprocessing directive #incldue; did you mean #include? 3 | #incldue<math.h> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:8:18: error: 'pow' was not declared in this scope 8 | cout << n % (pow(10,9) + 7) << endl; | ^~~
s000363905
p03830
C++
#include<iostream> using namespace std; #incldue<cmath> int main(){ int n; cin >> n; cout << n % (pow(10,9) + 7) << endl; }
a.cc:3:2: error: invalid preprocessing directive #incldue; did you mean #include? 3 | #incldue<cmath> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:8:18: error: 'pow' was not declared in this scope 8 | cout << n % (pow(10,9) + 7) << endl; | ^~~
s169057058
p03830
C++
#include<iostream> using name space std; #incldue<cmath> int main(){ int n; cin >> n; cout << n % (pow(10,9) + 7) << endl; }
a.cc:3:2: error: invalid preprocessing directive #incldue; did you mean #include? 3 | #incldue<cmath> | ^~~~~~~ | include a.cc:2:7: error: expected nested-name-specifier before 'name' 2 | using name space std; | ^~~~ a.cc: In function 'int main()': a.cc:7:5: error: 'cin' was not declar...
s862946719
p03830
C++
#include <bits/stdc++.h> using namespace std; int T[1010],prime[1010],cnt; bool ok[1010]; typedef long long LL; LL MOD = 1000000007; int main() { memset(ok,true,sizeof(ok)); for (int i=2;i<=1000;i++) { if (ok[i]) prime[++cnt]=i; for (int j=2*i;j<=1000;j+=i)ok[j]=false; } //for (int i=1;i<=cnt;i++)printf("%...
a.cc: In function 'int main()': a.cc:28:38: error: 'prime1' was not declared in this scope; did you mean 'prime'? 28 | tmp/=prime1[j]; | ^~~~~~ | prime
s284721911
p03830
C++
QvQ
a.cc:1:1: error: 'QvQ' does not name a type 1 | QvQ | ^~~
s898271630
p03830
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define inf (int)1000000007 #define rep(i, n) for(int i = 0; i < (n); i++) #define trep(i, n) for(int i = 0; i <= (n); i++) #define rrep(i, n) for(int i = (n) - 1; i >= 0; i--) #define trrep(i, n) for(int i = (n); i >= 0; i--) bool u[1111]; int co...
a.cc: In function 'int main()': a.cc:32:20: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (long long int&, long long int&)' 32 | now += cout(j, i); | ~~~~^~~~~~
s227768034
p03830
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define inf (int)1000000007 #define rep(i, n) for(int i = 0; i < (n); i++) #define trep(i, n) for(int i = 0; i <= (n); i++) #define rrep(i, n) for(int i = (n) - 1; i >= 0; i--) #define trrep(i, n) for(int i = (n); i >= 0; i--) bool u[1111]; int co...
a.cc: In function 'long long int count(long long int, long long int)': a.cc:19:14: error: no match for call to '(std::ostream {aka std::basic_ostream<char>}) (long long int, long long int&)' 19 | return cout(x / n, n) + 1; | ~~~~^~~~~~~~~~ a.cc: In function 'int main()': a.cc:32:20: error: no match ...
s310149849
p03830
Java
import java.io.InputStream; import java.io.PrintWriter; import java.io.BufferedWriter; import java.io.OutputStreamWriter; import java.io.IOException; import java.math.BigInteger; import java.util.*; import java.util.stream.Stream;     /** * * @author Pradyumn Agrawal coderbond007 */ public class Main{ public sta...
Main.java:9: error: illegal character: '\u00a0' ? ^ Main.java:10: error: illegal character: '\u00a0' ? ^ Main.java:19: error: illegal character: '\u00a0' ? ^ Main.java:57: error: illegal character: '\u00a0' ? ^ Main.java:63: error: illegal character: '\u00a0' ? ^ Main.java:66: error: illegal character: '\u00a0' ? ^ Mai...
s956353189
p03830
C++
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { int N, A, B, pos; scanf("%d %d %d", &N, &A, &B); ll ans = 0; int cur = 1; while(N--) { scanf("%d", &pos); ans = ans + min(B, 1ll * (pos - cur) * A ); cur = pos; } cout<<ans<<endl; ...
a.cc: In function 'int main()': a.cc:14:24: error: no matching function for call to 'min(int&, long long int)' 14 | ans = ans + min(B, 1ll * (pos - cur) * A ); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include...
s118212729
p03830
C
#include <stdio.h> #include <math.h> const int mod = (int)1e9 + 7; bool is_prime(int n){ for(int i = 2; i <= (int)sqrt(n); i ++){ if(n % i == 0){ return false; } } return true; } int main(){ int n; int j = 0, k = 0; int primes[1000]; int foo[1000]; scanf("%d",...
main.c:4:1: error: unknown type name 'bool' 4 | bool is_prime(int n){ | ^~~~ main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 2 | #include <math.h> +++ |+#include <stdbool.h> 3 | const int mod = (int)1e9 + 7; main.c: In function '...
s528520737
p03830
C
#include <stdio.h> #include <cmath> const int mod = (int)1e9 + 7; bool is_prime(int n){ for(int i = 2; i <= (int)sqrt(n); i ++){ if(n % i == 0){ return false; } } return true; } int main(){ int n; int j = 0, k = 0; int primes[1000]; int foo[1000]; scanf("%d", ...
main.c:2:10: fatal error: cmath: No such file or directory 2 | #include <cmath> | ^~~~~~~ compilation terminated.
s400029277
p03830
C++
#include <cstdio> using namespace std; typedef long long Int; int main() { int N; const int Nmax = 1000; const Int div = 1000000007; Int A[Nmax + 1]; scanf_s("%d", &N); A[1] = 1; for (int i = 2; i <= N; i++) { A[i] = (A[i - 1] * 2) % div; } printf("%lld\n", A[N]); return 0; }
a.cc: In function 'int main()': a.cc:12:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 12 | scanf_s("%d", &N); | ^~~~~~~ | scanf
s839656515
p03830
C++
#include <cstdio> using namespace std; typedef long long Int; int main() { int N; const int Nmax = 1000; const Int div = 1000000007; Int A[Nmax + 1]; scanf_s("%d", &N); A[1] = 1; for (int i = 2; i <= N; i++) { A[i] = (A[i - 1] * 2) % div; } printf("%d %lld\n", N, A[N]); return 0; }
a.cc: In function 'int main()': a.cc:12:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 12 | scanf_s("%d", &N); | ^~~~~~~ | scanf
s228505676
p03830
C++
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); sc.close(); if(n<3){ System.out.println(n); return; } ArrayList<Integer> list = new ArrayList<Integer>(); list.add(2)...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.ArrayList; | ^~~~~~ 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.util.Scanner; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodule...
s184614068
p03830
C++
サンプルの数字見間違えてた
a.cc:1:1: error: '\U000030b5\U000030f3\U000030d7\U000030eb\U0000306e\U00006570\U00005b57\U0000898b\U00009593\U00009055\U00003048\U00003066\U0000305f' does not name a type 1 | サンプルの数字見間違えてた | ^~~~~~~~~~~~~~~~~~~~~~~~~~
s248656509
p03830
C++
import std.stdio; import std.conv, std.array, std.algorithm, std.string; import std.math, std.random, std.range, std.datetime; import std.bigint; const long MOD = 1_000_000_007; void main(){ int n = readln.chomp.to!int; int[] ps; // primes int[int] cs; // prime -> count for(int i = 2; i < 1000; i ++){ int f =...
a.cc:1:1: error: 'import' does not name a type 1 | import std.stdio; | ^~~~~~ 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 std.conv, std.array, std.algorithm, std.string; | ^~~~~~ a.cc:2:1: note: C++20 'import' only avail...
s064211275
p03830
Java
import java.io.PrintWriter; import java.util.ArrayList; import java.util.Map; import java.util.Scanner; import java.util.TreeMap; public class A { private void solve(Scanner in, PrintWriter out) { int N = in.nextInt(); int[] primes = getPrimes(N + 1); TreeMap<Integer, Integer> count = new TreeMap<>(); ...
Main.java:7: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s557889756
p03831
Java
public class Main { public static void main(String[] args) { new Main().run(); } void run() { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int a = sc.nextInt(); int b = sc.nextInt(); int[] x = new int[n]; for (int i = 0; i < n; i++) { x[i] = sc.nextInt(); } int ans = 0; for...
Main.java:7: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:7: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s627997125
p03831
C++
#include <bits/stdc++.h> using namespace std; int main(){ long long N,A,B;cin>>A>>B;vector<long long>C(N); for(int X=0;X<N;X++){ cin>>C[X]; } long long V=0; for(int X=1;X<N;X++){ if((C[X]-C[X-1])*A>B)V+=C[X]-C[X-1])*A; else V+=B; } cout<<V<<endl; }
a.cc: In function 'int main()': a.cc:10:40: error: expected ';' before ')' token 10 | if((C[X]-C[X-1])*A>B)V+=C[X]-C[X-1])*A; | ^ | ;
s800398570
p03831
C++
#pragma region header #include <algorithm> #include <bitset> #include <tuple> #include <cstdint> #include <cctype> #include <assert.h> #include <time.h> #include <stdlib.h> #include <stdio.h> #include <cassert> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <ctime> #include <deque> #i...
a.cc: In function 'int main()': a.cc:76:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 76 | scanf_s("%lld%lld%lld", &n, &a, &b); | ^~~~~~~ | scanf
s079686974
p03831
Java
import java.io.*; public class Main { public static void main(String args[])throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int N = Integer.parseInt(st.nextToken()); int A = Integer.pars...
Main.java:6: error: cannot find symbol StringTokenizer st = new StringTokenizer(br.readLine()); ^ symbol: class StringTokenizer location: class Main Main.java:6: error: cannot find symbol StringTokenizer st = new StringTokenizer(br.readLine()); ^ symbol: cl...
s894409155
p03831
C++
#include <iostream> #include <iomanip> #include <algorithm> #include <vector> typedef long long ll; using namespace std; const ll INF = 1e9; const ll MOD = 1e9 + 7; #define repi(i, n, init) for (ll i = init; i < (n); i++) int main() { int n, a, b; cin >> n >> a >> b; vector<ll> X(n); repi(i, n, 0) cin ...
a.cc: In function 'int main()': a.cc:20:19: error: no matching function for call to 'min(int&, long long int)' 20 | ans += min(b, a * abs(X[i] - X[i - 1])); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/b...
s612121931
p03831
C++
#include <iostream> #include <iomanip> #include <algorithm> typedef long long ll; using namespace std; const ll INF = 1e9; const ll MOD = 1e9 + 7; #define repi(i, n, init) for (ll i = init; i < (n); i++) int main() { int n, a, b; cin >> n >> a >> b; vector<int> X(n); repi(i, n, 0) cin >> X[i]; ll a...
a.cc: In function 'int main()': a.cc:14:5: error: 'vector' was not declared in this scope 14 | vector<int> X(n); | ^~~~~~ a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 3 | #include <algorithm> +++ |+#include <vector> 4 | ...
s572990355
p03831
C++
#include <bits/stdc++.h> using namespace std; void solve(long long N, long long A, long long B, std::vector<long long> X) { int tmp = 0; for(int i = 1;i<N;i++){ tmp+=min((x[i]-x[i-1])*A,B); } cout<<tmp; } // Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools (tips: You // use the default te...
a.cc: In function 'void solve(long long int, long long int, long long int, std::vector<long long int>)': a.cc:7:17: error: 'x' was not declared in this scope 7 | tmp+=min((x[i]-x[i-1])*A,B); | ^
s793594815
p03831
C
#include <stdio.h> #include <stdlib.h> typedef long long ll; #define N 100009 int main() { int n, a, b, x[N], i; ll tired = 0; scanf("%d %d %d\n%d", &n, &a, &b, &x[1]); for (i = 2; i <= n; i++) { scanf("%d", &x[i]); tired += min(a * (x[i] - x[i - 1]), b); } printf("%lld", tired); }
main.c: In function 'main': main.c:12:26: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration] 12 | tired += min(a * (x[i] - x[i - 1]), b); | ^~~ | main
s927568972
p03831
C
#include <stdio.h> #include <stdlib.h> typedef long long ll; #define N 100009 int main() { int n, a, b, x[N] = { 0 }, i; ll tired = 0; scanf("%d %d %d\n%d", &n, &a, &b, &x[1]); for (i = 2; i <= n; i++) { scanf("%d", &x[i]); tired += min(a * (x[i] - x[i - 1]), b); } printf("%lld", tired); }
main.c: In function 'main': main.c:12:26: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration] 12 | tired += min(a * (x[i] - x[i - 1]), b); | ^~~ | main
s460735497
p03831
C
#include <stdio.h> #include <stdlib.h> typedef long long ll; #define N 100001 int main() { int n, a, b, x[N] = { 0 }, i; ll tired = 0; scanf("%d %d %d\n%d", &n, &a, &b, &x[0]); for (i = 1; i < n; i++) { scanf("%d", &x[i]); tired += min(a * (x[i] - x[i - 1]), b); } printf("%lld", tired); }
main.c: In function 'main': main.c:12:26: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration] 12 | tired += min(a * (x[i] - x[i - 1]), b); | ^~~ | main
s414570056
p03831
C
#include <stdio.h> #include <stdlib.h> typedef long long ll; #define N 1000000007 int main() { int n, a, b, x[N] = { 0 }, i; ll tired=0; scanf("%d %d %d\n%d", &n, &a, &b, &x[0]); for (i = 1; i < n; i++) { scanf("%d", &x[i]); tired += min(a*(x[i]-x[i-1]),b); } printf("%lld", tired); }
main.c: In function 'main': main.c:12:26: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration] 12 | tired += min(a*(x[i]-x[i-1]),b); | ^~~ | main
s255894699
p03831
C++
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define pb push_back typedef long long ll; typedef long double ld; typedef pair<ll ,ll > pll; typedef pair<int ,int > pii; const ld pi=3.14159265359; const int maxn=2e5+7; const int mod=1e9+7; const ll INF=9223372036854775807; const int inf...
a.cc: In function 'int main()': a.cc:30:25: error: no matching function for call to 'min(ll&, int&)' 30 | ans+=min(ret,B); | ~~~^~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s778074920
p03831
C++
#include<bits/stdc++.h> using namespace std; using ll = long long; int main() { ll n, a, b; cin >> a >> b; vector<ll> v(n); ll res = 0; ll p; cin >> p; for (int i = 0; i < n-1; i++) { ll x; cin >> x; res += min((x - p) * a, b)); p = x; } cout << res << endl; }
a.cc: In function 'int main()': a.cc:11:31: error: expected ';' before ')' token 11 | res += min((x - p) * a, b)); | ^ | ;
s034822909
p03831
C++
#include<bits/stdc++.h> using namespace std; using ll = long long; int main() { int n, a, b; cin >> a >> b; vector<ll> v(n); ll res = 0; ll p; cin >> p; for (int i = 0; i < n-1; i++) { ll x; cin >> x; res += min((x - p) * a, b)); p = x; } cout << res << endl; }
a.cc: In function 'int main()': a.cc:11:15: error: no matching function for call to 'min(ll, int&)' 11 | res += min((x - p) * a, b)); | ~~~^~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...