QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#414510 | #2920. Ultimate Binary Watch | TheSleepyDevil# | WA | 1ms | 3792kb | C++14 | 3.9kb | 2024-05-19 05:59:05 | 2024-05-19 05:59:05 |
Judging History
answer
/*
Hell, 'til I reach Hell, I ain't scared
Mama checkin' in my bedroom, I ain't there
*/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define Major ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define TxtIO freopen("input.txt","r",stdin); freopen("output.txt","w",stdout);
#define read(a,n) for(int i = 0 ; i<n ; i++) cin>>a[i];
#define write(a) for(auto x : a) cout<<x<<" ";
#define int long long
#define pb push_back
#define all(a) a.begin(),a.end()
#define el "\n"
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
const int inf=4e18;
int dx[]={1,0,-1,0,1,1,-1,-1};
int dy[]={0,1,0,-1,1,-1,1,-1};
const int mod=1e9+7;
const int MAX =1e6+7;
// ---------------------------Function----------------------------------//
void TestCake(){
string s;
cin>>s;
vector<char>ans[4];
for(int i=0;i<s.size();i++){
if(s[i]=='0'){
for(int z=0;z<4;z++){
ans[z].pb('.');
}
}
else if(s[i]=='1'){
for(int z=0;z<3;z++){
ans[z].pb('.');
}
ans[3].pb('*');
}
else if(s[i]=='2'){
for(int z=0;z<2;z++){
ans[z].pb('.');
}
ans[2].pb('*');
ans[3].pb('.');
}
else if(s[i]=='3'){
for(int z=0;z<2;z++){
ans[z].pb('.');
}
ans[2].pb('*');
ans[3].pb('*');
}
else if(s[i]=='4'){
for(int z=0;z<1;z++){
ans[z].pb('.');
}
ans[1].pb('*');
ans[2].pb('.');
ans[3].pb('.');
}
else if(s[i]=='5'){
for(int z=0;z<1;z++){
ans[z].pb('.');
}
ans[1].pb('*');
ans[2].pb('.');
ans[3].pb('*');
}
else if(s[i]=='6'){
for(int z=0;z<1;z++){
ans[z].pb('.');
}
ans[1].pb('*');
ans[2].pb('*');
ans[3].pb('.');
}
else if(s[i]=='7'){
for(int z=0;z<1;z++){
ans[z].pb('.');
}
ans[1].pb('*');
ans[2].pb('*');
ans[3].pb('*');
}
else if(s[i]=='8'){
for(int z=0;z<1;z++){
ans[z].pb('*');
}
ans[1].pb('.');
ans[2].pb('.');
ans[3].pb('.');
}
else if(s[i]=='9'){
for(int z=0;z<1;z++){
ans[z].pb('*');
}
ans[1].pb('.');
ans[2].pb('.');
ans[3].pb('*');
}
}
for(int j=0;j<4;j++){
for(int i=0;i<4;i++){
cout<<ans[j][i];
if(i==1){
cout<<" ";
}
}
cout<<el;
}
}
//------------------------------Main---------------------------//
signed main(){
Major
int T = 1;
// cin >> T;
while(T--){
TestCake();
// cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
}
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3792kb
input:
1234
output:
.. .. .. .* .* *. *. *.
result:
wrong answer 1st lines differ - expected: '. . . .', found: '.. ..'