酷代码 AI
菜单
服务商
DeepSeek字节豆包讯飞星火
更多选项

C++实现小核桃通道扫描未扫描区域查找

```cpp #include <iostream> using namespace std; int main() { int n; cin >> n; bool scanned[11] = {false}; // 初始化所有区域为未扫描 for (int i = 0; i < n; i++) { int x, y; cin >> x >> y; for (int j = x; j <= y; j++) { scanned[j] = true; // 标记扫描过的区域 } } bool first = true; for (int i = 1; i <= 10; i++) { if (!scanned[i]) { if (!first) { cout << " "; } cout << i; first = false; } } cout << endl; return 0; } ``` ######[AI问答 | 221点数解答 | 2026-05-01 15:51:01]

相关提问
本站限时免费提问中
实用工具查看更多
Linux在线手册 [开发类]
Jquery在线手册 [开发类]
今日油价 [生活类]
图片互转base64 [开发类]
时间转换器 [开发类]