摘要: #include <stdio.h>#include <stdlib.h>#include <iostream>#include <string>#include <map>#include <sstream>using namespace std; pair<string, string> wor 阅读全文
posted @ 2023-05-29 20:06 EowynTang 阅读(26) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <stdlib.h>#include <iostream>#include <string>#include <map>#include <sstream>using namespace std; pair<string, string> wor 阅读全文
posted @ 2023-05-29 18:33 EowynTang 阅读(8) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <string.h>#define MAX 500 #ifdef __unix#define fopen_s(pFile,filename,mode) ((*(pFile))=fopen((filename), (mode)))==NULL#en 阅读全文
posted @ 2023-05-06 17:01 EowynTang 阅读(31) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <stdlib.h>#include <string.h>#include <pthread.h>#include <semaphore.h> void* student_actions( void* student_id );void* ta_ 阅读全文
posted @ 2022-12-02 17:10 EowynTang 阅读(18) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <pthread.h> #include <stdlib.h> void *column_check(void *param); void *row_check(void *param); void *square_check(void *pa 阅读全文
posted @ 2022-11-28 15:50 EowynTang 阅读(67) 评论(0) 推荐(0)
摘要: 题目: 题目详情 - 1013 数素数 (20 分) (pintia.cn) 思路:既然要输出第M个素数和第N个素数中间的所有素数,那么我们先将前N个素数全部求出来,存储到一个数组中,然后输出这个数组的第M到第N个元素 这道题要注意的是输出的格式,我真的调了好久! 下面是AC的代码: #includ 阅读全文
posted @ 2021-12-10 16:38 EowynTang 阅读(56) 评论(0) 推荐(0)
摘要: 题目: 题目详情 - 1012 数字分类 (20 分) (pintia.cn) 这道题比较简单,就是按照数字除5的余数把数字分类,再在各个类下对数字做相应的操作——用的是switch结构。当然,普通if语句也是可以的 注意题目这句话很重要:若其中某一类数字不存在,则在相应位置输出 N 看了一下这个哥 阅读全文
posted @ 2021-12-10 09:07 EowynTang 阅读(65) 评论(0) 推荐(0)
摘要: 题目: 题目详情 - 1011 A+B 和 C (15 分) (pintia.cn) 这道题真的把我给整麻了。好简单的一道题。好麻。看了好久终于发现自己哪里搞错了,慢慢说。 首先审题:很简单,要求我们输入n组数字(n是用户自定义的整数),然后每组数字包含三个在给定区间 [−2^31,2^31] 内的 阅读全文
posted @ 2021-12-09 15:23 EowynTang 阅读(55) 评论(0) 推荐(0)
摘要: 题目: 题目详情 - 1010 一元多项式求导 (25 分) (pintia.cn) 我的代码: #include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { vector<i 阅读全文
posted @ 2021-11-27 13:04 EowynTang 阅读(29) 评论(0) 推荐(0)
摘要: 题目: 题目详情 - 1009 说反话 (20 分) (pintia.cn) 这道题乍一看还挺简单的,我的思路很明确,当时觉得可以用到栈,就是先进后出嘛,最后进的一个单词第一个输出来(简直是个小天才!) 但是栈只是数据结构C语言里面学的,难道我还要现写出栈和相关操作吗?当然不用哈哈,记得C++ ST 阅读全文
posted @ 2021-11-26 00:49 EowynTang 阅读(62) 评论(0) 推荐(0)