diff --git a/GESP/GESP2024年3月3级.pdf b/GESP/GESP2024年3月3级.pdf index 37a63c4..ae2edee 100644 Binary files a/GESP/GESP2024年3月3级.pdf and b/GESP/GESP2024年3月3级.pdf differ diff --git a/GESP/Test.cpp b/GESP/Test.cpp index ff6fd4e..32bd43f 100644 --- a/GESP/Test.cpp +++ b/GESP/Test.cpp @@ -1,26 +1,11 @@ #include using namespace std; - -// 学生的结构体 -struct Node { - string name; - int math; - int english; -}; - -// 函数实现 -bool cmp(Node &a, Node &b) { - if (a.math == b.math) - return a.english > b.english; // math相等,按endlish从大到小排序23 - return a.math > b.math; // 按math从大到小排序 -} - int main() { - // 先按math从大到小排序,math相等,按english从大到小排序 - Node a[4] = {{"XiaoMing", 67, 89}, {"LiLei", 90, 56}, {"ZhaoSi", 90, 99}}; - sort(a, a + 3, cmp); - for (int i = 0; i < 3; i++) - cout << a[i].name << " " << a[i].math << " " << a[i].english << endl; + int i; + for (i = 1; i < 20; i++) cout << "a"; + cout << endl; + + cout << i << endl; return 0; } \ No newline at end of file