QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#320887 | #8217. King's Dinner | ucup-team1134# | WA | 1ms | 3656kb | C++23 | 881b | 2024-02-03 23:15:36 | 2024-02-03 23:15:36 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; }
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define mp make_pair
#define si(x) int(x.size())
const int mod=998244353,MAX=300005,INF=1<<30;
int main(){
std::ifstream in("text.txt");
std::cin.rdbuf(in.rdbuf());
cin.tie(0);
ios::sync_with_stdio(false);
int Q;cin>>Q;
while(Q--){
int N;cin>>N;
vector<string> S(N,string(N,'.'));
for(int i=0;i+1<N;i+=3){
for(int j=0;j<N;j+=2){
S[i][j]=S[i+1][j]='#';
}
}
for(int i=0;i<N;i++) cout<<S[i]<<"\n";
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3600kb
input:
3 1 2 3
output:
. #. #. #.# #.# ...
result:
ok all tests correct (3 test cases)
Test #2:
score: -100
Wrong Answer
time: 1ms
memory: 3656kb
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)