提交记录 22448


用户 题目 状态 得分 用时 内存 语言 代码长度
qwqwqwq router32. 测测你的路由器 Wrong Answer 25 2.362 s 43316 KB C++17 357 B
提交时间 评测时间
2024-09-01 13:31:08 2024-09-01 13:31:14
#pragma GCC optimize("Ofast")
#include"router.h"
#include<unordered_map>
std::unordered_map<unsigned,unsigned>a[33];
void init(int b,int,const RoutingTableEntry*c){for(int d=0;d<b;d++)a[c[d].len][c[d].addr]=c[d].nexthop;}
unsigned query(unsigned b){for(int c=32;c;c--,b&=~(1u<<(c>>3<<3|~c&7)))if(auto d=a[c].find(b);d!=a[c].end())return d->second;return 0;}

CompilationN/AN/ACompile OKScore: N/A

Testcase #115.06 us24 KBAcceptedScore: 25

Testcase #2152.356 ms42 MB + 308 KBWrong AnswerScore: 0

Testcase #31.256 s42 MB + 308 KBWrong AnswerScore: 0

Testcase #42.362 s42 MB + 308 KBWrong AnswerScore: 0


Judge Duck Online | 评测鸭在线
Server Time: 2025-07-12 21:20:55 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠