摘要: A 中奖 结构体排序就好了,我是用 pair ,存相反数 #include<bits/stdc++.h> using namespace std; int read() { int x = 0, f = 1, ch = getchar(); while ((ch < '0' || ch > '9') 阅读全文
posted @ 2022-07-05 19:10 PHarr 阅读(49) 评论(0) 推荐(0) 编辑
摘要: A. Division? a题就是简单的if语句就好了 n = int(input()) for i in range(n): x = int(input()) if x <= 1399: print("Division 4") elif x <= 1599: print("Division 3") 阅读全文
posted @ 2022-07-05 19:07 PHarr 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 20220701 SMU&CUIT友谊赛(题目来源2021ccpc女生赛) 阅读全文
posted @ 2022-07-05 16:02 PHarr 阅读(48) 评论(0) 推荐(0) 编辑
摘要: NC18386 字符串 这道题几乎就是双指针的模板题了。 每次移动一下左端点,然后移动右端点知道满足条件 #include<bits/stdc++.h> using namespace std; int v[300] = {}; int32_t main() { string s; cin >> s 阅读全文
posted @ 2022-07-05 15:21 PHarr 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 所有以`.`开头的文件或文件夹都是隐藏的 `.`是当前目录,`..`是父目录 `pwd`显示当前目录路径 绝对路径以`/`开头,绝对以当前目录下的文件开头 `cd`不加参数默认回到用户根目录 ``` (1) ctrl c: 取消命令,并且换行 (2) ctrl u: 清空本行命令 (3) tab键: 阅读全文
posted @ 2022-06-27 23:43 PHarr 阅读(44) 评论(0) 推荐(0) 编辑
摘要: A - A to Z String 2 签到 #include <bits/stdc++.h> using namespace std; int read(){ int x = 0 , ch = getchar(); while( ch < '0' || ch > '9' ) ch = getcha 阅读全文
posted @ 2022-06-27 20:29 PHarr 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 简单的 git 入门 阅读全文
posted @ 2022-06-27 14:55 PHarr 阅读(50) 评论(0) 推荐(0) 编辑
摘要: A - 2^N 签到 #include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << ( 1 << n ) << endl; } B - Batters 按照要求模拟一下 n = int(input 阅读全文
posted @ 2022-06-25 13:17 PHarr 阅读(36) 评论(0) 推荐(0) 编辑
摘要: # 基础语法 ## Java程序语句执行的顺序 Java包括4种基本控制结构:顺序结构、选择结构、循环结构、异常处理逻辑结构 (如果是三个空就是:顺序、选择、循环) ## 权限修饰符 public:类内部、本包、子类、外部包 protected:类内部、本包、子类、外部包 default:类内部、本 阅读全文
posted @ 2022-06-22 16:53 PHarr 阅读(56) 评论(0) 推荐(0) 编辑
摘要: A - Move Right 给一个四位的二进制,输出右移一位的结果 #include <bits/stdc++.h> using namespace std; int n; string s ; int main() { cin >> s; cout << '0'; for( int i = 0 阅读全文
posted @ 2022-05-24 16:55 PHarr 阅读(29) 评论(0) 推荐(0) 编辑