×
解除綁定,重新設定系統帳號的密碼
您的系統帳號 ID:
您的系統帳號:
您的帳號暱稱:
設定新密碼:
設定新密碼:
×
請輸入要加入的「課程代碼」
請向開設課程的使用者索取「課程代碼」
分類題庫
解題動態
排行榜
討論區
競賽區
登入
註冊
發表新討論
解題報告
#45948: 不用map用set就可以了
1121228@stu.wghs.tp.edu.tw
(你知道我是誰嗎!!??)
學校 : 臺北市立建國高級中學
編號 : 266561
×
傳送站內訊息
傳給:
主題:
內容:
來源 : [60.248.154.139]
最後登入時間 :
2025-05-14 12:52:11
o337.
YTPizza
| From: [60.248.154.139] | 發表日期 : 2025-05-02 12:50
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
set<int> m;
int N, topping;
cin >> N;
while(N--){
cin >> topping;
if(m.find(topping)!=m.end()){
continue;
}else{
cout << topping << ' ';
m.insert(topping);
}
}
return 0;
}
ZeroJudge Forum