首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
课程
专栏·文章
竞赛
搜索
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
在线笔面试、雇主品牌宣传
登录
/
注册
猫猫猫1
获赞
8
粉丝
1
关注
32
看过 TA
71
男
中国科学院计算技术研究所
2027
人工智能
IP属地:福建
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑猫猫猫1吗?
发布(82)
刷题
猫猫猫1
2022-12-06 21:43
中国科学院计算技术研究所 电子信息类
2022-12-06
在牛客打卡4天,今天也很努力鸭!
0
点赞
评论
收藏
转发
猫猫猫1
2022-11-30 16:01
已编辑
中国科学院计算技术研究所 电子信息类
Gas Station
链接:https://www.nowcoder.com/questionTerminal/aba54c5142454a4f830b3eb93dd71d3a 来源:牛客网 转载大佬的。 这题一开始我根本没理解题意(难受),后来才发现是让house到station的最短距离达到最大,然后在根据平均距离排序。还有坑的地方在于牛客输入数据会有重复边,遇到重复时要选最小的边权。然后,理解 了题意后还是好写的,就是坑太多。 #include<bits/stdc++.h> using namespace std; const int maxn=1e3+20; const int INF=0x3f...
0
点赞
评论
收藏
转发
猫猫猫1
2022-11-29 22:59
中国科学院计算技术研究所 电子信息类
Public Bike Management
#include<bits/stdc++.h> using namespace std; const int Max=510; const int INF=INT_MAX; int c,n,sp,m; int dis[Max],weight[Max],minNeed=INF,minRemain=INF; int G[Max][Max]; bool visit[Max]; vector<int> pre[Max]; vector<int> path,temp; void Dijistra() { fill(dis,dis+Max,INF); dis[0...
0
点赞
评论
收藏
转发
猫猫猫1
2022-11-29 20:27
中国科学院计算技术研究所 电子信息类
Travel plan
#include<bits/stdc++.h> using namespace std; const int Max=510; const int INF=INT_MAX; int n,m,s,t,sum=INF; vector<int> pre[Max]; vector<int> path,temp; int G[Max][Max],cost[Max][Max]; int dis[Max]; bool visit[Max]; void Dijistra() { fill(dis,dis+Max,INF); dis[s]=0; for(int i...
0
点赞
评论
收藏
转发
猫猫猫1
2022-11-27 15:28
中国科学院计算技术研究所 电子信息类
Social Cluster
#include<bits/stdc++.h> using namespace std; const int Max=1010; int father[Max]; int height[Max]; int n,course[Max],isroot[Max]; void Initial() { for(int i=1; i<=n; i++) { father[i]=i; height[i]=0; } } int Find(int x) { if(x!=father[x]) { father[x]=Find(father[x]); } return f...
0
点赞
评论
收藏
转发
猫猫猫1
2022-11-23 16:45
已编辑
中国科学院计算技术研究所 电子信息类
Invert a Binary Tree
#include<bits/stdc++.h> using namespace std; const int Max=50; int n,num; bool notroot[Max]; struct Node { int lchild,rchild; } node[Max]; void print(int id){ printf("%d",id); num++; if(num<n) printf(" "); else printf("\n"); } void postorder(int root) { if(root==-1) { return ; ...
0
点赞
评论
收藏
转发
猫猫猫1
2022-11-22 20:24
中国科学院计算技术研究所 电子信息类
反转链表
#include<bits/stdc++.h> using namespace std; const int Max=1e5+10; struct Node { int data; int next; } node[Max]; int main() { int s1,n,k; scanf("%d %d %d",&s1,&n,&k); int address; for(int i=0; i<n; i++) { scanf("%d ",&address); scanf("%d %d",&node[address]....
0
点赞
评论
收藏
转发
猫猫猫1
2022-11-22 11:56
已编辑
中国科学院计算技术研究所 电子信息类
Integer Factorization
#include<bits/stdc++.h> using namespace std; int n,k,p,maxfacsum=-1; vector<int> ans,temp,fac; void Init() { int t=0,i=0; while(t<=n) { fac.emplace_back(t); t=pow(++i,p); } } void DFS(int index,int nowk,int sum,int facsum) { if(sum==n&&nowk==k) { if(maxfacsum<f...
0
点赞
评论
收藏
转发
猫猫猫1
2022-11-19 20:59
中国科学院计算技术研究所 电子信息类
火星数字
#include<bits/stdc++.h> using namespace std; string numTostr[170]; map<string,int> strTonum; string unitDigit[13]={"tret","jan","feb","mar","apr","may","jun","jly","aug","sep","oct","nov","dec"}; string tenDigit[13]={"tret","tam","hel","maa","huh","tou","kes","hei","elo","syy","lok","me...
0
点赞
评论
收藏
转发
猫猫猫1
2022-11-16 21:41
中国科学院计算技术研究所 电子信息类
Have Fun with Numbers
#include<bits/stdc++.h> using namespace std; struct bign { int d[100]; int len; bign() { memset(d,0,sizeof(d)); len=0; } }; bign change(string str) { bign a; a.len=str.size(); for(int i=0; i<a.len; i++) { a.d[i]=str[a.len-1-i]-'0'; } return a; } bign mul(bign a,int b) { b...
0
点赞
评论
收藏
转发
猫猫猫1
2022-11-16 16:35
中国科学院计算技术研究所 电子信息类
Rational Arithmetic 不难但很长
#include<bits/stdc++.h> using namespace std; typedef long long LL; struct Fraction { LL up,down; } ans1,ans2,ans3,ans4,x,y; LL gcd(LL a,LL b) { return b==0?a:gcd(b,a%b); } Fraction reduction(Fraction a) { if(a.down<0) { a.up=-a.up; a.down=-a.down; } if(a.up==0) { a.down=1; }...
0
点赞
评论
收藏
转发
猫猫猫1
2022-11-10 20:25
已编辑
中国科学院计算技术研究所 电子信息类
输出PATest
字符可以作为数组下标 #include<bits/stdc++.h> using namespace std; int hashtable[128]; char a[6]= {'P','A','T','e','s','t'}; int main() { string str; cin>>str; int n=str.size(),sum=0; for(int i=0; i<n; i++) { char c=str[i]; for(int j=0; j<6; j++) { if(c==a[j]) { hashtable[c]+...
0
点赞
评论
收藏
转发
猫猫猫1
2022-11-10 19:08
中国科学院计算技术研究所 电子信息类
编程团体赛
数组可以替代map<int,int> #include<bits/stdc++.h> using namespace std; int main() { int stu[1010]={0}; int n; scanf("%d",&n); int id1,id2,score; for(int i=0; i<n; i++) { scanf("%d-%d %d",&id1,&id2,&score); stu[id1]+=score; } int index=0; for(i...
0
点赞
评论
收藏
转发
猫猫猫1
2022-11-06 15:38
中国科学院计算技术研究所 电子信息类
数字加密
#include<bits/stdc++.h> using namespace std; int main() { string a,b,answer; cin>>a>>b; reverse(a.begin(),a.end()); reverse(b.begin(),b.end()); int n=a.size(),m=b.size(); int L=max(n,m); for(int i=0;i<L;i++){ int num1=i<n?a[i]-'0':0; int num2=i<m?b[i]-'0':0; ...
0
点赞
评论
收藏
转发
猫猫猫1
2022-11-03 20:38
中国科学院计算技术研究所 电子信息类
考试座位号 直白的解法
#include<bits/stdc++.h> using namespace std; const int Max=1010; struct T { string id; int a; int b; } t[Max]; int main() { int n; cin>>n; for(int i=0; i<n; i++) { cin>>t[i].id>>t[i].a>>t[i].b; } int m; cin>>m; for(int i=0; i<m; i++) { int x...
0
点赞
评论
收藏
转发
1
2
3
4
5
6
工具箱
TA的圈子
暂未加入圈子
TA的圈子
TA的笔记
暂无笔记
TA的笔记
登录
0
天
已登录
0
天
连续登录
0
人
今日访客
牛客网
牛客企业服务