Educational Codeforces Round 68 (Rated for Div. 2) A B C

ARemove a Progression

#include
using namespace std;
#define ll long long
const int N=1e5+100;

int main(){
	int t;
	cin >> t;
	while(t--){
		ll n , x;
		cin >> n >>x;
		cout << 2ll * x << "\n";
	}
	return 0;
}

  

BYet Another Crosses Problem

特判行列相交的点

#include
using namespace std;
#define ll long long
const int N=1e5+100;

int q;
int n,m;
int d1[N];
int d2[N];
int main(){
	cin >> q;
	while(q--){
		cin >> n >> m;
		int a[n+10][m+10];
		for(int i=0;i> c;
				if(c=='*') {
					a[i][j]=1;
					d1[i]++,d2[j]++;
				}
				else a[i][j]=0;
			}
		}
		int m1=n*m;
		for(int i=0;i

  

CFrom S To T

s长度需要小于t,s串顺序在t串中必须存在,s串和p串每个字母的数量之和要大于t串。

#include
using namespace std;
#define ll long long
const int N=1e5+100;

int q;
char s[3][200];
int a[3][26];
int main(){
	cin >> q;
	while(q--){
		for(int i=0;i<3;i++){
			cin >> s[i];
			for(int j=0;j<26;j++){
				a[i][j]=0;
			}
		}
		int l1=strlen(s[0]),l2=strlen(s[1]);
		if(l1>l2){
			cout << "NO\n";
			continue;
		}
		int i1=0,i2=0;
		for( i2=0;i2a[1][i]){
				cout << "NO\n";
				flag=1;
				break;
			}
		}
		if(flag) continue;
		cout << "YES\n";
	}
	return 0;
}

  

转载于:https://www.cnblogs.com/YJing814/p/11190755.html

你可能感兴趣的:(Educational Codeforces Round 68 (Rated for Div. 2) A B C)