# NCC 學習單 ###### tags: `ntu-cup-chhs` ## C++ input type checking ```c++= #include <iostream> using namespace std;; int main() { int a = 0, b = 0; cin >> a; if (cin.fail()) cin.ignore(); else cin >> b; cout << a << " " << b << endl; } ``` 使用 `cin.fail()` 來判定是否輸入失敗,並用 `cin.ignore()` 把 input buffer 清空。 # ==WIP== ## 神奇數學 ### matrix multiplication ### 二的冪 #### CLZ ## 萬用工具 ### sort ### find ### bruteforce ### array ### C++ 函式庫 `#include <algorithms>` ### numerical operations ### string operations ## 基本概念 ### memory ### data type #### bitwise for integer ### ASCII, string #### more bitwise
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up