QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#650414 | #8217. King's Dinner | ucup-team3160# | WA | 1ms | 3712kb | C++14 | 1.3kb | 2024-10-18 15:03:07 | 2024-10-18 15:03:09 |
Judging History
answer
#include <bits/stdc++.h>
#define rep(i, min, max) for(int i = (min); i <= (max); ++i)
#define nrep(i, max, min) for(int i = (max); i >= (min); --i)
#define reads(str) (scanf("%s", str + 1), strlen(str + 1))
#define case() int Ts = read(); rep(T, 1, Ts)
#define putf(flag) puts((flag) ? "Yes" : "No")
#define put(x) printf("%d ", x)
#define putl(x) printf("%lld ", x)
#define endl() putchar('\n')
using namespace std;
void print() { cerr << endl; }
template<typename T, typename ...Ts>
void print(T x, Ts ...xs) { cerr << x << " "; print(xs...); }
typedef long long ll;
inline ll read()
{
ll now=0; bool nev=false; char c=getchar();
while(c<'0' || c>'9') { if(c=='-') nev=true; c=getchar(); }
while(c>='0' && c<='9') { now=(now<<1)+(now<<3)+(c&15); c=getchar(); }
return nev?-now:now;
}
const int N = 200 + 10;
int main() {
case() {
int n = read();
int xlim = n, ylim = n;
while((xlim + 1) % 3 != 0) xlim --;
while((ylim + 1) % 2 != 0) ylim --;
rep(i, 1, n) {
rep(j, 1, n) {
if(j % 2 != 0 && i % 3 != 0 && i <= xlim && j <= ylim) {
putchar('#');
} else putchar('.');
}
putchar('\n');
}
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3712kb
input:
3 1 2 3
output:
. #. #. #.# #.# ...
result:
ok all tests correct (3 test cases)
Test #2:
score: -100
Wrong Answer
time: 1ms
memory: 3648kb
input:
50 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
output:
. #. #. #.# #.# ... #.#. #.#. .... .... #.#.# #.#.# ..... #.#.# #.#.# #.#.#. #.#.#. ...... #.#.#. #.#.#. ...... #.#.#.# #.#.#.# ....... #.#.#.# #.#.#.# ....... ....... #.#.#.#. #.#.#.#. ........ #.#.#.#. #.#.#.#. ........ #.#.#.#. #.#.#.#. #.#.#.#.# #.#.#.#.# ......... #.#.#.#.# #.#.#.#.# ......... ...
result:
wrong answer jury has the better answer: jans = 4, pans = 2 (test case 4)