Submission #944930

# Submission time Handle Problem Language Result Execution time Memory
944930 2024-03-13T08:19:50 Z akqxolotl Fancy Fence (CEOI20_fancyfence) C++17
12 / 100
314 ms 604 KB
#include <bits/stdc++.h>
#define int long long
using namespace std;

signed main(){
	ios_base::sync_with_stdio(0);cin.tie(0);
	int n;cin>>n;
	int a[55][55];
	for(int i=0;i<55;i++){
		for(int j=0;j<55;j++){
			a[i][j]=0;
		}
	}
	for(int i=0;i<n;i++){
		int h;cin>>h;
		for(int j=0;j<h;j++){
			a[i][j]=1;
		}
	}
	int ans=0;
	for(int i=0;i<55;i++){
		for(int j=0;j<55;j++){
			for(int x=0;x<55;x++){
				if(x+i>=55)break;
				for(int y=0;y<55;y++){
					if(y+j>=55)break;
					bool v=1;
					for(int xx=x;xx<=x+i;xx++){
						for(int yy=y;yy<=y+j;yy++){
							if(a[xx][yy]==0){
								v=0;break;
							}
						}
					}
					if(v==1)ans++;
				}
			}
		}
	}
	cout<<ans;

}
# Verdict Execution time Memory Grader output
1 Incorrect 37 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 63 ms 344 KB Output is correct
2 Correct 181 ms 344 KB Output is correct
3 Correct 90 ms 448 KB Output is correct
4 Correct 45 ms 344 KB Output is correct
5 Correct 314 ms 444 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 33 ms 448 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 604 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 33 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 34 ms 472 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 37 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -