124047<\/a><\/em><\/p>\nT1 100pts<\/h1>\n
\u901a\u8fc7\u6570\u5b66\u8ba1\u7b97\u4e00\u4e0b\u9ad8\u5ea6\u5373\u53ef<\/p>\n
#include <iostream>\nusing namespace std;\nconst int maxn = 1e5 + 5;\n\nint n, T;\nint v[maxn], t[maxn], high[maxn];\n\nint main() {\n ios::sync_with_stdio(0);\n cin.tie(0);\n cout.tie(0);\n cin >> n >> T;\n for(int i = 1; i <= n; i++) {\n cin >> v[i] >> t[i];\n high[i] = max(T - t[i], 0) * v[i];\n }\n int minHigh = -1, index;\n for(int i = 1; i <= n; i++) {\n if(high[i] > minHigh) {\n minHigh = high[i];\n index = i;\n }\n }\n cout << index << endl;\n}<\/code><\/pre>\nT2 100pts<\/h1>\n
\u901a\u8fc7\u5206\u6790\u9898\u76ee\u53ef\u77e5\uff1a<\/p>\n
\n- \u5982\u679c\u4fa6\u6d4b\u5230\u51b0\u5ddd\u7b2c\u4e00\u6b21\u878d\u5316\uff0c\u8f93\u51fa\u6700\u8fd1\u4e00\u4e2a\u8fd8\u6ca1\u6709\u878d\u5316\u7684\u51b0\u5ddd\u5373\u53ef\u3002<\/li>\n
- \u5982\u679c\u6240\u6709\u51b0\u5ddd\u5747\u878d\u5316\u5219\u65e0\u89e3<\/li>\n
- \u5982\u679c\u4fa6\u6d4b\u5230\u51b0\u5ddd\u4e0d\u662f\u7b2c\u4e00\u6b21\u878d\u5316\uff0c\u4e3a\u4e86\u4f7f\u5b57\u5178\u5e8f\u6700\u5c0f\u8f93\u51fa 1 \u5373\u53ef\uff0c\u524d\u63d0\u662f\u51b0\u5ddd 1 \u5df2\u7ecf\u878d\u5316\uff0c\u5426\u5219\u65e0\u89e3\u3002<\/li>\n<\/ul>\n
#include <iostream>\n#include <vector>\nusing namespace std;\n#define F "No solution"\n\nint n, m;\nchar info[1000005];\nvector<int> ans;\n\nint main() {\n ios::sync_with_stdio(0);\n cin.tie(0);\n cout.tie(0);\n cin >> n >> m;\n cin >> info;\n int now = 1;\n for(int i = 0; i < m; i++) {\n if(info[i] == 'N') {\n ans.push_back(now++);\n }\n else {\n if(now == 1) {\n cout << F << endl;\n return 0;\n }\n ans.push_back(1);\n }\n }\n if(now > n + 1) {\n cout << F << endl;\n return 0;\n }\n for(int i = 0; i < ans.size(); i++) {\n cout << ans[i] << " ";\n }\n return 0;\n}<\/code><\/pre>\nT3 100pts<\/h1>\n
\u7528\u7684 STL \u505a\u7684\uff0c\u9898\u76ee\u6d89\u53ca\u5230\u521d\u4e2d\u6570\u5b66\u4e00\u6b21\u51fd\u6570<\/p>\n
\u4ee4 $y_1 = k_1x + b_1$\uff0c$y_2 = k_2x + b_2$<\/p>\n
\u5982\u679c\u4e24\u6761\u76f4\u7ebf\u4ec5\u6709\u4e00\u4e2a\u4ea4\u70b9\uff0c\u5219\uff1a<\/p>\n