QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#607446 | #1266. Visual Cube | Sleepy | RE | 0ms | 0kb | C++14 | 6.1kb | 2024-10-03 14:56:48 | 2024-10-03 14:56:54 |
answer
//#include<iostream>
#include<bits/stdc++.h>
using namespace std;
//#pragma GCC target("avx")
//#pragma GCC optimize(1)
//#pragma GCC optimize(2)
//#pragma GCC optimize(3)
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("inline")
//#pragma GCC optimize("-fgcse")
//#pragma GCC optimize("-fgcse-lm")
//#pragma GCC optimize("-fipa-sra")
//#pragma GCC optimize("-ftree-pre")
//#pragma GCC optimize("-ftree-vrp")
//#pragma GCC optimize("-fpeephole2")
//#pragma GCC optimize("-ffast-math")
//#pragma GCC optimize("-fsched-spec")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC optimize("-falign-jumps")
//#pragma GCC optimize("-falign-loops")
//#pragma GCC optimize("-falign-labels")
//#pragma GCC optimize("-fdevirtualize")
//#pragma GCC optimize("-fcaller-saves")
//#pragma GCC optimize("-fcrossjumping")
//#pragma GCC optimize("-fthread-jumps")
//#pragma GCC optimize("-funroll-loops")
//#pragma GCC optimize("-fwhole-program")
//#pragma GCC optimize("-freorder-blocks")
//#pragma GCC optimize("-fschedule-insns")
//#pragma GCC optimize("inline-functions")
//#pragma GCC optimize("-ftree-tail-merge")
//#pragma GCC optimize("-fschedule-insns2")
//#pragma GCC optimize("-fstrict-aliasing")
//#pragma GCC optimize("-fstrict-overflow")
//#pragma GCC optimize("-falign-functions")
//#pragma GCC optimize("-fcse-skip-blocks")
//#pragma GCC optimize("-fcse-follow-jumps")
//#pragma GCC optimize("-fsched-interblock")
//#pragma GCC optimize("-fpartial-inlining")
//#pragma GCC optimize("no-stack-protector")
//#pragma GCC optimize("-freorder-functions")
//#pragma GCC optimize("-findirect-inlining")
//#pragma GCC optimize("-fhoist-adjacent-loads")
//#pragma GCC optimize("-frerun-cse-after-loop")
//#pragma GCC optimize("inline-small-functions")
//#pragma GCC optimize("-finline-small-functions")
//#pragma GCC optimize("-ftree-switch-conversion")
//#pragma GCC optimize("-foptimize-sibling-calls")
//#pragma GCC optimize("-fexpensive-optimizations")
//#pragma GCC optimize("-funsafe-loop-optimizations")
//#pragma GCC optimize("inline-functions-called-once")
//#pragma GCC optimize("-fdelete-null-pointer-checks")
//inline int read(){int x=0,f=1;char c=getchar();while(c<48||c>57){if(c=='-')f=-1;c=getchar();}while(c>47&&c<58)x=(x<<3)+(x<<1)+(c^48),c=getchar();return x*f;}
//inline void write(int x){if(!x){putchar('0'),putchar('\n');return;}if(x<0)putchar('-'),x=-x;char a[20];int i=0;while(x)a[++i]=x%10+48,x/=10;for(;i;i--)putchar(a[i]);putchar('\n');}
int main(){
ios::sync_with_stdio(false);
cin.tie(),cout.tie();
freopen("draw.in","r",stdin);
freopen("draw.out","w",stdout);
int T;
cin>>T;
while(T--)
{
int a,b,c;
cin>>a>>b>>c;
for(int i=1;i<2*b+1;i++)
{
for(int j=1;j<=2*b+1-i;j++)
cout<<".";
if(i%2==0)
{
for(int j=1;j<=a;j++)
cout<<"/.";
cout<<"/";
// if(2*b+1-i+2*a+2*c<=2*(a+b)+1)
// {
// for(int j=1;j<2*c;j++)
// {
// if(j%2)
// cout<<"|";
// else
// cout<<"/";
// }
// for(int j=1;j<=2*(a+b)+1-(2*b+1-i+2*a+2*c);j++)
// cout<<".";
// }
// else
// {
// for(int j=1;j<2*(a+b)+1-(2*b+1-i+2*a);j++)
// {
// if(j%2)
// cout<<"|";
// else
// cout<<"/";
// }
// }
if(2*c<i-1)
{
for(int j=1;j<=2*c;j++)
{
if(j%2)
cout<<"|";
else
cout<<"/";
}
for(int j=1;j<=(i-1)-2*c;j++)
cout<<".";
}
else
{
for(int j=1;j<=i-1;j++)
{
if(j%2)
cout<<"|";
else
cout<<"/";
}
}
cout<<endl;
}
else
{
for(int j=1;j<=2*a;j++)
{
if(j%2)
cout<<"+";
else
cout<<"-";
}
cout<<"+";
// if(2*b+1-i+2*a+2*a<=2*(a+b)+1)
// {
// for(int j=1;j<=2*a;j++)
// {
// if(j%2)
// cout<<".";
// else
// cout<<"+";
// }
// for(int j=1;j<=2*(a+b)+1-(2*b+1-i+2*a+2*a)-1;j++)
// cout<<".";
// cout<<endl;
// }
// else
// {
// for(int j=1;j<=2*(a+b)-(2*b+1-i+2*a);j++)
// {
// if(j%2)
// cout<<".";
// else
// cout<<"+";
// }
// cout<<endl;
// }
if(2*c<i-1)
{
for(int j=1;j<=2*c;j++)
{
if(j%2)
cout<<".";
else
cout<<"+";
}
for(int j=1;j<=(i-1)-2*c;j++)
cout<<".";
cout<<endl;
}
else
{
for(int j=1;j<=i-1;j++)
{
if(j%2)
cout<<".";
else
cout<<"+";
}
cout<<endl;
}
}
}
for(int i=1;i<=2*a;i++)
{
if(i%2)
cout<<"+";
else
cout<<"-";
}
cout<<"+";
if(2*a+2*c+1<=2*(a+b)+1)
{
for(int i=1;i<=2*c;i++)
{
if(i%2)
cout<<".";
else
cout<<"+";
}
for(int i=1;i<=2*(a+b)+1-2*a-2*c-1;i++)
cout<<".";
cout<<endl;
}
else
{
for(int i=1;i<=2*(a+b)+1-2*a-1;i++)
{
if(i%2)
cout<<".";
else
cout<<"+";
}
cout<<endl;
}
for(int i=1;i<=2*c;i++)
{
if(i%2==0)
{
for(int j=1;j<=2*a;j++)
{
if(j%2)
cout<<"+";
else
cout<<"-";
}
cout<<"+";
if(2*c-i+2*a<=2*(a+b)+1)
{
for(int j=1;j<=2*c-i;j++)
{
if(j%2)
cout<<".";
else
cout<<"+";
}
for(int j=1;j<=2*(a+b)+1-2*a-1-2*c+i;j++)
cout<<".";
cout<<endl;
}
else
{
for(int j=1;j<=2*(a+b)+1-2*a-1;j++)
{
if(j%2)
cout<<".";
else
cout<<"+";
}
cout<<endl;
}
}
else
{
for(int j=1;j<=2*a;j++)
{
if(j%2)
cout<<"|";
else
cout<<".";
}
cout<<"|";
if(2*c-i+2*a+1<=2*(a+b)+1)
{
for(int j=1;j<=2*c-i;j++)
{
if(j%2)
cout<<"/";
else
cout<<"|";
}
for(int j=1;j<=2*(a+b)+1-2*a-1-2*c+i;j++)
cout<<".";
cout<<endl;
}
else
{
for(int j=1;j<=2*(a+b)+1-2*a-1;j++)
{
if(j%2)
cout<<"/";
else
cout<<"|";
}
cout<<endl;
}
}
}
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Dangerous Syscalls
input:
2 1 1 1 6 2 4