PAT
一只幽灵飘过
(˃ ⌑ ˂ഃ )
展开
-
1165 Block Reversing (25 分)
Given a singly linked list L. Let us consider every K nodes as a block (if there are less than K nodes at the end of the list, the rest of the nodes are still considered as a block). Your job is to reverse all the blocks in L. For example, given L as 1→2→3原创 2022-02-23 21:44:28 · 359 阅读 · 0 评论 -
1164 Good in C (20 分)
给出5*7大小的给个字母,按照给出的句子输出。 注意: 输入的字符串可能有空格,使用getline输入 开头的非大写字母不输出空行 分隔的非大写字母如果有多个,也只输出一个空行 #include<bits/stdc++.h> using namespace std; string s[27][8]; int main() { for(int i=0; i<26; i++) { for(int j=0; j<7; j++) {原创 2022-02-23 20:17:37 · 342 阅读 · 0 评论