QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#137999 | #6341. The Last Battle | waldi# | Compile Error | / | / | C++17 | 1.8kb | 2023-08-10 20:30:12 | 2024-07-04 01:33:44 |
Judging History
你现在查看的是最新测评结果
- [2024-07-04 01:33:44]
- 评测
- 测评结果: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-08-10 20:30:12]
- 提交
Anna
#include <bits/stdc++.h>
#include "Anna.h"
#define FOR(i,p,k) for(int i=(p);i<=(k);++i)
#define REP(i,n) FOR(i,0,(n)-1)
#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int, int>
#define fi first
#define se second
using namespace std;
vvi gen(int x, int y){
// 0,1 - info
// 2 - blokada
// 3 - info slowa
vvi t(8, vi(8, 0));
t[x][y] = 2;
REP(i, 8) if(i != x){
if(y) t[i][y-1] = 1;
t[i][y] = 2;
if(y<7) t[i][y+1] = 1;
}
REP(j, 8) if(j != y){
if(x) t[x-1][j] = 1;
t[x][j] = 2;
if(x<7) t[x+1][j] = 1;
}
REP(i, 8) REP(j, 8) if(t[i][j]!=2 && !(i==0 || j==0 || i==j || i+j==7)) t[i][j] = 3;
return t;
}
void Anna(int x, int y, int n, string s){
vvi t = gen(x, y);
int it = 0;
REP(i, 8) REP(j, 8) if(t[i][j] == 3){
if(it < n) t[i][j] = s[it++]=='B';
else t[i][j] = 0;
}
REP(i, 8) REP(j, 8) if(t[i][j] < 2) Paint(i, j, t[i][j]);
}
int main(){
Anna(1, 7, 1, "A");
return 0;
}
Bruno
#include <bits/stdc++.h>
#include "Bruno.h"
#define FOR(i,p,k) for(int i=(p);i<=(k);++i)
#define REP(i,n) FOR(i,0,(n)-1)
#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int, int>
#define fi first
#define se second
using namespace std;
vvi gen(int x, int y){
// 0,1 - info
// 2 - blokada
// 3 - info slowa
vvi t(8, vi(8, 0));
t[x][y] = 2;
REP(i, 8) if(i != x){
if(y) t[i][y-1] = 1;
t[i][y] = 2;
if(y<7) t[i][y+1] = 1;
}
REP(j, 8) if(j != y){
if(x) t[x-1][j] = 1;
t[x][j] = 2;
if(x<7) t[x+1][j] = 1;
}
REP(i, 8) REP(j, 8) if(t[i][j]!=2 && !(i==0 || j==0 || i==j || i+j==7)) t[i][j] = 3;
return t;
}
string Bruno(int n, vvi t){
int x, y;
REP(xx, 8) REP(yy, 8){
vvi t2 = gen(xx, yy);
bool git = 1;
REP(i, 8) REP(j, 8) if(t[i][j]<2 && t2[i][j]<2 && t2[i][j]!=t[i][j]) git = 0;
if(git){x=xx, y=yy; break;}
}
string s;
REP(i, 8) REP(j, 8) if(i!=x && j!=y){
if((int)s.size() < n) s += 'A'+t[i][j];
}
return s;
}
详细
/usr/bin/ld: /tmp/cclDmNfZ.o: in function `main': grader_Anna.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccoRhpi0.o:Anna.code:(.text.startup+0x0): first defined here collect2: error: ld returned 1 exit status