QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#281583#3251. 数正方体Maxwell2008WA 2ms3720kbC++141.4kb2023-12-10 13:22:452023-12-10 13:22:45

Judging History

你现在查看的是最新测评结果

  • [2023-12-10 13:22:45]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3720kb
  • [2023-12-10 13:22:45]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
//#define int long long
//#define endl '\n'
const int N=1009;
const int INF=0x3f3f3f3f;
const int mod=998244353;
inline int read(){
	int s=0,f=1;
	char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1; ch=getchar();}
	while(ch>='0'&&ch<='9'){s=(s<<1)+(s<<3)+(ch^48); ch=getchar();}
	return s*=f;
}
inline void write(int x){
	if(x>9)write(x/10);
	putchar(x%10+48);
}
inline void print(int x){
	if(x<0){putchar('-'); x=-x;}
	write(x);
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template<class T> T rnd(T l,T r){return uniform_int_distribution<T>(l,r)(rng);}
inline void file(){
	freopen(".in","r",stdin);
	freopen(".out","w",stdout);
}
int r,c;
string ch[N];
int x[N],y[N],h[N],tot;
signed main(){
	r=read(); c=read();
	for(int i=r;i>=1;i--)getline(cin,ch[i]);
	x[0]=1; y[0]=0; h[0]=0;
	while(1){
		int nx=x[tot],ny=y[tot];
		if(nx==r)break;
		if(tot)nx+=2,ny+=2;
		int cnt=0;
		while(nx+3<=r&&ch[nx+3][ny]=='+')nx+=3,cnt++;
		tot++; x[tot]=nx; y[tot]=ny; h[tot]=h[tot-1]+cnt;
	}/*
	int ans=0;
	for(int t=1;t<=tot-1;t++){
		int nx=x[t],ny=y[t],nh=h[t];
		
		while(1){
			while(ch[nx][ny+1]=='-')ny+=4,ans+=nh;
			while(ch[nx-1][ny]=='|'&&ch[nx][ny+1]!='-')nx-=3,nh--;
			if(nx==1||ny==c-1)break;
			if(ch[nx-1][ny]=='.'||ch[nx][ny+1]=='.')break;
		}
	}
	cout<<ans<<'\n';*/
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 2ms
memory: 3720kb

input:

371 259
......................................................................+---+---+....................................................................................................................................................................................
...................................

output:


result:

wrong answer 1st lines differ - expected: '84826', found: ''