摘要: 签到题。 int n; int main() { cin>>n; int res=0; for(int i=0;i<n;i++) { int score,w; cin>>w>>score; res+=w*score; } cout<<max(res,0)<<endl; //system("pause 阅读全文
posted @ 2021-03-14 12:08 Dazzling! 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 思路 枚举$1 \sim 9$的全排序 枚举分界处的位置 时间复杂度:\(O(9! \times 9 \times C_8^3)\) int path[10]; bool vis[10]; int n; int ans; void dfs(int u) { if(u == 9) { int a=0; 阅读全文
posted @ 2021-03-14 11:45 Dazzling! 阅读(74) 评论(0) 推荐(0) 编辑