标签:else 训练 i++ 思路 str code turn 大于 数组
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<math.h>
#include<map>
#include<iostream>
#include<algorithm>
using namespace std;
typedef long long ll;
int main(){
int t;
ll sum,n,m;
cin>>t;
while(t--){
cin>>n;
if(n/2%2!=0){
cout<<"NO"<<endl;
continue;
}
else{
cout<<"YES"<<endl;
for(int i=1;i<=n/2;i++){
cout<<i*2<<" ";
}
for(int i=0;i<n/2-1;i++){
cout<<i*2+1<<" ";
}
cout<<3*(n/2)-1<<endl;
}
}
return 0;
}
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<math.h>
#include<map>
#include<iostream>
#include<algorithm>
using namespace std;
typedef long long ll;
int main(){
int t,k,b,c,d;
int sum,n,m;
cin>>t;
while(t--){
cin>>k>>n>>m;
if(k>20){
for(int i=0;i<n;i++){
if(k<20){
break;
}
else{
k=k/2+10;
}
}
for(int i=0;i<m;i++){
k-=10;
}
if(k<=0){
cout<<"YES"<<endl;
}
else{
cout<<"NO"<<endl;
}
}
else{
for(int i=0;i<m;i++){
k-=10;
}
if(k<=0){
cout<<"YES"<<endl;
}
else{
cout<<"NO"<<endl;
}
}
}
return 0;
}
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<math.h>
#include<map>
#include<iostream>
#include<algorithm>
using namespace std;
typedef long long ll;
int main(){
int t,a,b,c,d;
int sum,n,m;
char s;
cin>>t;
while(t--){
cin>>n>>a>>b;
for(int i=0;i<n;i++){
s=i%b+‘a‘;
cout << s;
}
cout<<endl;
}
return 0;
}
标签:else 训练 i++ 思路 str code turn 大于 数组
原文地址:https://www.cnblogs.com/pioneerjiesen/p/12955929.html