UKE结果
Unknown Error. Judger internal error
Traceback (most recent call last):
File "/app/luogu-judger/source/executor/LrunExecutor.py", line 44, in execute
shell=True, stdout=subprocess.DEVNULL)
File "/usr/lib/python3.7/subprocess.py", line 323, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.7/subprocess.py", line 1453, in _execute_child
restore_signals, start_new_session, preexec_fn)
BlockingIOError: [Errno 11] Resource temporarily unavailable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/luogu-judger/source/tasks/Judge.py", line 148, in judge
execution_limits=limits)
File "/app/luogu-judger/source/judger/Judger.py", line 38, in judge
execution_limits=execution_limits)
File "/app/luogu-judger/source/judger/ProgramRunner.py", line 69, in execute
mirror_directories=work_dir)
File "/app/luogu-judger/source/executor/LrunExecutor.py", line 71, in execute
shell=True, stdin=None, stdout=None, stderr=None)
File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.7/subprocess.py", line 1453, in _execute_child
restore_signals, start_new_session, preexec_fn)
BlockingIOError: [Errno 11] Resource temporarily unavailable
我的程序如下
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
void read(int &x){
char c=getchar();
int k=1;
while(c<'0'||c>'9') {if(c=='-') k=-1;c=getchar();}
for(x=0;c>='0'&&c<='9';c=getchar())
x=x*10+c-'0';
x*=k;
}
void enter(){printf("\n");}
void space(){printf(" ");}
void write(int x){
if(x<10) {putchar('0'+x);return;}
write(x/10);
putchar('0'+x%10);
}
int n,m,f[101],a[101],k,x,y,s,ans;
int main(){
cin>>n>>m;
for(int i=1;i<=n;i++) a[i]=i;
f[1]=1;
for(int i=2;i<=n;i++){
for(int j=i;j>=1;j--){
f[j]+=f[j-1];
}
}
do{
s=0;
for(int i=1;i<=n;i++){
s+=a[i]*f[i];
if(s>m){
sort(a+i,a+n+1,greater<int>());
break;
}
}
if(s==m){
for(int i=1;i<=n;i++) printf("%d ",a[i]);
return 0;
}
}while(next_permutation(a+1,a+n+1));
return 0;
}
然后我一气之下把sort的比较函数换成手写的了,接下来,玄学的事情发生了,emm~~~,我就AC了
谁能告诉我为啥greater()只有60pts?