保研机试
撒旦即可
研究CV的菜狗
展开
-
NOI 1.6.14:求10000以内n的阶乘(高精度乘法,模板)
链接:http://noi.openjudge.cn/ch0106/solution/20690049/#include<bits/stdc++.h>using namespace std;int s[10000009];int main(){ //freopen("t.txt","r",stdin); int n; scanf("%d",&n); mem...原创 2019-08-25 00:25:35 · 482 阅读 · 0 评论 -
B:打印月历
链接:http://bailian.openjudge.cn/xly2019/B/解题思路:闰年判断方法:能被4整除但不能被100整除,或者能被400整除。1900年1月1日是周一。#include<bits/stdc++.h>using namespace std;bool judge(int y){ if((y%400==0)||(y%4==0&&a...原创 2019-08-27 10:44:48 · 362 阅读 · 0 评论 -
1.12.07:机器翻译(模拟题)
链接:http://noi.openjudge.cn/ch0112/07/太久没打代码了,连queue没有iterator都忘了!#include<bits/stdc++.h>using namespace std;vector<int> q;vector<int>::iterator it;int main(){ //freopen("t...原创 2019-08-26 22:19:34 · 667 阅读 · 0 评论 -
1.11.02:二分法求函数的零点(二分法求函数解)
链接:http://noi.openjudge.cn/ch0111/02/#include<bits/stdc++.h>using namespace std;double f(double x){ double x1[6]; x1[1]=x; for(int i=2;i<=5;i++) x1[i]=x1[i-1]*x; return x1[5]- 15 *...原创 2019-08-26 21:56:57 · 872 阅读 · 0 评论 -
1.10.08:病人排队(稳定排序,stable_sort)
链接:http://noi.openjudge.cn/ch0110/08/#include<bits/stdc++.h>using namespace std;struct node{ string id; int age,k;}s[150];bool cmp(node a,node b){ /*if(a.age>=60&&b.age>...原创 2019-08-26 21:43:46 · 659 阅读 · 0 评论 -
1.10.10:单词排序(字符串去重和排序)
链接:http://noi.openjudge.cn/ch0110/solution/20706941/还有读入比较,compare函数。以前没注意到string还能直接用sort来排序,很方便!!!#include<cstring>#include<iostream>#include<cstdio>#include<algorithm&g...原创 2019-08-26 18:19:12 · 852 阅读 · 0 评论 -
1.8.23:二维数组回形遍历(纯遍历)
链接:http://noi.openjudge.cn/ch0108/23/#include<bits/stdc++.h>using namespace std;int s[200][200],vis[200][200];int dir[2][4]={{0,1,0,-1},{1,0,-1,0}};int main(){ int n,m; //freopen("t.tx...原创 2019-08-26 16:12:10 · 872 阅读 · 0 评论 -
1.8.13:图像模糊处理(四舍五入参考一下)
链接http://noi.openjudge.cn/ch0108/13/#include<bits/stdc++.h>using namespace std;double s[105][105],s1[105][105];int main(){ //freopen("t.txt","r",stdin); int n,m; scanf("%d%d",&n,&a...原创 2019-08-26 15:33:32 · 304 阅读 · 0 评论 -
NOI 1.7.32:行程长度编码(字符串,使用toupper)
链接:http://noi.openjudge.cn/ch0107/32/toupper和tolower函数字符转大写和转小写#include<ctype.h>#include<cstdio>#include<cstring>using namespace std;char s[1500];int main(){ //freopen("t...原创 2019-08-26 15:01:28 · 299 阅读 · 0 评论 -
NOI1.7.34:回文子串(字符串,暴力判断)
链接http://noi.openjudge.cn/ch0107/34/#include<bits/stdc++.h>using namespace std;bool judge(string s){ int n=s.size()-1; int fg=1; for(int i=0;i<s.size();i++) { if(s[i]!=s[n-i]) {...原创 2019-08-26 14:46:18 · 368 阅读 · 0 评论 -
机试NOI 1.6.15:阶乘和(高精度)
链接http://noi.openjudge.cn/ch0106/15/#include<bits/stdc++.h>using namespace std;int s[500],s1[500];int main(){ int n; scanf("%d",&n); int fg=1; memset(s,0,sizeof(s)); s[1]=1; mem...原创 2019-08-22 14:12:39 · 368 阅读 · 0 评论 -
字符串函数总结
一.strncmp下面是 strncmp() 函数的声明。int strncmp(const char *str1, const char *str2, size_t n)参数str1-- 要进行比较的第一个字符串。 str2-- 要进行比较的第二个字符串。 n-- 要比较的最大字符数。返回值该函数返回值如下:如果返回值 < 0,则表示 str1 小于 ...原创 2019-08-26 00:18:26 · 180 阅读 · 0 评论 -
NOI 1.7.28:单词倒排(字符串)
链接:http://noi.openjudge.cn/ch0107/28/#include"bits/stdc++.h"using namespace std;int main(){ //freopen("t.txt","r",stdin); string s; getline(cin,s); int n=s.size(); s=' '+s; ...原创 2019-08-26 00:00:57 · 592 阅读 · 0 评论 -
1.7.30:字符环(字符串,求公共子串)
链接:http://noi.openjudge.cn/ch0107/30/#include<iostream>#include<string.h>using namespace std;int len1,len2,cnt=0;char a[300],b[300];int main(){ cin>>a>>b; len1=...原创 2019-08-25 10:04:46 · 427 阅读 · 0 评论 -
NOI 1.6.10:大整数加法(高精度加法,模板)
链接http://noi.openjudge.cn/ch0106/solution/20690094/#include<bits/stdc++.h>using namespace std;char s1[201],s2[201];int s3[201],s4[201],s5[209];int main(){ //freopen("t.txt","r",stdin);...原创 2019-08-25 00:48:11 · 457 阅读 · 1 评论