This file contains 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 Wizard: | |
def __init__(self, name, rating, age): | |
self.name = name | |
self.rating = rating | |
self.age = age | |
def change_rating(self, val): | |
if val > 0: | |
self.rating += val | |
self.age -= abs(val) // 10 |
This file contains 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 Wizard: | |
def __init__(self, name, rating, age): | |
self.name = name | |
self.rating = rating | |
self.age = age | |
def change_rating(self, val): | |
if val > 0: | |
self.rating += val | |
self.age -= abs(val) // 10 |
This file contains 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 threading | |
from time import sleep | |
import win32gui | |
from win32gui import EnumWindows | |
active_process_time = {} | |
active_process_click = {} | |
apps = {} | |
all_apps = ['google', 'yandex', 'mozilla firefox', 'microsoft\u200b edge', 'opera'] | |
browser_time = {} |
This file contains 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 threading | |
from time import sleep | |
import win32gui | |
from win32gui import EnumWindows | |
active_process_time = {} | |
active_process_click = {} | |
apps = {} | |
all_apps = ['google', 'yandex', 'mozilla firefox', 'microsoft\u200b edge', 'opera'] | |
browser_time = {} |
This file contains 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 <bits/stdc++.h> | |
#define int long long | |
using namespace std; | |
const int INF = 1e9; | |
const int MOD = 1e9 + 7; | |
long long norm_mod(long long x, long long mod) { | |
return (x % mod + mod) % mod; | |
} |
This file contains 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 <bits/stdc++.h> | |
#define int long long | |
using namespace std; | |
const int INF = 1e5; | |
signed main() { | |
cin.tie(0); | |
cout.tie(0); | |
ios_base::sync_with_stdio(0); |
This file contains 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 <bits/stdc++.h> | |
#define int long long | |
using namespace std; | |
const int MAXN = 1e5 + 1; | |
const int INF = 1e9; | |
signed main() { | |
int n, k, p; | |
cin >> n >> k >> p; | |
vector<vector<int>> l(n + 1); |
This file contains 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 <bits/stdc++.h> | |
#define int long long | |
#define forn(i, n) for(int (i) = 0; (i) < (n); (i)++) | |
using namespace std; | |
int solve() { | |
int n, d; | |
cin >> n >> d; | |
vector<int> a(n + 1), b(n + 1), c(n + 1); |
This file contains 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
arr = [5, 2, 8, 1, 9, 3] | |
for i in range(len(arr)): | |
for j in range(len(arr) - i - 1): | |
if arr[j] > arr[j + 1]: # сортируем массив по возрастанию | |
arr[j], arr[j + 1] = arr[j + 1], arr[j] # переставляем элемент arr[j] и arr[j + 1] | |
print(*arr) # выводим элементы массива |
This file contains 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 <bits/stdc++.h> | |
#define int long long | |
#define forn(i, n) for(int (i) = 0; (i) < (n); (i)++) | |
using namespace std; | |
const int N = 6; | |
signed main() { | |
int arr[N] = {5, 2, 8, 1, 9, 3}; | |
for (int i = 0; i < N; ++i) { | |
for (int j = 0; j < N - i - 1; ++j) { |