【ZhengQing】[1400]This Can't Be a Love Letter

Problem Description

Loading...

Problem Analysis

This can’t be a love letter~
Hahaha
The problem isn’t hard
But I want a love letter~
-.-

cpp
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include<stdio.h>
#include<string.h>
int main() {
	int T,n;
	int i;
	char s[120];
	char a[120];
	scanf("%d",&T);
	getchar();
	while(T--) {
		memset(a,0,sizeof(a));
		memset(s,0,sizeof(s));
		gets(s);
		for(i=0; i<strlen(s); i++) {
			scanf("%d",&n);
			a[n-1]=s[i];
		}
		getchar();
		printf("%s\n",a);
	}
	return 0;
}

Problem link: ZZULI 1400: This Can’t Be a Love Letter, Right?

This post is licensed under CC BY-NC-SA 4.0. If it helped, or if you have anything to say, the comment box below is open.
Page views —
Unique visitors —

Loading...