This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <map> | |
#include <list> | |
#include <iostream> | |
using namespace std; | |
class LRUCache { | |
private: | |
list<int> dq; | |
map<int, list<int>::iterator> m; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
typedef long long ll; | |
ll ans[3][2]; | |
void calc(ll idx, ll k) { | |
for (ll i = 2; i <= k; i *= 2) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stack> | |
#include <utility> | |
#include <iostream> | |
using namespace std; | |
int arr[1000001]; | |
int cnt[1000001]; | |
int ans[1000001]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdlib> | |
#include <iostream> | |
using namespace std; | |
struct Node { | |
int data; | |
struct Node *next; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdlib> | |
#include <iostream> | |
using namespace std; | |
struct Node { | |
int data; | |
struct Node *next; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdlib> | |
#include <iostream> | |
using namespace std; | |
struct Node { | |
int data; | |
struct Node *next; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdlib> | |
#include <iostream> | |
using namespace std; | |
struct Node { | |
int data; | |
struct Node *next; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <deque> | |
#include <iostream> | |
using namespace std; | |
struct MAL { | |
int num, x, y, d; | |
MAL(int num = 0, int x = 0, int y = 0, int d = 0) : | |
num(num), x(x), y(y), d(d) {} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#define SYSCALL_NUM 256 | |
void *sys_call_table[SYSCALL_NUM] = { 0 }; | |
int my_open(char *str) { | |
printf("my_open() system call\n"); | |
printf("str = %s\n", str); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void init_arr(int (*arr)[2]) { | |
int i, j, cnt = 1; | |
for(i=0; i<3; i++) { | |
for(j=0; j<2; j++) { | |
arr[i][j] = cnt++; | |
} | |
} |
NewerOlder