diff --git a/GESP/GESP九月三级C++真题.pdf b/GESP/GESP九月三级C++真题.pdf index 47a590b..b97ed7f 100644 Binary files a/GESP/GESP九月三级C++真题.pdf and b/GESP/GESP九月三级C++真题.pdf differ diff --git a/TangDou/51NOD/Test.cpp b/TangDou/51NOD/Test.cpp index 6fa60e4..841ff8d 100644 --- a/TangDou/51NOD/Test.cpp +++ b/TangDou/51NOD/Test.cpp @@ -1,23 +1,17 @@ #include using namespace std; int main() { - int a = 10, b = 20; - - cout << "a<<8=" << (a << 8) << endl; - int x = 2560; - // 101000000000 - vector q; - while (x) { - q.push_back(x % 2); - x /= 2; + int n; + char mx = '0'; + cin >> n; + for (int i = 0; i < n; i++) { + string s; + cin >> s; + for (int i = 0; i < s.size(); i++) { + if (s[i] > mx) + mx = s[i]; + } + cout << (mx <= '1') << " " << (mx <= '7') << " " << (mx <= '9') << " " << (mx <= 'F') << endl; } - for (int i = q.size() - 1; i >= 0; i--) cout << q[i]; - cout << endl; - - a = (a << 8) | b; - - b = a >> 8; - a = a & 0xff; - cout << a << " " << b << endl; return 0; } \ No newline at end of file