Hello 2020 A.New Year and Naming

题目:https://codeforces.com/contest/1284/problem/A
思路:输出 \(s[(y-1)\%n]+t[(y-1)\%m]\) 即可

#include
 
using namespace std;
 
const int N=22;
 
int n,m;
string s[N],t[N];
int q;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    //freopen("in.txt","r",stdin);
    cin>>n>>m;
    for(int i=0;i>s[i];
    for(int i=0;i>t[i];
    cin>>q;
    for(int i=1;i<=q;i++)
    {
        int x;
        cin>>x;
        x--;
        cout<

你可能感兴趣的:(Hello 2020 A.New Year and Naming)