QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#811376#3251. 数正方体dxbtRE 0ms0kbC++14830b2024-12-12 18:49:072024-12-12 18:49:08

Judging History

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

  • [2024-12-12 18:49:08]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:0kb
  • [2024-12-12 18:49:07]
  • 提交

answer

#include<bits/stdc++.h>
#define F(i,l,r) for(int i=(l),i##end=(r);i<=i##end;++i)
#define G(i,l,r) for(int i=(l),i##end=(r);i>=i##end;--i)
#define pii pair<int,int>
#define x first
#define y second
#define mp(x,y) make_pair(x,y)
#define ep emplace_back
using namespace std;
typedef long long ll;
string s[100];
int w[1000][1000];
int main()
{
	cin.tie(0)->sync_with_stdio(false);
	int n,m,ans=0;
	cin>>n>>m;
	F(i,0,n-1)cin>>s[i];
	F(j,0,m-1)
	{
		int lst=0;
		G(i,n-1,0)if(s[i][j]=='+')ans+=lst++;
	}
	cout<<ans<<'\n';
	return 0;
}
/*
14 17
....+---+---+....
.../   /   /|....
..+---+---+ |....
./ /| | +---+
+---+ | |/ /|
|   | +---+---+ |
|   |/   /|   | +
+---+---+ |   |/|
|   |   | +---+ |
|   |   |/   /| +
+---+---+---+ |/.
|   |   |   | +..
|   |   |   |/...
+---+---+---+....
*/

詳細信息

Test #1:

score: 0
Runtime Error

input:

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

output:


result: