提交记录 22449
提交时间 |
评测时间 |
2024-09-01 13:33:18 |
2024-09-01 13:33:25 |
#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;}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 16.52 us | 24 KB | Accepted | Score: 25 | 显示更多 |
Testcase #2 | 151.865 ms | 42 MB + 308 KB | Accepted | Score: 25 | 显示更多 |
Testcase #3 | 1.264 s | 42 MB + 308 KB | Accepted | Score: 25 | 显示更多 |
Testcase #4 | 2.369 s | 42 MB + 308 KB | Accepted | Score: 25 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2024-12-05 10:44:15 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠