QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#753526#9548. The Foolucup-team5657#WA 0ms4108kbC++141.3kb2024-11-16 13:08:242024-11-16 13:08:25

Judging History

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

  • [2024-11-16 13:08:25]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:4108kb
  • [2024-11-16 13:08:24]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
#define fi first
#define se second
#define mkp make_pair
#define pb emplace_back
#define popcnt __builtin_popcountll
const int mod = 998244353;
inline ll read(){
	ll x=0, f=1; char ch=getchar();
	while(ch<'0' || ch>'9') { if(ch=='-') f=-1; ch=getchar(); }
	while(ch>='0' && ch<='9') x=x*10+ch-'0', ch=getchar();
	return x*f;
}
inline int lg2(int x){ return 31^__builtin_clz(x); }
inline ll lg2(ll x){ return 63^__builtin_clzll(x); }
inline ll qpow(ll a,ll b){
	ll ans=1, base=a;
	while(b){
		if(b&1) ans=ans*base%mod;
		base=base*base%mod; b>>=1;
	}
	return ans;
}
void init(){ }
int n,m,k;
char s[205][2005];

map<string, pair<int,int> >mp;
void procedure(){
	n=read(), m=read(), k=read();
	for(int i=1;i<=n;i++){
		scanf("%s", s[i]);
	}	

	for(int i=1;i<=n;i++){
		for(int j=1;j<=m;j++){
			string S;
			for(int x=1+(j-1)*k;x<=j*k;x++) S += s[i][x];
			if(mp.count(S)){
				mp[S] = mkp(-1, -1);
			}else mp[S] = mkp(i, j);
		}
	}
	for(auto p: mp){
		if(p.se.se > 0){
			printf("%d %d\n", p.se.fi, p.se.se);
		}
	}
}
int main(){
	#ifdef LOCAL
		assert(freopen("input.txt","r",stdin));
		assert(freopen("output.txt","w",stdout));
	#endif
	ll T=1;
	init();
	while(T--) procedure();
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 4108kb

input:

3 5 3
QWQQWQQWQQWQQWQ
QWQQWQQWQQWQQWQ
QWQQWQQWQQWQQwQ

output:

3 5

result:

ok single line: '3 5'

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3936kb

input:

2 2 1
LL
}L

output:


result:

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