A. Digits Sequence Dividing

签.

 1 #include <bits/stdc++.h>
 2 using namespace std;
 3 
 4 #define N 1010
 5 char s[N]; int n; 
 6 
 7 void solve()
 8 {
 9     if (n == 2 && s[1] >= s[2]) 
10     {
11         puts("NO"); 
12         return;
13     }
14     else
15     {
16         puts("YES");
17         puts("2");
18         printf("%c %s\n", s[1], s + 2);
19     }
20 }
21 
22 int main()
23 {
24     int t; scanf("%d", &t);
25     while (t--)
26     {
27         scanf("%d", &n);
28         scanf("%s", s + 1);
29         solve();
30     }
31     return 0;
32 }
View Code

相关文章:

  • 2021-12-03
  • 2022-12-23
  • 2021-11-21
  • 2021-09-07
  • 2021-06-24
  • 2021-06-23
  • 2022-01-27
猜你喜欢
  • 2021-08-28
  • 2022-02-15
  • 2021-09-20
  • 2021-05-17
  • 2021-06-05
  • 2021-10-25
相关资源
相似解决方案