跳到正文

个人记录

1

cute_约 1 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2026年4月26日
篇幅
约 1 分钟

版本

  1. v1当前
C++
#include <bits/stdc++.h>
using namespace std;
int t;
int a;
int x;
int y;
int tree[5][5];
int f;
int k=2;
int cnt;
int x_;
int dot(){
	while(k){
		memset(tree,0,sizeof(tree));
		cnt=0;
		while(cnt<9){
			x=k;
			y=2;
			x_=k/3*3;
			cout<<x<<" "<<y<<endl;
			cin>>x;
			cin>>y;
			if(x==0&&y==0){
				return 0;
			}
			if(x==-1&&y==-1){
				f=1;
				return 0;
			}
			if(tree[x-x_][y]==0){
				cnt++;
			}
			tree[x-x_][y]=1;
		}
		k+=3;
	}
}
int main(){
	cin>>t;
	while(t--){
		cin>>a;
		dot();
		if(f){
			return 0;
		}
	}
}
原文