
华为
无痕公子style
这个作者很懒,什么都没留下…
展开
-
华为_扑克牌大小
题目:扑克牌大小#include<bits/stdc++.h>using namespace std;int main(){ string line; while(getline(cin, line)) { if(line.find("joker JOKER") != string::npos) cout << "joker JOKER" << endl; // 对王是最大的牌 else { // 分开两手牌 int das原创 2021-08-26 22:45:09 · 120 阅读 · 0 评论 -
华为_简单错误记录
题目:简单错误记录#include<iostream>#include<string> #include<algorithm>#include<vector> using namespace std;inline bool compare(pair<string, int> a, pair<string, int> b){ return a.second > b.second; // 不能用a.second &g原创 2021-08-26 22:43:37 · 122 阅读 · 0 评论 -
华为_最高分是多少
题目:最高分是多少#include<iostream>#include<algorithm>using namespace std;int main(){ int N, M; char c; int A, B; while(cin >> N >> M) { int *a = new int[N]; for(int i=0; i<N; i++) cin >> a[i]; while(M--) {原创 2021-08-26 22:42:01 · 151 阅读 · 0 评论 -
华为_数独
题目:数独import java.util.*;//数独规则:每一行、每一列、每一个3*3小宫格的数字不能重复public class shudu { static int[][] G; static boolean[][] hang; static boolean[][] lie; static boolean[][] gong; static boolean flag = false; // 是否已经找到了一种解法,程序终止标志 public static void main(S原创 2021-08-26 22:40:09 · 169 阅读 · 0 评论 -
华为_字符集合
题目:字符集合#include<bits/stdc++.h>#include<map>#include<string.h>using namespace std; int main(){ char s1[101]; while(scanf("%s", s1) != EOF) { map<char, int> mp; // 如果value为数型,即使没有进行赋值操作,也一般会默认赋值为0 char s2[53]; int i,原创 2021-08-26 22:38:13 · 159 阅读 · 0 评论 -
华为_删数
题目:删数#include<bits/stdc++.h>#include<queue>using namespace std;int main(){ int n; while(cin >> n) { int count = 0, num; queue<int> q; for(int i=0; i<n; i++) q.push(i); while(!q.empty()) { num = q.front();原创 2021-08-26 22:36:55 · 117 阅读 · 0 评论 -
华为_进制转换_十六进制转十进制
题目:进制转换#include<iostream>#include<math.h>using namespace std;int main(){ int a; while(cin >> hex >> a) // C+= I/O流类库提供了一些操纵符,可以直接嵌入到输入输出语句中来实现I/O格式控制。 cout << a << endl; /*string s; while(cin >> s)原创 2021-08-26 22:34:43 · 270 阅读 · 0 评论 -
华为_明明的随机数
题目:明明的随机数#include<bits/stdc++.h>#include<set>using namespace std;int main(){ int n; while(cin>>n) { set<int> s; int elem; for(int i=0; i<n; i++) { cin>>elem; s.insert(elem); } /*for (int it:s)原创 2021-08-26 22:29:23 · 93 阅读 · 0 评论 -
华为_汽水瓶
题目:汽水瓶#include<bits/stdc++.h>using namespace std;int main(){ int a[10]; int n, count = 0; while(cin>>n) { if(!n) break; int kong, he, k, h; kong = n % 3; he = n / 3; kong += he; while(kong >= 3) { k = kong % 3; h原创 2021-08-26 22:25:55 · 106 阅读 · 0 评论