#include<iostream>usingnamespace std;int r, y, g, n, k, t, sumTime;intmain(){cin >> r >> y >> g >> n;for(size_t i =0; i < n; i++){cin >> k >> t;if(k ==0)sumTime += t;elseif(k==1)sumTime += t;elseif(k==2)sumTime +=(t + r);}cout << sumTime;return0;}
文章目录 题意思路代码 题意
题目链接 查找未出现在orders表里面的内容
思路
子查询not in
代码
select name as Customers from Customers where id not in (select customerId from Orders group by customerId)
给你一个链表的头节点 head 和一个特定值 x ,请你对链表进行分隔,使得所有 小于 x 的节点都出现在 大于或等于 x 的节点之前。 你应当 保留 两个分区中每个节点的初始相对位置。 示例 1: 输入:head [1,4,3,2,5,2], x 3
输出&…