PTA甲级B1061 Dating】的更多相关文章

目录 B1061 Dating (20分) 题目原文 Input Specification: Output Specification: Sample Input: Sample Output: 生词如下 题目大意 注意点: 总结和反思 B1061 Dating (20分) 首先,先贴柳神的博客 https://www.liuchuo.net/ 这是地址 想要刷好PTA,强烈推荐柳神的博客,和算法笔记 题目原文 Sherlock Holmes received a note with some…
PTA甲级1094 The Largest Generation (25分) A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level belong to the same generation. Your task is to find the generation with the largest population. Input Specificatio…
1061 Dating (20 分)   Sherlock Holmes received a note with some strange strings: Let's date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm. It took him only a minute to figure out that those strange strings are actually referring to the cod…
Sherlock Holmes received a note with some strange strings: Let's date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm. It took him only a minute to figure out that those strange strings are actually referring to the coded time Thursday 14:0…
Sherlock Holmes received a note with some strange strings: Let's date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm. It took him only a minute to figure out that those strange strings are actually referring to the coded time Thursday 14:0…
1061 Dating Sherlock Holmes received a note with some strange strings: Let's date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm. It took him only a minute to figure out that those strange strings are actually referring to the coded time T…
题目:https://pintia.cn/problem-sets/994805342720868352/problems/994805411985604608 题意: 给定四个字符串. 前两个字符串中第一个相同的大写字母对应星期,第二个相同的数字或大写(A~N)表示小时. 后两个字符串中第一个相同的字母对应分钟. 这里的对应都是位置与位置一一对应. 思路: 按照题意简单模拟.要看清楚题目数据的要求.比如分钟要求的是English letter,数字相同是不算的. #include<cstdio…
https://pintia.cn/problem-sets/994805342720868352/problems/994805344776077312 其实这道题目不难,但是有很多坑点! 首先数据是性别+id,id不是数字! 输出的时候必须前面补0, 另外什么自己和自己连边,重复的边都要注意, 更注意的是 -0000,这个数据,不能用int来读,我艹 #include <iostream> #include <map> #include <algorithm> #i…
1032 Sharing (25分) 回顾了下链表的基本使用,这题就是判断两个链表是否有交叉点. 我最开始的做法就是用cnt[]记录每个节点的入度,发现入度为2的节点即为答案.后来发现这里忽略了两个链表初始节点都是一样的情况,于是这里cnt[]的含义变为每个节点被引用的次数,当一个节点被引用两次就说明被两个链表同时引用.此时又通过了部分测试样例,可是测试样例5始终通过不了.后来偶然翻到一篇博客才恍然大悟,这里的节点可能不止包含两个单词,即可能有多个起点表示多个单词,而题目只是问你给定的两个单词有…
1051 Pop Sequence (25分) [stack] 简答的栈模拟题,只要把过程想清楚就能做出来. 扫描到某个元素时候,假如比栈顶元素还大,说明包括其本身的在内的数字都应该入栈.将栈顶元素和序列比对即可,相同则弹栈,继续扫描:否则无法生成满足条件的序列.注意栈满时不能入栈 #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int maxn =…