QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#129574 | #5033. Y 君的序列 | pandapythoner# | Compile Error | / | / | C++20 | 1.2kb | 2023-07-22 20:51:33 | 2024-07-04 00:53:09 |
Judging History
你现在查看的是最新测评结果
- [2024-07-04 00:53:09]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-07-22 20:51:33]
- 提交
answer
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
#include "seq.h"
using namespace std;
namespace A {
const int maxn=2e5;;
int n,M,b[maxn],a[maxn],tot,mk;
void WA1() {
puts("Invalid operation"); exit(0);
}
void WA2() {
puts("Wrong construction"); exit(0);
}
void WA3() {
puts("Too many operations"); exit(0);
}
int Get(int x) {
if (x<1||x>n) { puts("Invalid Get"); exit(0); }
return b[x];
}
void add(int x,int y) {
if (!mk) { puts("Wrong answer"); exit(0); }
if (x<1||x>n||y<1||y>n||x==y||a[x]%2!=0) WA1();
if (a[y]+a[x]/2>1e9) WA1();
a[y]+=a[x]/2,a[x]/=2;
tot++;
if (tot>M) WA3();
}
int F;
void answer(int flag) {
if (mk||flag!=F) { puts("Wrong answer"); exit(0); }
mk=1;
}
void main() {
scanf("%d %d %d",&n,&M,&F);
for (int i=1;i<=n;i++) scanf("%d",&b[i]),a[i]=i;
SEQ(n,M);
for (int i=1;i<=n;i++) if (a[i]!=b[i]) WA2();
puts("AC");
}
}
int Get(int x) {
return A::Get(x);
}
void add(int x,int y) {
printf("%d %d\n",x,y);
A::add(x,y);
}
void answer(int flag) {
A::answer(flag);
}
int main() {
A::main();
return 0;
}
Details
implementer.cpp: In function ‘void {anonymous}::StAr_WaRs::main()’: implementer.cpp:46:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 46 | scanf("%d %d",&n,&M); | ~~~~~^~~~~~~~~~~~~~~ implementer.cpp:47:45: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 47 | for (int i=1;i<=n;i++) scanf("%d",&b[i]),a[i]=i; | ~~~~~^~~~~~~~~~~~ answer.code: In function ‘void A::main()’: answer.code:37:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 37 | scanf("%d %d %d",&n,&M,&F); | ~~~~~^~~~~~~~~~~~~~~~~~~~~ answer.code:38:45: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 38 | for (int i=1;i<=n;i++) scanf("%d",&b[i]),a[i]=i; | ~~~~~^~~~~~~~~~~~ /usr/bin/ld: /tmp/cc8C29H4.o: in function `Get(int)': answer.code:(.text+0x1b0): multiple definition of `Get(int)'; /tmp/cczMbWV4.o:implementer.cpp:(.text+0x30): first defined here /usr/bin/ld: /tmp/cc8C29H4.o: in function `add(int, int)': answer.code:(.text+0x1f0): multiple definition of `add(int, int)'; /tmp/cczMbWV4.o:implementer.cpp:(.text+0x80): first defined here /usr/bin/ld: /tmp/cc8C29H4.o: in function `answer(int)': answer.code:(.text+0x2d0): multiple definition of `answer(int)'; /tmp/cczMbWV4.o:implementer.cpp:(.text+0x160): first defined here /usr/bin/ld: /tmp/cc8C29H4.o: in function `main': answer.code:(.text.startup+0x200): multiple definition of `main'; /tmp/cczMbWV4.o:implementer.cpp:(.text.startup+0x0): first defined here /usr/bin/ld: /tmp/cczMbWV4.o: in function `main': implementer.cpp:(.text.startup+0x77): undefined reference to `SEQ(int, int)' /usr/bin/ld: /tmp/cc8C29H4.o: in function `A::main()': answer.code:(.text.startup+0x80): undefined reference to `SEQ(int, int)' collect2: error: ld returned 1 exit status