我有一個想法 如果我有小孩而那個小孩跟我一樣皮我應該會掐死他
看來哪天 AWS 發展出成熟的 auto scaling 機制,他們就能預測天災ㄌ
vector<int> output{};
for(int x: input) {
output.emplace_back(x);
!x && output.emplace_back(x);
}
return output;
你 WA 完還會發現你把 87.69% 的人還要慢
屁啦 eBPF Linux Kernel 相對來說超新ㄉ
話說我每次都覺得資訊圈黑話有夠多(
太空則全部都是縮寫 Google 第一頁還查不到的那種
484 該來個轉譯 bot 了
很多packet filter/parser都是PBF
原本想要寫windows kernel driver來搞歪瓜
前陣子寫了user modeㄉ破破 external 歪瓜
我記得他文件都說他依照 VM 的 Interface 還啥去寫ㄌ
然後那個 processhider 還會鎖住一堆檔案
我覺得是leet code把uninitial的memory都寫成怪值
還是我加個位置是 -1 的 _head,真正的 head 在 _head.next 的地方
why not paste all code to telegram rather than screenshot
struct Node {
int val;
Node* next;
};
class MyLinkedList {
public:
Node* head;
/** Initialize your data structure here. */
MyLinkedList() {
head = new Node;
}
/** Get the value of the index-th node in the linked list. If the index is invalid, return -1. */
int get(int index) {
Node* curr = head;
while(index > 0){
if(curr -> next){
curr = curr -> next;
index--;
}else{
return -1;
}
}
if(!curr) return -1;
return curr -> val;
}
/** Add a node of value val before the first element of the linked list. After the insertion, the new node will be the first node of the linked list. */
void addAtHead(int val) {
Node* newHead = new Node;
newHead -> val = val;
newHead -> next = head;
head = newHead;
}
/** Append a node of value val to the last element of the linked list. */
void addAtTail(int val) {
Node* curr = head;
Node* last = new Node;
last -> val = val;
while(curr -> next){
curr = curr -> next;
}
curr -> next = last;
}
/** Add a node of value val before the index-th node in the linked list. If index equals to the length of linked list, the node will be appended to the end of linked list. If index is greater than the length, the node will not be inserted. */
void addAtIndex(int index, int val) {
}
/** Delete the index-th node in the linked list, if the index is valid. */
void deleteAtIndex(int index) {
}
};
/**
* Your MyLinkedList object will be instantiated and called as such:
* MyLinkedList* obj = new MyLinkedList();
* int param_1 = obj->get(index);
* obj->addAtHead(val);
* obj->addAtTail(val);
* obj->addAtIndex(index,val);
* obj->deleteAtIndex(index);
*/
話說每次看各種Linkedlist的code感覺都可以pwn (X
但我覺得照你的十座應該要head=nullptr就好
input第一行好像是call funtion的順序
然後addAtTail while(curr -> next){ 也不對吧(?
Line 47: Char 17: runtime error: member access within null pointer of type 'Node' (solution.cpp)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior prog_joined.cpp:52:17
但你直接在constructor就new了一個Node,那就不用特判了
如果我直接加一個隱藏的 _head 會不會比較省事ㄚ
小改了一下大概像這樣吧,沒compile過
struct Node {
int val;
Node* next;
Node(){
next = nullptr;
}
};
class MyLinkedList {
public:
Node* head;
/** Initialize your data structure here. */
MyLinkedList() {
head = nullptr;
}
/** Get the value of the index-th node in the linked list. If the index is invalid, return -1. */
int get(int index) {
Node* curr = head;
while(index > 1){
if(curr){
curr = curr -> next;
index--;
}else{
return -1;
}
}
if(!curr) return -1;
return curr -> val;
}
/** Add a node of value val before the first element of the linked list. After the insertion, the new node will be the first node of the linked list. */
void addAtHead(int val) {
Node* newHead = new Node;
newHead -> val = val;
newHead -> next = head;
head = newHead;
}
/** Append a node of value val to the last element of the linked list. */
void addAtTail(int val) {
Node* curr = head;
Node* last = new Node;
last -> val = val;
if(!curr){
head = last;
return ;
}
while(curr -> next){
curr = curr -> next;
}
curr -> next = last;
}
/** Add a node of value val before the index-th node in the linked list. If index equals to the length of linked list, the node will be appended to the end of linked list. If index is greater than the length, the node will not be inserted. */
void addAtIndex(int index, int val) {
}
/** Delete the index-th node in the linked list, if the index is valid. */
void deleteAtIndex(int index) {
}
};
/**
* Your MyLinkedList object will be instantiated and called as such:
* MyLinkedList* obj = new MyLinkedList();
* int param_1 = obj->get(index);
* obj->addAtHead(val);
* obj->addAtTail(val);
* obj->addAtIndex(index,val);
* obj->deleteAtIndex(index);
*/
很好用,還不會像chrome三不五時卡bug讓io起飛
然後就會把 xmrig 從 process list 消失
說起來recover mode的服務列表是 hardcode 的嗎?
聽起來滿合理的 他們真的在別人的LOL裡面加過挖礦程式
嘔嘔嘔嘔 他們是不是上個月才支援模擬64位元X86
好久沒開Minecraft 了,今天為了MOD想開來看,結果發覺忘了裝JAVA XDD
難怪 forge 的 jar 無法執行才發覺這件事www
我印象中mbp2017能跑120fps,到了arm就只有30-60fps
真人版是 HITCON defense 的時候拍到的
未看先猜有一天這裡會出現:我對你比較有興趣
之類的句子
結果是email用錯個 現在被ratelimit了
不過前陣子有個好像叫做Outside the wire那部
最後 credit 有句還滿有趣的
西班牙銀行並未提供建築結構
之前還在打機器人競賽的時候 這種時間反而是弄機器的時間
去年這個時間我處在超級高壓下,最後還是讓隊伍擠進世界賽
我記得我去看的時候他是說入學給12 之後維持成績再每學期給2
我之前去接人 就算他跟我說他在幾號我繞兩圈也找不到
之後叫他直接來找我 www
沒關係,還是可以叫他尾巴,因為我覺得你跟別人說 gTLD 大家反而(
我都先弄個 LinkedList 跟 Node 的結構 之後就開始亂指(?
你這就跟我寫win32都不CloseHandle有甚麼不一樣(
我是有很過很fancy的delete node方法
不要free就能大大的防止 heap exploitation 了(?)
那麼龜兔會在 2(l + x) = l + x + nc 的地方相遇
where n is Natural Number