QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#726783 | #8937. Stage: Agausscrab | treeiii | Compile Error | / | / | C++14 | 1.5kb | 2024-11-09 08:32:08 | 2024-11-09 08:32:08 |
Judging History
This is the latest submission verdict.
- [2024-11-09 08:32:08]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-11-09 08:32:08]
- Submitted
answer
//妈的天天挂分,傻逼吧
//如此状态,如何noip?
#include<bits/stdc++.h>
#define int long long
#define _int __int128
#define y1 _
using namespace std;
static char buf[1000000],*p1=buf,*p2=buf;
inline int read(){
char c=getchar();
int res=0,f=1;
while(c<'0'||c>'9'){
if(c=='-')f=-1;
c=getchar();
}
while(c>='0'&&c<='9'){
res=res*10+c-'0';
c=getchar();
}
return res*f;
}
inline void write(int x){
static char buf[20];
static int len=-1;
if(x<0){
putchar('-');
x=-x;
}
do{
buf[++len]=x%10;
x/=10;
}
while(x);
while(len>=0){
putchar(buf[len--]+48);
}
}
const int maxn=300005;
const int maxm=510;
const int inf=1e18;
const int bas=100;
const int mod=1e9+7;
const double eps=1e-4;
int n;
struct node{
string s;
int w;
}a[maxn];
int b[maxn];
map<int,int> mp;
void solve(){
n=read();
for(int i=1;i<=n;i++){
cin>>a[i].s;
a[i].s=" "+a[i].s;
a[i].w=read();
b[i]=a[i].w;
}
sort(b+1,b+n+1);
for(int i=1;i<=n;i++){
int cnt=0;
for(int j=i+1;j<=n;j++){
if(b[j]>b[i]){
cnt++;
}
}
mp[b[i]]=cnt;
}
string ans="";
for(int i=1;i<=n;i++){
for(int j=1;j<=min(011,a[i].s.size()-mp[a[i].w]-2);j++){
ans.push_back(a[i].s[j]);
}
}
ans[0]=(ans[0]-'a'+'A');
cout<<"Stage: "<<ans<<endl;
return ;
}
signed main(){
// freopen("puxi.in","r",stdin);
// freopen("puxi.out","w",stdout);
int T=1;
// T=read();
while(T--){
solve();
}
return 0;
}
詳細信息
answer.code: In function ‘void solve()’: answer.code:81:35: error: no matching function for call to ‘min(int, long long unsigned int)’ 81 | for(int j=1;j<=min(011,a[i].s.size()-mp[a[i].w]-2);j++){ | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/13/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51, from answer.code:4: /usr/include/c++/13/bits/stl_algobase.h:233:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)’ 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/13/bits/stl_algobase.h:233:5: note: template argument deduction/substitution failed: answer.code:81:35: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘long long unsigned int’) 81 | for(int j=1;j<=min(011,a[i].s.size()-mp[a[i].w]-2);j++){ | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/13/bits/stl_algobase.h:281:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)’ 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/13/bits/stl_algobase.h:281:5: note: template argument deduction/substitution failed: answer.code:81:35: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘long long unsigned int’) 81 | for(int j=1;j<=min(011,a[i].s.size()-mp[a[i].w]-2);j++){ | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/13/algorithm:61: /usr/include/c++/13/bits/stl_algo.h:5775:5: note: candidate: ‘template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)’ 5775 | min(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/13/bits/stl_algo.h:5775:5: note: template argument deduction/substitution failed: answer.code:81:35: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘int’ 81 | for(int j=1;j<=min(011,a[i].s.size()-mp[a[i].w]-2);j++){ | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/13/bits/stl_algo.h:5785:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)’ 5785 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/13/bits/stl_algo.h:5785:5: note: template argument deduction/substitution failed: answer.code:81:35: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘int’ 81 | for(int j=1;j<=min(011,a[i].s.size()-mp[a[i].w]-2);j++){ | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~