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 <vector> | |
#include <algorithm> | |
using namespace std; | |
int longestIncreasingSubsequence(const vector<int> &v) { | |
vector<int> dp(v.size(), INT_MAX); | |
for (int n : v ) { | |
*lower_bound(dp.begin(), dp.end(), n) = n; |
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 <string> | |
#include <vector> | |
#include <algorithm> | |
#include <map> | |
using namespace std; | |
vector<int> v_list; | |
vector<int> w_list; |
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 <string> | |
#include <vector> | |
#include <algorithm> | |
#include <map> | |
using namespace std; | |
vector<int> v_list; | |
vector<int> w_list; |
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 <string> | |
#include <vector> | |
#include <algorithm> | |
#include <map> | |
using namespace std; | |
map<pair<string, string>, int> memo; | |
int longestCommonSubsequence(string s, string t) { |
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 <string> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
int longestCommonSubsequence(string s, string t) { | |
vector<vector<int>> v(s.size() + 1, vector<int>(t.size() + 1, 0)); | |
for (int i = 0; i < s.size() + 1; ++i) { |
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
class TrieTree: | |
def __init__(self): | |
size = 256 | |
self.table = [[None for c in range(size)] for n in range(size)] | |
self.node_value = [None for n in range(size)] | |
self.last_node = 0 | |
def insert(self, key, value): |
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
import com.intellij.notification.Notification; | |
import com.intellij.notification.NotificationType; | |
import com.intellij.notification.Notifications; | |
import com.intellij.openapi.actionSystem.AnAction; | |
import com.intellij.openapi.actionSystem.AnActionEvent; | |
import com.intellij.openapi.wm.WindowManager; | |
import javax.swing.*; | |
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
import sys | |
import subprocess | |
from html.parser import HTMLParser | |
from microsofttranslator import Translator | |
client_id = "" | |
client_secret = "" | |
class TestHTMLParser(HTMLParser): |
NewerOlder