ICode9

精准搜索请尝试: 精确搜索
  • 1041 [SCOI2005]繁忙的都市 kruskal 最小生成树2022-08-22 06:00:59

     链接:https://ac.nowcoder.com/acm/contest/26077/1041来源:牛客网 题目描述 城市C是一个非常繁忙的大都市,城市中的道路十分的拥挤,于是市长决定对其中的道路进行改造。 城市C的道 路是这样分布的:城市中有n个交叉路口,有些交叉路口之间有道路相连,两个

  • 1041 Be Unique (20分)2022-07-10 23:06:21

    Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1,104]. The first one who bets on a unique number wins. For example, if there are 7 people

  • 1041 考试座位号2022-07-08 22:35:53

    代码 #include <iostream>#include <cstdio>#include <string>#include <map>​using namespace std;​​int main(){ string a; int b,c; int m,n; int d; map<int,string> mp1; map<int,int> mp2; cin>>n; fo

  • PAT_A 1041 Be Unique2022-06-29 00:01:11

    PAT_A 1041 Be Unique 分析 建立对应的关系按要求统计分析即可满足题目的要求。 PAT_A 1041 Be Unique 题目的描述 Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number

  • PAT 1041 Be Unique (20 分)2022-01-27 21:04:15

    #include<iostream> using namespace std; int main(){ int a[100001], m[100000]; int n; scanf("%d", &n); for(int i = 0; i < n; i++) { scanf("%d", &a[i]); m[a[i]]++; } for(int i = 0;

  • [Leetcode 1041]机器人围成圈 Robot Bounded In Circle2021-11-28 01:03:51

    题目 机器人从(0,0)出发,初始化向北 三种指令 G当前方向+1步,L左转90度,R右转90度 问指令结束后是否成圆圈(只有可能回原点时才成圈) 返回true/false On an infinite plane, a robot initially stands at (0, 0) and faces north. The robot can receive one of three instructions: "

  • 1041 Be Unique (20 分)【难度: 简单 / 知识点: 暴力】2021-09-26 10:58:23

    https://pintia.cn/problem-sets/994805342720868352/problems/994805444361437184 #include<bits/stdc++.h> using namespace std; const int N=1e5+10; int a[N],n; map<int,int>mp; int main(void) { cin>>n; for(int i=0;i<n;i++) cin>>a[i

  • 1041 考试座位号 (15 point(s))2021-08-31 19:31:05

    #include <bits/stdc++.h> using namespace std; struct Stu{ long long id; int num; }; int main() { int n, m; map<int ,Stu> stu; // 读取考生人数 cin >> n; // 读取准考证号 试机号 座位号 while(n--){ long long id; int i, num; cin >> id

  • 信息学奥赛一本通题库 题号:1041:奇偶数判断2021-05-08 18:57:15

    信息学奥赛一本通题库 题号:1041:奇偶数判断 题号:1041:奇偶数判断 时间限制: 1000 ms 内存限制: 65536 KB 题目描述: 给定一个整数,判断该数是奇数还是偶数。如果n是奇数,输出odd;如果n是偶数,输出even。 输入: 输入仅一行,一个大于零的正整数n。 输出: 输出仅一行,如果n是奇数,输出odd;如

  • PAT 甲级 1041 Be Unique2021-03-15 14:57:07

    PAT 甲级 1041 Be Unique #include <bits/stdc++.h> using namespace std; int main() { #ifdef LOCAL freopen("input.txt", "r", stdin); #endif vector<int> book(10010, 0); int n = 0; cin >> n; vector<int

  • 10412021-02-27 22:33:44

    #include<stdio.h> #include<math.h> int main() { int n,i; double sum,a; scanf("%d",&n); sum=0.0; a=1.0; for(i=1;i<=(2*n-1);i+=2) { sum+=a/i; a=-a; } printf(&

  • PAT乙级1041题解2021-02-25 10:05:10

    题目详情: 1041 考试座位号 (15 分) 每个 PAT 考生在参加考试时都会被分配两个座位号,一个是试机座位,一个是考试座位。正常情况下,考生在入场时先得到试机座位号码,入座进入试机状态后,系统会显示该考生的考试座位号码,考试时考生需要换到考试座位就座。但有些考生迟到了,试机已经结

  • 1041 考试座位号 (15 分)2021-02-12 13:04:30

    水题~。 const int N=1010; struct Node { string id; int try_id; int test_id; }a[N]; map<int,Node> mp; int n,m; int main() { cin>>n; for(int i=0;i<n;i++) { cin>>a[i].id>>a[i].try_id>>a[i].test

  • [LeetCode] 1041. Robot Bounded In Circle2020-09-18 08:02:53

    On an infinite plane, a robot initially stands at (0, 0) and faces north.  The robot can receive one of three instructions: "G": go straight 1 unit; "L": turn 90 degrees to the left; "R": turn 90 degress to the right. The r

  • 1041 考试座位号 (15分)2020-03-15 20:05:49

      每个 PAT 考生在参加考试时都会被分配两个座位号,一个是试机座位,一个是考试座位。正常情况下,考生在入场时先得到试机座位号码,入座进入试机状态后,系统会显示该考生的考试座位号码,考试时考生需要换到考试座位就座。但有些考生迟到了,试机已经结束,他们只能拿着领到的试机座位号码

  • 1041 考试座位号2020-02-19 18:03:56

    水题。发现PAT考察hash很多。 #include<iostream> #include<unordered_map> using namespace std; struct Student { string id;//学号 int sitNum;//考试座位号 }; int main() { int n,index;//试机座位号 Student stu; cin>>n; unordered_map<in

  • 1041 Be Unique (20分)2020-02-07 09:39:02

    题目 分析 要点 知识点 题解 #include <cstdio> using namespace std; int a[100001], m[100000]; int main() { int n; scanf("%d", &n); for(int i = 0; i < n; i++) { scanf("%d", &a[i]); m[a[i]]++; } fo

  • 1041 考试座位号 (15分)2020-02-02 16:01:48

    #include <string.h> #include <iostream> using namespace std; struct STU { char stu_no[18]; int test_seat; int seat; }; int main() { int n,m; struct STU stu[1005]; int m_seat[1005]; cin>>n; for(int i=0;i&

  • 1041:奇偶数判断2020-01-20 20:09:04

      【题目描述】  给定一个整数,判断该数是奇数还是偶数。如果n是奇数,输出odd;如果n是偶数,输出even。 【输入】 输入仅一行,一个大于零的正整数n。 【输出】 输出仅一行,如果n是奇数,输出odd;如果n是偶数,输出even。 【输入样例】 5 【输出样例】 odd #if(1) #include <iostr

  • (甲)1041 Be Unique (20 分)2019-09-03 16:41:47

    题目: Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1,10​4​​]. The first one who bets on a unique number wins. For example, if there a

  • 1041 考试座位号 (15 分)2019-08-28 13:43:20

    每个 PAT 考生在参加考试时都会被分配两个座位号,一个是试机座位,一个是考试座位。正常情况下,考生在入场时先得到试机座位号码,入座进入试机状态后,系统会显示该考生的考试座位号码,考试时考生需要换到考试座位就座。但有些考生迟到了,试机已经结束,他们只能拿着领到的试机座位号码求

  • LeetCode-1041. 困于环中的机器人2019-08-12 19:40:21

    在无限的平面上,机器人最初位于 (0, 0) 处,面朝北方。机器人可以接受下列三条指令之一: "G":直走 1 个单位 "L":左转 90 度 "R":右转 90 度 机器人按顺序执行指令 instructions,并一直重复它们。 只有在平面中存在环使得机器人永远无法离开时,返回 true。否则,返回 false。   示例

  • LightOJ - 1041:Road Construction (最短路+字符串处理)2019-08-11 10:04:52

    https://vjudge.net/problem/LightOJ-1041 There are several cities in the country, and some of them are connected by bidirectional roads. Unfortunately, some of the roads are damaged and cannot be used right now. Your goal is to rebuild enough of the damage

  • leetcode 1041 困于环中的机器人2019-07-29 09:36:20

    这个起始就是搞清楚机器人朝每个方向的运动步数就ok了,因为没有障碍物,所以只是需要统计方向和步数就行了。 ### 题目 在无限的平面上,机器人最初位于 (0, 0) 处,面朝北方。机器人可以接受下列三条指令之一: "G":直走 1 个单位 "L":左转 90 度 "R":右转 90 度 机器人按顺序执行指令

  • 1041 Be Unique (20 分)2019-07-19 20:41:28

    1041 Be Unique (20 分) Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1,10​4​​]. The first one who bets on a unique number wins. For

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有