submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s437329215
p03687
C++
#include <bits/stdc++.h> #include <array> using namespace std; using ULL = unsigned long long; using UL = unsigned; using LL = long long; #define rep(i, n) for(UL i = 0; i < (n); i++) struct Problem { void Solve() { vector<UL> ans; ans.assign(26, 0); vector<UL> prev; prev.assign(26, (UL)-1); string S; cin >> S...
a.cc: In member function 'void Problem::Solve()': a.cc:28:37: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<unsigned int>, unsigned int>::value_type&, std::__cxx11::basic_string<char>::size_type)' 28 | ans[i] = max(ans[i], S.size() - 1 - prev[i]); ...
s140403939
p03687
C++
#include <bits/stdc++.h> #define rep(i,n)for(long long i=0;i<(n);i++) using namespace std; typedef long long ll; typedef unsigned long long ull; int main() { string s; cin >> s; int alp[26]={}; rep(i,s.size()){ alp[s[i]-'a']++; } int M=0; char c=s[s.size()/2]; rep(i,26){ if(M<alp[i]){ c=c...
a.cc: In function 'int main()': a.cc:30:19: error: 'j' was not declared in this scope 30 | if(s[i]==word[j]){ | ^
s428908122
p03687
Java
import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import java.util.NoSuchElementException; import java.util.Scanner; class FastScanner { private final InputStream in = System.in; private final byte[] buffer = new byte[1024]; private int ptr = 0; private int buflen = 0; private boolea...
Main.java:186: error: cannot find symbol System.out.println(upper_division(str.length()-max,2)); ^ symbol: variable max location: class Main 1 error
s714091098
p03687
Java
import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import java.util.NoSuchElementException; import java.util.Scanner; class FastScanner { private final InputStream in = System.in; private final byte[] buffer = new byte[1024]; private int ptr = 0; private int buflen = 0; private boolea...
Main.java:183: error: cannot find symbol for(int i=0;i<str.length();i++)cnt[str.charAt-'a']++; ^ symbol: variable charAt location: variable str of type String Main.java:186: error: cannot find symbol System.out.println(upper_division(str.length-max,2)); ...
s972197507
p03687
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; string t = "abcdefghijklmnopqrstuvwxyz"; vector<int> b; for(string j : t){ vector<int> a; int count = 0; for(int i = 0; i < s.size(); i++){ if(s.at(i) != j) count++; if(s.at(i) == j){ a.push_back(cou...
a.cc: In function 'int main()': a.cc:9:18: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 9 | for(string j : t){ | ^ a.cc:13:18: error: no match for 'operator!=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<c...
s234286022
p03687
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; string t = "abcdefghijklmnopqrstuvwxyz"; vector<int> b; for(string j : t){ vector<int> a; int count = 0; for(int i = 0; i < s.size(); s++){ if(s.at(i) != j) count++; if(s.at(i) == j){ a.push_back(cou...
a.cc: In function 'int main()': a.cc:9:18: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 9 | for(string j : t){ | ^ a.cc:12:35: error: no 'operator++(int)' declared for postfix '++' [-fpermissive] 12 | for(int i = 0;...
s116995537
p03687
Java
// serval // srrva // rrrv // rrr import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.next(); Map<Character, List<Integer>> map = new HashMap<>(); for (int i = 0; i < S.length(); i++) { char c = S.charAt(i); ...
Main.java:32: error: cannot find symbol diffMax = Math.max(diffMax, S.length()-list.get(list.length()-1)); ^ symbol: method length() location: variable list of type List<Integer> Note: Main.java uses unchecked or unsafe operations. Note: Recompile wi...
s519075378
p03687
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.next(); Map<Character, List<Integer>> map = new HasMap<>(); for (int i = 0; i < S.length(); i++) { char c = S.charAt(i); List<Integer> list = map.get(c); ...
Main.java:7: error: cannot find symbol Map<Character, List<Integer>> map = new HasMap<>(); ^ symbol: class HasMap location: class Main Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
s845730156
p03687
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.next(); Map<Character, List<Integer>> map = new HasMap<>(); for (int i = 0; S.length(); i++) { char c = S.charAt(i); List<Integer> list = map.get(c); i...
Main.java:7: error: cannot find symbol Map<Character, List<Integer>> map = new HasMap<>(); ^ symbol: class HasMap location: class Main Main.java:8: error: incompatible types: int cannot be converted to boolean for (int i = 0; S.length(); i++) { ...
s183874277
p03687
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.nextInt(); Map<Character, List<Integer>> map = new HasMap<>(); for (int i = 0; S.length(); i++) { char c = S.charAt(i); List<Integer> list = map.get(c); ...
Main.java:6: error: incompatible types: int cannot be converted to String String S = sc.nextInt(); ^ Main.java:7: error: cannot find symbol Map<Character, List<Integer>> map = new HasMap<>(); ^ symbol: class HasMap location: class Main M...
s932957795
p03687
C++
///supercalifragilisticexpialidocious. #include <cstdio> #include <cstring> #include <cmath> #include <cassert> #include <cstdlib> #include <cctype> #include <ctime> #include <iostream> #include <iomanip> #include <sstream> #include <numeric> #include <utility> #include <string> #include <algorithm> #include <vector> #...
a.cc:42:10: error: 'INT_MAX' was not declared in this scope 42 | int mn = INT_MAX , cnt; | ^~~~~~~ a.cc:23:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 22 | #include <complex> +++ |+#include <climits> 23 | using namespace std; a.c...
s549689651
p03687
C++
include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; int ans = s.size(); for (int i = 0; i < s.size(); i++) { char c = s[i]; int cnt=0,temp=0; for (int j = 0; j < s.size(); j++) { if (s[s.size() - j - 1] != c) { cnt++; } else { cnt=0; } temp = max(temp,...
a.cc:1:1: error: 'include' does not name a type 1 | include <bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:4:3: error: 'string' was not declared in this scope 4 | string s; | ^~~~~~ a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin >> s; | ^~~ a.cc:5:10:...
s881183994
p03687
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#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...
a.cc:13:9: warning: "fi" redefined 13 | #define fi first | ^~ a.cc:7:9: note: this is the location of the previous definition 7 | #define fi first#include<bits/stdc++.h> | ^~ a.cc:241:7: error: redefinition of 'template<class T> void cou(std::vector<std::vector<_Tp> >)' 241 | void ...
s819669014
p03687
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:197:41: error: expected ';' before '{' token 197 | if(a[0]==a[a.sz-1])a{ | ^ | ;
s005811679
p03687
C++
#include <iostream> #include <cstdio> #include <string> #include <algorithm> #include <cmath> #include <vector> #define rep(i, n) for(int i = 0; i < n; i++) using namespace std; typedef long long ll; int main() { vector<string> s(100); cin >> s; int ans = 1000; for(char c = 'a'; c <= 'z'; c++) { ...
a.cc: In function 'int main()': a.cc:13:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >') 13 | cin >> s; | ~~~ ^~ ~ | | | | | std::vector<std::__cxx11::basic_string<c...
s020773043
p03687
C++
#include <iostream> #include <cstdio> #include <string> #include <algorithm> #include <cmath> #include <vector> #define rep(i, n) for(int i = 0; i < n; i++) using namespace std; typedef long long ll; int main() { vector<string> s; cin >> s; int ans = 1000; for(char c = 'a'; c <= 'z'; c++) { ...
a.cc: In function 'int main()': a.cc:13:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >') 13 | cin >> s; | ~~~ ^~ ~ | | | | | std::vector<std::__cxx11::basic_string<c...
s289930736
p03687
C++
#include <iostream> #include <cstdio> #include <string> #include <algorithm> #include <cmath> #include <vector> #define rep(i, n) for(int i = 0; i < n; i++) using namespace std; typedef long long ll; int main() { vector<string> s(110); cin >> s; int ans = 1000; for(char c = 'a'; c <= 'z'; c++) { ...
a.cc: In function 'int main()': a.cc:13:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >') 13 | cin >> s; | ~~~ ^~ ~ | | | | | std::vector<std::__cxx11::basic_string<c...
s755351566
p03687
C++
#include <iostream> #include <cstdio> #include <string> #include <algorithm> #include <cmath> #include <vector> #define rep(i, n) for(int i = 0; i < n; i++) using namespace std; typedef long long ll; int main() { vector<string> s; cin >> s; int ans = 1000; for(char c = 'a'; c <= 'z'; c++) { ...
a.cc: In function 'int main()': a.cc:13:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >') 13 | cin >> s; | ~~~ ^~ ~ | | | | | std::vector<std::__cxx11::basic_string<c...
s789726717
p03687
C++
#include <iostream> #include <cstdio> #include <string> #include <algorithm> #include <cmath> #include <vector> #define rep(i, n) for(int i = 0; i < n; i++) using namespace std; typedef long long ll; int main() { vector<string> s; cin >> s; int ans = 1000; for(char c = 'a'; c <= 'z'; c++) { ...
a.cc: In function 'int main()': a.cc:13:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >') 13 | cin >> s; | ~~~ ^~ ~ | | | | | std::vector<std::__cxx11::basic_string<c...
s911327903
p03687
C++
#include <iostream> using namespace std; int main(){ string s;cin>>s; int ret = 1000; for(char i = 'a';'z' >= i; i++){ int mx=0; int nw = 0 for(int j = 0; s.size() > j; j++){ if(s[j]!=i){ nw++; }else{ mx = max(mx,nw); nw = 0; } } ret = min(ret,mx); ...
a.cc: In function 'int main()': a.cc:9:5: error: expected ',' or ';' before 'for' 9 | for(int j = 0; s.size() > j; j++){ | ^~~ a.cc:9:31: error: 'j' was not declared in this scope 9 | for(int j = 0; s.size() > j; j++){ | ^
s793198589
p03687
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main () { string s; cin >> s; int ans = INT_MAX; for (char c = 'a'; c <= 'z'; c++) { int cnt = 0; while (count(s.begin(), s.end(), c) != s.size()) { string ns = ""; rep...
a.cc: In function 'int main()': a.cc:15:30: error: 'i' was not declared in this scope 15 | else ns += s[i]; | ^
s125007585
p03687
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main () { string s; cin >> s; int ans = INT_MAX; for (char c = 'a'; c <= 'z'; c++) { int cnt = 0; while (count(s.begin(), s.end(), c) != s.size()) { string ns = ""; rep...
a.cc: In function 'int main()': a.cc:14:36: error: 'i' was not declared in this scope 14 | if (s[j] == c || s[i+1] == c) ns += c; | ^
s983575378
p03687
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s;cin>>s; int ans=1e9,tmp1=0,tmp0=0; for(int i=0;i<26;i++){ char c='a'+i; tmp1=0;tmp0=0; for(int j=0;j<s.size();j++){ if(s[j]!=c)tmp0++; else{ tmp1=max(tmp1,tmp0);tmp0=0; } } tmp1=max(tmp1,tmp0); } ans=min(ans,tmp1); } cout<<ans<<...
a.cc:20:9: error: 'cout' does not name a type 20 | cout<<ans<<endl; | ^~~~ a.cc:21:1: error: expected declaration before '}' token 21 | } | ^
s525044324
p03687
C++
#include<iostream> #include<cmath> #include<numeric> #include<string> #include<algorithm> #include<vector> #include<map> #define rep(i,n) for(int i=0;i<n;i++) #define rep1(i,n) for(int i=1;i<n;i++) #define int64 long long #define yokuwaruprime (10*10*10*10*10*10*10*10*10+7) using namespace std; int main(){ string s;...
a.cc: In function 'int main()': a.cc:29:22: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::push_back(int&)' 29 | v.push_back(i); | ~~~~~~~~~~~^~~ In file included from /usr/include/c++/14/vector:66, from a.cc:6: /usr/include/c++/14/...
s064513112
p03687
C++
#include <bits/stdc++.h> using namespace std; using int64 = long long; #define int int64 constexpr int INF = 1LL<<60; signed main() { string s; cin>>s; vector<int> cnt(26,0); REP(i,s.size()){ // 出現する文字数をカウント ++cnt[s[i]-'a']; } int ans = INF; for(int i=0;i<26;++i){ // 出現しなかった文字はスルー if(!cnt...
a.cc: In function 'int main()': a.cc:10:7: error: 'i' was not declared in this scope 10 | REP(i,s.size()){ | ^ a.cc:10:3: error: 'REP' was not declared in this scope 10 | REP(i,s.size()){ | ^~~
s396904324
p03687
C++
#include <bits/stdc++.h> using namespace std; using int64 = long long; #define int int64 signed main() { string s; cin>>s; vector<int> cnt(26,0); REP(i,s.size()){ // 出現する文字数をカウント ++cnt[s[i]-'a']; } int ans = INF; for(int i=0;i<26;++i){ // 出現しなかった文字はスルー if(!cnt[i]) continue; string cp...
a.cc: In function 'int main()': a.cc:9:7: error: 'i' was not declared in this scope 9 | REP(i,s.size()){ | ^ a.cc:9:3: error: 'REP' was not declared in this scope 9 | REP(i,s.size()){ | ^~~ a.cc:14:13: error: 'INF' was not declared in this scope 14 | int ans = INF; | ...
s072176603
p03687
C++
//In The Name of Beauty #include <bits/stdc++.h> using namespace std; typedef int ll; typedef vector<ll> vll; #define IB std::ios::sync_with_stdio(0); #define pb(x) push_back(x); #define mp(x,y) make_pair(x,y) #define pll pair<ll,ll> #define F first #define S second ll const MAXN = 1e5 + 8; ll const INF = 1e12 + 8; ll...
a.cc:13:22: warning: overflow in conversion from 'double' to 'll' {aka 'int'} changes value from '1.000000000008e+12' to '2147483647' [-Woverflow] 13 | ll const INF = 1e12 + 8; | ~~~~~^~~ a.cc: In function 'int main()': a.cc:34:19: error: no matching function for call to 'max(ll&, std::__cxx11...
s403160569
p03687
C++
//In The Name of Beauty #include <bits/stdc++.h> using namespace std; typedef int ll; typedef vector<ll> vll; #define IB std::ios::sync_with_stdio(0); #define pb(x) push_back(x); #define mp(x,y) make_pair(x,y) #define pll pair<ll,ll> #define F first #define S second ll const MAXN = 1e5 + 8; ll const INF = 1e12 + 8; ll...
a.cc:13:22: warning: overflow in conversion from 'double' to 'll' {aka 'int'} changes value from '1.000000000008e+12' to '2147483647' [-Woverflow] 13 | ll const INF = 1e12 + 8; | ~~~~~^~~ a.cc: In function 'int main()': a.cc:34:19: error: no matching function for call to 'max(ll&, std::__cxx11...
s933187238
p03687
C++
//In The Name of Beauty #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vll; #define IB std::ios::sync_with_stdio(0); #define pb(x) push_back(x); #define mp(x,y) make_pair(x,y) #define pll pair<ll,ll> #define F first #define S second ll const MAXN = 1e5 + 8; ll const INF = 1e12 +...
a.cc: In function 'int main()': a.cc:34:19: error: no matching function for call to 'max(ll&, long long unsigned int)' 34 | temp = max(temp,s.size() - last[i] - 1); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/inclu...
s282779518
p03687
C++
#include <bits/stdc++.h> #define int long long //#define double long double #define endre getchar();getchar();return 0 #define moder (int)(1e9+7) #define inf (int)(3e18+7) #define rep(i,n) for(int i=0;i<n;i++) #define REP(i,n) for(int i=1;i<n;i++) #define P pair<int,int> #define all(v) v.begin(),v.end() #define prique(...
a.cc: In function 'int main()': a.cc:52:27: error: no matching function for call to 'max(long long int&, long long unsigned int)' 52 | b[i] = max(b[i], s.size() - a[i]); | ~~~^~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s393434415
p03687
C++
ソースコード Copy Copy #include<bits/stdc++.h> #define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i) #define all(x) (x).begin(),(x).end() typedef long long ll; using namespace std; #define sz(x) ((int)(x).size()) #define ZERO(a) memset(a,0,sizeof(a)) #include<bits/stdc++.h> #define rep(i,n) for(int i=0, i##_len=(n); i...
a.cc:1:1: error: '\U000030bd\U000030fc\U000030b9\U000030b3\U000030fc\U000030c9' does not name a type 1 | ソースコード | ^~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bi...
s812576139
p03687
C++
#include<bits/stdc++.h> #define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i) #define all(x) (x).begin(),(x).end() typedef long long ll; using namespace std; #define sz(x) ((int)(x).size()) #define ZERO(a) memset(a,0,sizeof(a)) #include<bits/stdc++.h> #define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i) #def...
a.cc:50:26: error: extended character   is not valid in an identifier 50 | if (str[i] == *key || str[i+1] == *key){ | ^ a.cc: In function 'int main()': a.cc:32:57: error: 'S' was not declared in this scope 32 | for(ll i = 0; i < s.length(); ++i) chars.insert(S[i]);...
s503264562
p03687
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int c=0; while(true){ map<char,int> m; bool f=true; for(int i=0;i<s.size();i++){ m[s[i]]++; if(i>0){ if(s[i]!=s[i-1]) f=false; } } if(f){ cout<<c; return 0; } string t(s.s...
a.cc:20:25: error: empty character constant 20 | string t(s.size()-1,''); | ^~
s616349171
p03687
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int c=0; while(true){ map<char,int> m; bool f=true; for(int i=0;i<s.size();i++){ m[s[i]]++; if(i>0){ if(s[i]!=s[i-1]) f=false; } } if(f){ cout<<c; return 0; } string t(s.s...
a.cc: In function 'int main()': a.cc:20:24: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(std::__cxx11::basic_string<char>::size_type)' 20 | string t(s.size()-1); | ^ In file included from /usr/include/c++/14/string:54, from ...
s262855878
p03687
C++
using System; using System.Linq;//リストの使用 using System.Collections.Generic; using System.Text;//テキストの高速出力に必要 class Program { static void Main() { string s = Console.ReadLine(); string alphabets = "abcdefghijklmnopqrstuvwxyz";//26文字 int n = s.Length; long answer = 1000; long answerMemo = 0; long ans...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Linq;//リストの使用 | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.Collecti...
s047849951
p03687
C++
#include <bits/stdc++.h> using namespace std; #define uint unsigned int #define llong long long int #define ullong unsigned long long int #define rep(i, n) for (int i = 0; i < n; ++i) const static long long int MOD = 1000000000 + 7; const static int dy[] = {0, 1, 0, -1}; const static int dx[] = {1, 0, -1, 0}; int main...
a.cc: In function 'int main(int, char**)': a.cc:20:38: error: 's' was not declared in this scope 20 | for (int j = 0 ; j < s.size() ; ++j){ | ^ a.cc:26:37: error: 's' was not declared in this scope 26 | cnt = max(cnt ,(int)s.size() - pre);...
s942913050
p03687
C++
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <iomanip> #include <queue> #include <unordered_map> #include <unordered_set> #include <map> #include <set> using namespace std; #define INF (1ll<<60) long long M = 1000000007; int main(int argc, char const *argv[...
a.cc:36:2: error: stray '#' in program 36 | }#include <cmath> | ^ a.cc:36:3: error: 'include' does not name a type 36 | }#include <cmath> | ^~~~~~~ a.cc:52:11: error: redefinition of 'long long int M' 52 | long long M = 1000000007; | ^ a.cc:17:11: note: 'long long int M' previous...
s053593316
p03687
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int cnt=0,c=0,mi=10000; for(int i=0;i<s.size();i++){ for(int j=0;j<s.size();j++){ if(s[i]==s[j]){ c=max(c,cnt); cnt=0; }else{ cnt++; } } c=max(mc,cnt); cnt=0; mi=min(mc,mi); ...
a.cc: In function 'int main()': a.cc:16:11: error: 'mc' was not declared in this scope; did you mean 'mi'? 16 | c=max(mc,cnt); | ^~ | mi
s223533536
p03687
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int cnt=0,c=0,mi=10000; for(int i=0;i<s.size();i++){ for(int j=0;j<s.size();j++){ if(s[i]==s[j]){ mc=max(c,cnt); cnt=0; }else{ cnt++; } } c=max(mc,cnt); cnt=0; mi=min(mc,mi); ...
a.cc: In function 'int main()': a.cc:10:9: error: 'mc' was not declared in this scope; did you mean 'mi'? 10 | mc=max(c,cnt); | ^~ | mi a.cc:16:11: error: 'mc' was not declared in this scope; did you mean 'mi'? 16 | c=max(mc,cnt); | ^~ | mi
s950789852
p03687
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int cnt=0,c=0,mi=10000; for(int i=0;i<s.size();i++){ for(int j=0;j<s.size();j++){ if(s[i]==s[j]){ mc=max(c,cnt); cnt=0; }else{ cnt++; } } mc=max(mc,cnt); cnt=0; mi=min(mc,mi);...
a.cc: In function 'int main()': a.cc:10:9: error: 'mc' was not declared in this scope; did you mean 'mi'? 10 | mc=max(c,cnt); | ^~ | mi a.cc:16:5: error: 'mc' was not declared in this scope; did you mean 'mi'? 16 | mc=max(mc,cnt); | ^~ | mi
s890188368
p03687
C++
/* ---------- STL Libraries ---------- */ // IO library #include <cstdio> #include <fstream> #include <iomanip> #include <ios> #include <iostream> // algorithm library #include <algorithm> #include <cmath> #include <numeric> #include <random> // container library #include <array> #include <bitset> #include <deque> #...
a.cc: In function 'int main()': a.cc:146:28: error: 'i' was not declared in this scope 146 | char c = A[i]; | ^
s906332216
p03687
C++
/* ---------- STL Libraries ---------- */ // IO library #include <cstdio> #include <fstream> #include <iomanip> #include <ios> #include <iostream> // algorithm library #include <algorithm> #include <cmath> #include <numeric> #include <random> // container library #include <array> #include <bitset> #include <deque> #...
a.cc: In function 'int main()': a.cc:146:28: error: 'i' was not declared in this scope 146 | char c = A[i]; | ^ a.cc:160:32: error: 'N' was not declared in this scope 160 | REP(i, N - 1) st.insert(B[i]); | ...
s514660907
p03687
C++
/* ---------- STL Libraries ---------- */ // IO library #include <cstdio> #include <fstream> #include <iomanip> #include <ios> #include <iostream> // algorithm library #include <algorithm> #include <cmath> #include <numeric> #include <random> // container library #include <array> #include <bitset> #include <deque> #...
a.cc: In function 'int main()': a.cc:141:31: error: 'a' was not declared in this scope 141 | char alphabet[26] = { a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z, }; | ^ a.cc:141:33: error: 'b' was not declared in this scope 141 | char alphabet[26] = { a,b,c,...
s004232386
p03687
C++
123
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 123 | ^~~
s836991146
p03687
C++
fsdfsd
a.cc:1:1: error: 'fsdfsd' does not name a type 1 | fsdfsd | ^~~~~~
s754203239
p03687
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main() { string s; cin >> s; int ans = 110; for (char a = 'a'; a <= 'z'; a++) { string t = s, now = ""; for (int i = 0; i < s.size(); i++) { bool flag = true; for (int j = 0; j < t.size() - 1; j++) { if (t[j] != a && t[j...
a.cc: In function 'int main()': a.cc:27:37: error: 'endla' was not declared in this scope 27 | if (ans == 0)cout << ans << endla; | ^~~~~
s655491215
p03687
Java
import java.lang.reflect.Array; import java.math.BigInteger; import java.text.DecimalFormat; import java.util.*; import java.io.*; public class Noureldin { public static void main(String[] args) throws Exception { IO io; try{ io = new IO("in.in",null); } catch (IOExce...
Main.java:9: error: class Noureldin is public, should be declared in a file named Noureldin.java public class Noureldin { ^ 1 error
s696202114
p03687
C++
#include <bits/stdc++.h> #define INT INT_MAX #define LONG LLONG_MAX #define f(i,n) for(int i=0;i<(n);i++) #define P pair<int,int> typedef long long ll; using namespace std; ll GCD(ll a, ll b) { if (b == 0)return a; return GCD(b, a%b); } ll LCM(ll a, ll b) { return a / GCD(a, b)*b; } ll mypow(ll a, ll b, ll c) { ...
a.cc: In function 'int main()': a.cc:40:23: error: 'a' was not declared in this scope 40 | int b[a+1],d=0,e=0; | ^ a.cc:43:33: error: 'b' was not declared in this scope 43 | b[d]=i; | ^ a.cc:47:17: er...
s519886670
p03687
C++
#include <bits/stdc++.h> using namespace std; int main() { long n,c=1,r=0; cin>>n; vector<long>v(n); for(int i=0;i<n;i++)cin>>v.at(i); sort(v.begin(),v.end()); for(int i=0;i<n-1;i++){ if(v.at(i)!=v.at(i+1)){ c++; r=(i+1); } } if(n>=3){ if(c==1){ if(v.at(0)==(n-1)||v.at(0)<=n/2){ cout<<"Yes...
a.cc:39:25: error: extended character   is not valid in an identifier 39 |        | ^ a.cc:39:25: error: extended character   is not valid in an identifier a.cc:39:25: error: extended character   is not valid in an identifier a.cc:39:25: error: extended character...
s579582560
p03687
Java
****
Main.java:1: error: class, interface, enum, or record expected **** ^ 1 error
s081116486
p03687
C++
#include <bits/stdc++.h> #define int long long #define REP(i,n) for(int i=0;i<n;i++) #define FOR(i,m,n) for(int i=m;i<n;i++) #define FORR(i,m,n) for(int i=m;i>=n;i--) #define pb(x) push_back(x) #define SORT(x) sort((x).begin(),(x).end()) #define INF 999999999999 using namespace std; int32_t main(){ string s...
a.cc: In function 'int32_t main()': a.cc:36:10: error: 'v' was not declared in this scope 36 | SORT(v); | ^ a.cc:9:23: note: in definition of macro 'SORT' 9 | #define SORT(x) sort((x).begin(),(x).end()) | ^
s448647918
p03687
C++
def solve( s , c ): cnt = int(0) while 1 : if len(s) == 0 : return cnt f = True for i in range(len(s)): if s[i] != c: f = False break if f : return cnt s2 = "" for i in range(len(s)-...
a.cc:1:1: error: 'def' does not name a type 1 | def solve( s , c ): | ^~~ a.cc:33:1: error: 's' does not name a type 33 | s = input() | ^
s324064129
p03687
C++
#include <bits/stdc++.h> using namespace std; string s; int solve(vector<int> x){ int ret = 0; if (x.empty()) ret = s.size(); else{ for(int i=0;i+1<x.size();i++){ ret = max(ret, x[i+1] - x[i] - 1); } ret = max(ret, x[0]); ret = max(ret, s.size() - x[x.size()-1] - 1); } return ret; } ...
a.cc: In function 'int solve(std::vector<int>)': a.cc:14:14: error: no matching function for call to 'max(int&, std::__cxx11::basic_string<char>::size_type)' 14 | ret = max(ret, s.size() - x[x.size()-1] - 1); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algor...
s261052797
p03687
C++
#include <iostream> #include <sstream> #include <string> #include <algorithm> using namespace std; int sub(const string& s, char c) { stringstream ss(c + s + c); int mx = 0; string buf; while(getline(ss, buf, c)) { mx = max(mx, buf.size()); } return mx; } int main() { string s; cin >> s; int...
a.cc: In function 'int sub(const std::string&, char)': a.cc:12:13: error: no matching function for call to 'max(int&, std::__cxx11::basic_string<char>::size_type)' 12 | mx = max(mx, buf.size()); | ~~~^~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/i...
s306134347
p03687
C++
#include "bits/stdc++.h" #include <windows.h> using namespace std; int main(){ string z; cin>>z; int ans=1e9+7; for(int i=0;i<26;i++){ int exflag=1; for(int j=0;j<z.size();j++)if(z[j]!=char('a'+i))exflag=0; if(exflag==1)ans=0;; string s=z; int ssi=s.size(); int flag=1; while(1){ string ns(ssi...
a.cc:2:10: fatal error: windows.h: No such file or directory 2 | #include <windows.h> | ^~~~~~~~~~~ compilation terminated.
s717247440
p03687
C++
from collections import Counter s = input() count = Counter(s).most_common() ans = 100 for c,n in count: ss = s cnt = 0 while any(ssi != ss[0] for ssi in ss): ss_new = "" for i in range(len(ss)-1): if ss[i] != c and ss[i+1] == c: ss_new += c else: ...
a.cc:1:1: error: 'from' does not name a type 1 | from collections import Counter | ^~~~
s962737942
p03687
Java
import java.util.Scanner; public class A { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); int mi = 200; for (char i = 'a'; i <= 'z'; i++) { int m = 0; String[] ws = s.split("" + i); for (String w : ws) { m = Math.max(m, w....
Main.java:3: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s928951661
p03687
C
include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <string.h> char s[100]; char orgS[100]; int shim(char x){ int ans = 101; int L = strlen(s); int check; for (int i=0;i<100;i++){ check = 0; for (int j=0;j<L-1;j++){ if (s[j+1] == x)s[j] = s[j+1]; if (s[j+1] !=...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^ In file included from main.c:2: /usr/include/stdlib.h:98:8: error: unknown type name 'size_t' 98 | extern size_t __ctype_get_mb_cur_max (void) __THROW __wur; | ^~~~~~ /usr/inc...
s021664925
p03687
C++
w#include <bits/stdc++.h> using namespace std; string s; int MIN = 1000; int main() { cin >> s; for(int i = 0; i < 26; i++) { string aa = s; string tmp(aa.size(),'a'+i); int ans = 0; while(true) { if(tmp == aa) break; for(int j = 0; j < aa.size(); j++) { if(aa[j+1] == 'a'+i) aa[j] = ...
a.cc:1:2: error: stray '#' in program 1 | w#include <bits/stdc++.h> | ^ a.cc:1:1: error: 'w' does not name a type 1 | w#include <bits/stdc++.h> | ^ a.cc:4:1: error: 'string' does not name a type 4 | string s; | ^~~~~~ a.cc: In function 'int main()': a.cc:7:3: error: 'cin' was not declared...
s076579351
p03687
C++
#include <bits/stdc++.h> char str[110]; char tr[110]; int L; int ans = 1000; int main () { gets (str); L = int (strlen (str)); for (char c = 'a'; c <= 'z'; ++c) { for (int i = 0; i < L; ++i) tr[i] = str[i]; for (int i = 0; i < L; ++i) { for (int j = 0; j < L - i; ++j) if (c != tr[j]) goto con; if ...
a.cc: In function 'int main()': a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 9 | gets (str); | ^~~~ | getw
s700224620
p03687
C++
#include <iostream> using namespace std; int calc_max_part(const string& s, char target) { int maxl = 0; for (size_t pos = 0, nextpos;; pos = nextpos + 1) { nextpos = s.find(target, pos); int l; if (nextpos == string::npos) { l = s.size() - pos; } else { l = nextpos - pos; } if ...
a.cc: In function 'int main(int, char**)': a.cc:30:14: error: 'INT_MAX' was not declared in this scope 30 | int minl = INT_MAX; | ^~~~~~~ a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #include <iostream> +++ |+#inclu...
s070684198
p03687
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main (){ string in; cin >> in; int ans = in.size(); for(char c = 'a';c <= 'z';c++){ string temp = in; if(temp.find(c) != string::npos){ int prev = -1; int dist = 0; f...
a.cc: In function 'int main()': a.cc:22:23: error: no matching function for call to 'max(int&, std::__cxx11::basic_string<char>::size_type)' 22 | dist = max(dist,temp.size()-prev+1); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, ...
s650228940
p03687
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.
s221030995
p03687
C++
#include <cstdio> #include <algorithm> #include <cstring> using namespace std; char sir[110]; int main() { //freopen("file.in","r",stdin); //freopen("file.out","w",stdout); gets(sir+1); int l=strlen(sir+1),sol=1e9; for(char i='a';i<='z';i++) { sir[l+1]=i; int c=0,r=0; ...
a.cc: In function 'int main()': a.cc:13:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 13 | gets(sir+1); | ^~~~ | getw
s298044396
p03687
C++
#include<bits/stdc++.h> using namespace std; const long long INF = 1e7+1; const long long MOD = 1000000007; const long double PI = 3.1415926; #define FOR(i,r,n) for(ll i = (ll)(r); i < (ll)(n); i++) #define RFOR(i,r,n) for(ll i=(ll)(n-1);i>=r;i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define ALL(x)...
a.cc: In function 'int main()': a.cc:44:26: error: no matching function for call to 'max(ll&, long long unsigned int)' 44 | sum = max(sum, (s.size() - 1 - v[v.size() - 1])); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60...
s164766401
p03687
C++
#include"vector" #include"cmath" #include"iostream" #include"list" #include"stack" #include "queue" #include"set" #include "unordered_set" #include "map" #include"unordered_map" #include"algorithm" #include "cstring" #include"string" using namespace std; #define all(v) v.begin(),v.end() #define forn(n) for(auto i=n;i<n...
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s991282733
p03687
C++
#include <iostream> #include <string> #include <limits> int main() { int min = INT_MAX, nrMax = INT_MAX; std::string str; std::getline(std::cin, str); for (int i = 0; i < 26; ++i) { int nr = 0; bool flag = false, flag2 = true; for (int j = 0; j < str.length(); ++j) if (str[j] != 'a' + i) flag =...
a.cc: In function 'int main()': a.cc:8:19: error: 'INT_MAX' was not declared in this scope 8 | int min = INT_MAX, nrMax = INT_MAX; | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include <limits> ...
s769550353
p03687
C++
#include <iostream> #include <string> #include <limits> #include <conio.h> int main() { int min = INT_MAX, nrMax = INT_MAX; std::string str; std::getline(std::cin, str); for (int i = 0; i < 26; ++i) { int nr = 0; bool flag = false, flag2 = true; for (int j = 0; j < str.length(); ++j) if (str[j] != '...
a.cc:4:10: fatal error: conio.h: No such file or directory 4 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s153859580
p03687
C++
#include<cstdio> #include<cstring> #include<vector> #include<algorithm> using namespace std; int main(void) { vector<char> s(100+2); while(scanf("%100[a-z]\n", &s[0])==1) { int l=strlen(&s[0]); vector<char> t(l+1), t_(l+1); int c, ans; ans=l; for(int i=0;i<l;i++) { if(s[i]!=s[0]) break; } if...
a.cc: In function 'int main()': a.cc:25:20: error: 'i' was not declared in this scope 25 | if(i==l) ans=0; | ^
s107086634
p03687
C++
#include<iostream> #include<cstdio> #include<cmath> #include<cstring> #include<algorithm> using namespace std; char s[150]; int qm[150],maxn=0,m[150],numm=0; int ans[150],anss=999999; bool eend=1,end=1; int work(int i) { for(int j=1;j<=strlen(s+1);j++) if(s[j]!=s[j+1]) eend=0; if(eend==1) { ans[i]=0; retu...
a.cc: In function 'int work(int)': a.cc:30:33: error: reference to 'end' is ambiguous 30 | end=0; | ^~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from ...
s316515852
p03687
C++
#include<bits/stdc++.h> using namespace std; const long long INF = 1e7+1; const long long MOD = 1000000007; const long double PI = 3.1415926; #define FOR(i,r,n) for(ll i = (ll)(r); i < (ll)(n); i++) #define RFOR(i,r,n) for(ll i=(ll)(n-1);i>=r;i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define ALL(x)...
a.cc: In function 'int main()': a.cc:73:26: error: no matching function for call to 'max(ll&, long long unsigned int)' 73 | sum = max(sum, s.size() - q[cnt - 1]); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, fro...
s181190069
p03687
C++
#include<iostream> using namespace std; #include<map> #include<vector> int main(){ string s; cin>>s; int b; int c; int m=0; int ans=101; for(int i=-0;i<s.size();i++){ mp[s[i]]++; } int bb=0; for(auto &el:mp){ if(bb<el.second){ bb=el.second; } } if(bb<2){ cout<<bb<<endl; return 0; } ...
a.cc: In function 'int main()': a.cc:17:17: error: 'mp' was not declared in this scope; did you mean 'm'? 17 | mp[s[i]]++; | ^~ | m a.cc:21:22: error: 'mp' was not declared in this scope; did you mean 'm'? 21 | for(auto &el:mp){ | ...
s483375779
p03687
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define PB push_back #define MP make_pair #define FI first #define SE second static const int INF = 1ll<<60; typedef pair<int,int> P1; typedef pair<int,pair<int,int> > P2; string s; int ans = INF; vector<int> v[26]; signed main(){ cin>>s; for(...
a.cc: In function 'int main()': a.cc:28:22: error: no matching function for call to 'max(long long int&, long long unsigned int)' 28 | res = max(res,s.size()-v[i][v[i].size() -1]); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s603130739
p03687
C++
#include<bits/stdc++.h> using namespace std; #define int long long #define PB push_back #define MP make_pair #define FI first #define SE second static const int INF = 1ll<<60; typedef pair<int,int> P1; typedef pair<int,pair<int,int> > P2; string s; int ans = INF; vector<int> v[26]; signed main(){ cin>>s; for(...
a.cc: In function 'int main()': a.cc:28:22: error: no matching function for call to 'max(long long int&, long long unsigned int)' 28 | res = max(res,s.size()-v[i][v[i].size() -1]); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s240268236
p03687
C++
#include <bits\stdc++.h> using namespace std; #define long long ll; bool checkStr(const string &str, const char c) { for (int i=0; i<(int)str.length(); i++) { if (c != str[i]) return false; } return true; } void replaceChar(string &str, const char c) { string t=""; for (int i=0; i<(int)str.length()-1; ...
a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory 1 | #include <bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s733906503
p03687
C++
#include<stdio.h> #include<string.h> struct{ char c; int time[100],max,k; }temp[30]; int main () { int i; char s[105]; while(gets(s)){for(i=0;i<26;i++){ temp[i].c='a'+i; temp[i].time[0]=0; temp[i].max=0; temp[i].k=1; } int len=0,j; len=strlen(s); for(i=0;i<len;i++) for(j=0;j<26;j++){ if(s[i...
a.cc: In function 'int main()': a.cc:12:15: error: 'gets' was not declared in this scope; did you mean 'getw'? 12 | while(gets(s)){for(i=0;i<26;i++){ | ^~~~ | getw
s723031677
p03687
C++
#include<cstdio> #include<iostream> #include<cstring> #include<cmath> #include<queue> #include<vector> #include<cstdlib>5 #include<string> #include<algorithm> #define LL long long #define INF 1000000009 using namespace std; int main() { char s[1000]; int vis[30]; for(int i=0;i<29;i++) vis[i]=INF; gets(s); ...
a.cc:7:18: warning: extra tokens at end of #include directive 7 | #include<cstdlib>5 | ^ a.cc: In function 'int main()': a.cc:19:4: error: 'gets' was not declared in this scope; did you mean 'getw'? 19 | gets(s); | ^~~~ | getw
s978429360
p03687
C++
#include <iostream> #include <fstream> #include <cstdio> #include <cassert> #include <complex> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <cstdlib> #include <cstring> #include <iomanip> #include <numeric> #include <sstream> #include <ctime> #include <cctype> #include <set> #inclu...
a.cc:24:10: fatal error: _mingw.h: No such file or directory 24 | #include <_mingw.h> | ^~~~~~~~~~ compilation terminated.
s886907468
p03687
Java
/** * Created by yoshiwaratomohiro on 2017/06/18. */ import java.util.Scanner; public class Agc16A { public static void main(String[] args){ Scanner scan = new Scanner(System.in); String s = scan.next(); int[] snum = new int[s.length()]; for(int i=0;i<s.length();i++){ s...
Main.java:5: error: class Agc16A is public, should be declared in a file named Agc16A.java public class Agc16A { ^ 1 error
s795808975
p03687
C++
/** * Created by yoshiwaratomohiro on 2017/06/18. */ import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); String s = scan.next(); int[] snum = new int[s.length()]; for(int i=0;i<s.length();i++){ snu...
a.cc:4:1: error: 'import' does not name a type 4 | import java.util.Scanner; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1: error: expected unqualified-id before 'public' 5 | public class Main { | ^~~~~~
s602100256
p03687
C++
#define _USE_MATH_DEFINES #include<iostream> #include <math.h> #include <algorithm> #include <vector> #include <queue> #include <string> using namespace std; /* sample input */ int n; string str; int main() { cin >> str; int len = str.length(); int count = 0; int answer = INT_MAX; for (int i = 0; i < 26; i++){...
a.cc: In function 'int main()': a.cc:22:22: error: 'INT_MAX' was not declared in this scope 22 | int answer = INT_MAX; | ^~~~~~~ a.cc:7:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 6 | #include <queue> +++ |+#inc...
s237004010
p03687
C++
A = input() B = [] for i in range(len(A)): B.append( max([len(x) for x in A.split(A[i])])) print(min(B))
a.cc:1:1: error: 'A' does not name a type 1 | A = input() | ^
s479370811
p03687
C++
import org.omg.CORBA.MARSHAL; import java.util.*; public class Main { //-------------------------------------------------------------// public static final void main(String[] args) { new Main().solve(); } //-------------------------------------------------------------// private final Scann...
a.cc:1:1: error: 'import' does not name a type 1 | import org.omg.CORBA.MARSHAL; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.util.*; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts...
s547878294
p03687
C++
#include<bist/stdc++.h> using namespace std; int a[29]; int main() { int c=0,i; string s; cin>>s; for(i=0;i<s.length();i++) { if(a[s[i]-'a']!=1) { a[s[i]-'a']==1; c++; } } cout<<c/2<<endl;
a.cc:1:9: fatal error: bist/stdc++.h: No such file or directory 1 | #include<bist/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s761508892
p03687
Java
import org.omg.PortableServer.POA; import java.io.*; import java.lang.reflect.Array; import java.math.BigInteger; import java.util.*; public class Stress { BufferedReader br; StringTokenizer sc; PrintWriter out; public static void main(String[] args) throws IOException { Locale.setDefault(L...
Main.java:8: error: class Stress is public, should be declared in a file named Stress.java public class Stress { ^ Main.java:1: error: package org.omg.PortableServer does not exist import org.omg.PortableServer.POA; ^ 2 errors
s283346096
p03687
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; import java.util.StringTokenizer; public class Solution { public static void main(String[] args) throws Exception { InputStream...
Main.java:10: error: class Solution is public, should be declared in a file named Solution.java public class Solution { ^ 1 error
s754633321
p03687
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for(ll i=a;i<b;i++) #define re(i,b) for(ll i=0;i<b;i++) #define repr(i,n) for(ll i=n-1;i>=0;i--) #define ll long long #define ld long double #define llu long long unsigned #define vll std::vector<ll> #define m...
a.cc: In function 'int main()': a.cc:76:33: error: no matching function for call to 'max(long long int&, long long unsigned int)' 76 | ma[s[i]-'a']=max(ma[s[i]-'a'],s.length()-prev[s[i]-'a']-1); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /...
s643312511
p03687
Java
import java.io.*; import java.util.*; import java.text.*; import java.math.*; public class main { public static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); public static PrintWriter pw = new PrintWriter(System.out); public static String line; public static StringTokenizer ...
Main.java:6: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s972050898
p03687
C++
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <queue> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
a.cc: In function 'int main()': a.cc:59:24: error: no match for 'operator!=' (operand types are 'char' and 'std::pair<const char, int>') 59 | if(pre != a) d++; | ~~~ ^~ ~ | | | | char std::pair<const char, int> In file ...
s082219353
p03687
C++
#include <algorithm> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <limits> #include <map> #include <memory> #include <queue> #include <set> #include <sstream> #include <stack> #include ...
a.cc:73:2: error: stray '#' in program 73 | }#include <algorithm> | ^ a.cc:73:3: error: 'include' does not name a type 73 | }#include <algorithm> | ^~~~~~~ a.cc:112:5: error: redefinition of 'int main()' 112 | int main() { | ^~~~ a.cc:40:5: note: 'int main()' previously defined here ...
s569605911
p03687
C++
using namespace std; #define fo(i,a,b) for(int i=(a);i<(b);i++) #define MP make_pair #define PB push_back #define SZ(a) ((int)a.size()) typedef long long ll; int mn = 110; string s; int main () { cin >> s; for (char i = 'a'; i <= 'z'; i++) { int mx = 0, l = 0; for (int j = 0; j < SZ(s); j++) { if (s[j] == i)...
a.cc:9:1: error: 'string' does not name a type 9 | string s; | ^~~~~~ a.cc: In function 'int main()': a.cc:12:9: error: 'cin' was not declared in this scope 12 | cin >> s; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include ...
s090159187
p03687
Java
import java.awt.*; import java.io.*; import java.math.BigDecimal; import java.math.BigInteger; import java.util.*; import java.util.List; import static java.lang.Math.max; import static java.lang.Math.min; public class A implements Runnable{ // SOLUTION!!! // HACK ME PLEASE IF YOU CAN!!! // PLEASE!!! ...
Main.java:12: error: class A is public, should be declared in a file named A.java public class A implements Runnable{ ^ Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
s733744129
p03688
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (int)(n); i++) #define REP(i,n) for (int i = 1; i < (int)(n); i++) #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() #define debug(var) do{cout << #var << " : "; view(var);}while(0) template<class T> bool chmin(T &a, T b) {if(a>b) {a=b;ret...
a.cc: In function 'int main()': a.cc:36:22: error: 'k' was not declared in this scope 36 | if (ct_mn <= k && n + ct_mn >= 2 * mx) ans = true; | ^
s623471276
p03688
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N; cin >> N; vector<int> a(N); for (int i = 0; i < N; i++){ cin >> a[i]; } sort(a.begin(), a.end()); if (a[N - 1] - a[0] > 1){ cout << "No" << endl; } else if (a[0] == a[N - 1]){ if (a[0] * 2 <= N || a[0] == N - 1){ cout << ...
a.cc: In function 'int main()': a.cc:22:36: error: expected ')' before '{' token 22 | } else if (a[N - 2] != a[N - 1]{ | ~ ^ | ) a.cc:27:3: error: expected primary-expression before '}' token 27 | } | ^
s349307785
p03688
C++
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #includ...
a.cc: In function 'int main()': a.cc:72:3: error: 'vectro' was not declared in this scope 72 | vectro<int> L; | ^~~~~~ a.cc:72:10: error: expected primary-expression before 'int' 72 | vectro<int> L; | ^~~ a.cc:76:5: error: 'L' was not declared in this scope 76 | L.PB(a); | ...
s150441314
p03688
C++
#include <bits/stdc++.h> #define int long long #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; constexpr int MOD = 1000000007; constexpr int INF = numeric_limits<int>::max() / 2; typedef pair<int,int> P; using Graph = vector<vector<int>>; signed main(){ cin.tie(nullptr); ios::sync_with_std...
a.cc: In function 'int main()': a.cc:55:33: error: 'reutrn' was not declared in this scope 55 | reutrn 0; | ^~~~~~
s371311077
p03688
C++
#include<bits/stdc++.h> #include<unordered_set> #include<unordered_map> #include <algorithm> #include <iostream> #include <string> #include <cmath> 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);...
a.cc: In function 'int main()': a.cc:75:16: error: no matching function for call to 'begin()' 75 | ll j=*begin(); | ~~~~~^~ In file included from /usr/include/c++/14/bits/algorithmfwd.h:39, from /usr/include/c++/14/bits/stl_algo.h:59, from /usr/include/c++/14/alg...
s786885504
p03688
C++
#include <bits/stdc++.h> #include <cstdlib> #include <cmath> #define rep(i,n) for (long long i=0; i < (n); ++i) #define rep2(i,n,m) for(long long i=n;i<=m;i++) #define rep3(i,n,m) for(long long i=n;i>=m;i--) using namespace std; using ll = long long; using P = pair<int,int>; using graph= vector<vector<int>>; const ll ...
a.cc: In function 'int main()': a.cc:19:9: error: 'class std::vector<long long int>' has no member named 'begimn'; did you mean 'begin'? 19 | sort(A.begimn(),A.end()) ; | ^~~~~~ | begin
s945252193
p03688
C++
#include <iostream> using namespace std; int main() { cout<<"Hello World"; cin >> n; int Arr[2][n], Sum = 0, flag = 0, temp = 0; for(int i = 0; i < n; i++){ cin >> A[0][i]; Sum += A[0][i]; } for(int i = 0; i < n; i++){ if(!flag){ if(int((Sum - A[0...
a.cc: In function 'int main()': a.cc:9:12: error: 'n' was not declared in this scope 9 | cin >> n; | ^ a.cc:12:16: error: 'A' was not declared in this scope 12 | cin >> A[0][i]; | ^ a.cc:19:27: error: 'A' was not declared in this scope 19 | if(int(...
s988345853
p03688
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N; cin>>N; vector<int>a(N); for(int i=0;i<N;i++) cin>>a.at(i); sort(a.begin(),a.end()); if(a.at(0)==a.at(N-1)){ if(a.at(0)==N-1 || 2*a.at(0)<=N) cout<<"Yes"<<endl; else cout<<"No"<<endl; }else if(a.at(N-1)-a.at(0)==1){ int...
a.cc: In function 'int main()': a.cc:24:10: error: 'K' was not declared in this scope 24 | if(B-K<=0) | ^