随笔分类 - PTA B
摘要:#include<iostream> using namespace std; const int maxn=1000001; int prime[maxn],num=0; bool p[maxn]={0}; //找出素数 void findprime(int n){ for(int i=2;i<m
阅读全文
摘要://之前是想这样写的,用sscanf和sprintf。但是部分错误,有两个点错误,一个运行时错误 PS:sprintf转成的是字符串不是单个字符吗?。因为是字符串转,所以忽略了如1000-0001=900等问题,还 超时了// 老老实实的用各位相加吧来自大佬的告诫:https://www.cnblo
阅读全文
摘要:#include<cstdio> #include<cstring> const int maxn=100010; const int MOD=1000000007; char str[maxn]; int leftnump[maxn]={0}; int main() { //gets(str);
阅读全文
摘要:#include<cstdio> #include<algorithm> using namespace std; struct moodcake{ double store; double sell; double price; }cake[1010]; bool cmp(moodcake a,m
阅读全文

浙公网安备 33010602011771号