uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
5d4626b6-3a9f-4767-978b-73c844379572
Uzer447/Data-Structures-Leetcode
0820-find-eventual-safe-states/0820-find-eventual-safe-states.cpp
class Solution { vector<int> color; vector<vector<int>> g; bool dfs(int u) { if (color[u]) return color[u] == 2; color[u] = 1; for (int v : g[u]) if (!dfs(v)) return false; color[u] = 2; return true; } public: vector<in...
ALGO
0.999922
6.178669
989da2dd-fd4f-4026-bb90-f8216bc8a6bc
gitopening/TeamTalkok
win-client/3rdParty/src/json/src/jsontestrunner/main.cpp
/* This executable is used for testing parser/writer using real JSON files. */ #include <json/json.h> #include <algorithm> // sort #include <stdio.h> #if defined(_MSC_VER) && _MSC_VER >= 1310 #pragma warning(disable : 4996) // disable fopen deprecation warning #endif static std::string normalizeFloatingPointStr(dou...
TEST
0.880933
6.97019
d3720800-e1f9-4262-9286-4a96a0b2db6b
RadialFunc/USACO_Problems
2021/Bronze/2021FB1.cpp
#include <iostream> #include <map> using namespace std; int main(){ map<string, int> convert; convert["Ox"]=0; convert["Tiger"]=1; convert["Rabbit"]=2; convert["Dragon"]=3; convert["Snake"]=4; convert["Horse"]=5; convert["Goat"]=6; convert["Monkey"]=7; convert["Rooster"]=8; ...
ALGO
0.999709
3.671116
af5d1a54-6087-4a89-a851-a7a8867753a3
TengFeiyang01/Algorithm
ACODE/atc/abc_285/d.cpp
#include <iostream> #include <algorithm> #include <string> #include <queue> #include <set> #include <functional> #include <vector> #include <cstring> #include <map> #include <unordered_map> #include <stack> #include <numeric> #include <cmath> #define sz(x) int((x).size()) #define bg(x) begin(x) #define all(x) bg(x), ...
ALGO
0.999991
5.005943
181a7e56-cfb4-4388-ae02-d9c39dc55574
cabbagecabbagecabbage/Competitive-Programming
DMOJ Solutions/dmopc21c8p2.cpp
#pragma GCC optimize("Ofast,unroll-loops") #include <bits/stdc++.h> using namespace std; #define int long long #define vi vector<int> #define pii pair<int,int> #define all(x) (x).begin(),(x).end() int ri(){int x; cin >> x; return x;} vi rv(int l){vi v(l);generate(all(v),ri);return v;} template<typename T>void out(T x){...
ALGO
0.999985
4.092528
3a6cc752-f5eb-4a97-9452-c38340f77d77
snichols/boost_1_61_0
libs/math/doc/graphs/dist_graphs.cpp
/*! \file dist_graphs.cpp \brief Produces Scalable Vector Graphic (.svg) files for all distributions. \details These files can be viewed using most browsers, though MS Internet Explorer requires a plugin from Adobe. These file can be converted to .png using Inkscape (see www.inkscape.org) Export Bit...
TEST
0.937081
7.445835
abb8d7d6-7af7-4b1d-888d-58a2e59c9803
lowkeshonline/dsa-practice
sorting-I/quickSort.cpp
#include <bits/stdc++.h> using namespace std; int findPartIndex(vector<int> &arr , int start, int end){ int pivot = arr[start]; int i = start; int j = end; while(i < j){ while(arr[i]<= pivot && i < end){ i++; } while(arr[j]>pivot && j > start){ j--; ...
ALGO
0.999969
5.262487
baa7faf5-69dd-466d-b0b8-6331cc5251a3
lyz05/Sources
OI/纪中刘远哲/2015/10.20/1.cpp
#include <cstdio> #include <algorithm> #include <cstring> #include <cmath> using namespace std; const int dir[6][3]={{1,2,3},{1,3,2},{2,1,3},{2,3,1},{3,1,2},{3,2,1}}; const int N = 150000+5; int n,ans,a[5][N],s[5][N],b[5][5]; void work() { for (int i=0;i<6;i++) { int tmp = 0; for (int j=1;j<=3;j ++) tmp += b...
ALGO
0.99989
3.587543
c55eeaaf-668d-4299-bbcb-3356cd677b18
babayaga-13/Competitive-Programming
CODEFORCES/div.3/C_Birthday.cpp
#include <bits/stdc++.h> #define ll long long #define endl "\n" #define yes cout << "YES" << endl #define no cout << "NO" << endl #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; template <typename T> using pbds = tree<T, null_type, less<T...
ALGO
0.999966
4.475675
778263b7-b95e-49ee-864d-cae24f75a342
leverimmy/Codes
比赛/学校/2019-11-8测试/source/PC15_Polaris_Dane/17.cpp
#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<set> #include<algorithm> #include<cctype> #include<stack> #include<queue> #define int long long using namespace std; const int M=200200; const int inf=0x3f3f3f3f; const double eps=1e-6; inline int read(){ int x=0,f=1;char ...
ALGO
0.999969
4.547791
7d5a774d-332c-47ac-bde3-59b5991b8798
jamesdjuhartono/UVa-Problems
src/p11093.cpp
#include <iostream> #include <fstream> #include <sstream> #include <algorithm> #include <numeric> #include <cstdio> #include <cmath> #include <cstdlib> #include <cstring> #include <vector> #include <list> #include <set> #include <map> #include <stack> #include <queue> #include <cctype> #include <climits> #include <stri...
ALGO
0.998665
3.288571
61c36687-0839-448d-8de7-1eccb22f5730
ajpslcwds/cpp_study
wzq_study/thread_add_minus.cpp
#include"thread_add_minus.h" int g_sum = 0; pthread_mutex_t mutex; pthread_cond_t cond; class Hello { public: static void* add(void *args) { int i = *((int *)args); bool bFlag = true; pthread_mutex_lock(&mutex); cout << "add..." << i<< "..begin.." << g_sum << endl; g_sum += i ; if (g_sum > BOUNDARY) ...
ALGO
0.98439
4.090705
0cd2a111-321a-4e68-bcfa-a5e66c386771
esl-epfl/xheep_matrix_spec
llvm-project/llvm/lib/Analysis/CFG.cpp
#include "llvm/Analysis/CFG.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/IR/Dominators.h" #include "llvm/Support/CommandLine.h" using namespace llvm; // The max number of basic blocks explored during reachability analysis between // two basic blocks. This is kept reasonably small to limit compile time when /...
ALGO
0.999786
7.715908
5f017feb-5706-4be3-933f-a7dd6035e28f
Tinyshellzz/leetcode
Q1838. Frequency of the Most Frequent Element.cpp
#include "utils/headers.h" class Solution { public: int maxFrequency(vector<int>& nums, int k) { int len = nums.size(); sort(nums.begin(), nums.end()); int sum = 0; int left = 0, right = 0; while(right+1 < len) { int tmp = (right-left+1)*(nums[right+1]-nums[right...
ALGO
0.99997
5.868383
b96fd19e-0620-4eb9-863f-04cc200cd15e
barrycool/SR_stm32f429zi
Core/Src/MFCC/mfcc.cpp
/* * Description: MFCC feature extraction to match with TensorFlow MFCC Op */ #include <string.h> #include "mfcc.h" #include "float.h" MFCC::MFCC(int num_mfcc_features, int frame_len, int mfcc_dec_bits) :num_mfcc_features(num_mfcc_features), frame_len(frame_len), mfcc_dec_bits(mfcc_dec_bits) { // Round-up ...
DATA
0.871911
6.189023
f7ceae82-b715-4513-b477-6db074352ce6
Darbeloff/PMESC_Excavator
src/opencv_apps/src/nodelet/simple_flow_nodelet.cpp
// https://github.com/Itseez/opencv/blob/2.4/samples/cpp/simpleflow_demo.cpp /** * This is a demo of SimpleFlow optical flow algorithm */ #include <ros/ros.h> #include "opencv_apps/nodelet.h" #include <image_transport/image_transport.h> #include <cv_bridge/cv_bridge.h> #include <sensor_msgs/image_encodings.h> #incl...
TOOL
0.889189
7.338934
cf13992c-3b14-4bb0-9912-a97bb3ac67f5
sooorajjj/android_frameworks_av
media/libstagefright/codecs/m4v_h263/dec/src/chvr_filter.cpp
#include "mp4dec_lib.h" #include "post_proc.h" #ifdef PV_POSTPROC_ON void CombinedHorzVertRingFilter( uint8 *rec, int width, int height, int16 *QP_store, int chr, uint8 *pp_mod) { /*---------------------------------------------------------------------------- ; Define all local v...
ALGO
0.999668
5.066931
22aa9c33-10b7-477f-8448-d1041fe3989b
harshkathrotiya/cp
A_Elections.cpp
#include <iostream> #include <vector> #include <bits/stdc++.h> using namespace std; #define gc getchar_unlocked #define fo(i, n) for (int i = 0; i < n; i++) #define Fo(i, k, n) for (i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1) #define ll long long #define deb(x) cout << #x << "=" << x << endl #define pb push_...
ALGO
0.99989
3.825373
3e557d63-f108-4a3b-b2f9-a708ba519c1d
bassamarshad/SIFT_Demo_OpenCV
sift1/sift1/Source.cpp
/* Bassam Arshad 0259149 Project-04 SIFT Detector & Descriptors */ #include <opencv2/core/core.hpp> #include <opencv2\imgproc\imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include "opencv2/xfeatures2d/nonfree.hpp" # include "opencv2/features2d/features2d.hpp" using namespace cv; using namespace std; void ...
ALGO
0.99666
5.508632
85809aaf-cf06-47dc-b02d-52b30e9de721
swamiabhishek45/DSA
Company Specific/TCS NQT/3. Array/searchElem.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n = 5; int arr[n] = {1,2,3,4,5}; int k = 3; for(int i = 0; i<n; i++){ if(arr[i] == k){ cout << i; } } return 0; }
ALGO
0.999686
4.328891
526fbe53-d316-4695-a84c-b697dc284590
dexterklui/MessyGrid
src/game.cpp
// ENGG1340/COMP2113 Programming Technologies - Group Project // Authors: Lui Ka On (3035074610), Ye Zhongzheng (3035782176) // Group Project: MessyGrid // Group: 165 // // Description: // Implementing the game execution. #include <iostream> #include <iomanip> #include <cstdlib> #include <fstream> #include <string> #i...
TOOL
0.926628
4.6938
6a6e51d0-580d-4b83-ac4f-dfdf7e423a3f
ThantSPhyoe/allaboutdart
Documents/programming/flutter/goroute/windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.997475
6.76073
46555101-75c7-4e9e-b98b-ed1100b94391
sidakwalia/c-code
quicksort.cpp
#include<iostream> using namespace std; void swap(int *a,int *b){ int temp; temp=*a; *a=*b; *b=temp; } int partition(int arr[],int low,int high){ int i,j; int pivot=arr[high]; i=low-1; for(int j=low;j<high-1;j++){ if(arr[j]<pivot){ i++; swap(&arr[i],&arr[j]); } } swap(&arr[i + 1], &arr[high]); retur...
ALGO
0.999883
4.675548
e09f214b-572a-44ea-8582-53ba77ef19a2
Jawed-byte/Striver-s-SDE-sheet
preorder, inorder and postorder in a single traversal.cpp
vector<int>preInPostTraversal(TreeNode* root){ stack<pair<TreeNode*,int>> st; st.push({root,1}); vector<int> pre, in, post; if(root==NULL) return; while(!st.empty()){ auto it = st.top(); st.pop(); if(it.second==1){ pre.push_back(it.first->val); it.second++; st.push(it); if(it.first->left!=NULL)...
ALGO
0.999985
5.663935
cb13ae5a-05e8-424a-b082-0ee896033fbd
Raminyahya93/c--learning
practice/NomratAndDaneshamozan.cpp
#include<iostream> using namespace std; void input(int*, char**, int); void maximom(int*, char**, int); float average(int*, int); void print_average(int* grades, char** names, int average, int length); int main() { int length; int* grades; int i; float final_average; char** names; cout << "pl...
TOOL
0.945303
3.64401
593a4a20-a0fb-47cc-8631-d8b5c9c2fa94
ishandutta2007/codeforces
jdurie/normal/1734/B.cpp
#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> using namespace std; template<class T, class S> ostream& operator << (ostream &o, const pair<T, S> &p) { return o << '(' << p.first << ", " << p.second << ')'; } template<template<class, class...> cla...
ALGO
0.999842
4.11734
d55d3b6f-28ac-4642-9608-96086b1e58c4
adit2005/LEETCODE-CPP-DSA-QUESTIONS
LC_17.cpp
class Solution { public: vector<string> letterCombinations(string digits) { vector<string> result; if (digits.empty()) return result; unordered_map<char, string> mapping = { {'2', "abc"}, {'3', "def"}, {'4', "ghi"}, {'5', "jkl"}, ...
ALGO
0.99994
7.183314
a825be5e-dd7e-4082-915a-6c8b6c3af31d
masaki-michida/algorythm
atcorde/ABC/ABC375/ABC375-A.cpp
#include <iostream> #include <string> using namespace std; int main() { int sheats = 0; string seated; string pattern = "#.#"; int cnt = 0; cin >> sheats >> seated; if(sheats>=3){ for (int i = 0; i+2< sheats; i++){ char a = seated[i]; char b = seated[i+1]; ...
ALGO
0.99991
4.007885
7710a633-8dc2-4d73-96b5-f1cee39c81e5
m4oughi/100DaysofCode
pureCPP/0053. Day 53/constexpr & consteval/012. Usage in Constant Expressions/004. constexpr Variables in Global Scope/main.cpp
#include <iostream> constexpr int globalValue = 42; // ✅ Compile-time constant int main() { std::cout << "Global constant: " << globalValue << '\n'; }
TOOL
0.92868
5.49421
0750b432-9ad0-4676-b5ee-0f6b42d268f0
yfuka86/pc
atcoder/abc6/abc127/f/abc127_f.cpp
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> #define rep(i,n) for(ll i=0;i<(ll)(n);i++) #define rep_r(i,n) for(ll i=(ll)(n)-1;i>=0;i--) #define rep2(i,sta,n) for(ll i=sta;i<(ll)(n);i++) #define rep2_r(i,sta,n) for(ll i=(ll)(n)-1;i>=sta;i--) #define all(v) (v).begin(),(v).end() #define rall(v) (v).rbegin(),(v)...
ALGO
0.999736
3.991586
e17d31f4-fc66-4588-8805-89aeb0fe182c
raincross7/code-similarity
codes/train_code/problem021/problem021_277.cpp
#include<bits/stdc++.h> #include<algorithm> using namespace std; #define pb push_back #define csl ios_base::sync_with_stdio(false); cin.tie(NULL) typedef long long ll; #define reps(i,a,b) for(ll i=ll(a);i<ll(b);i++) #define rep(i,b) for(ll i=0;i<ll(b);i++) typedef vector<long long> vll; typedef vector<pair<int,int>> vi...
ALGO
0.999976
3.233079
7e286f96-95cd-4527-bbeb-a7b2577362cf
Black-Iron-Project/system_extras
multinetwork/common.cpp
#include "common.h" #include <android/api-level.h> #include <arpa/inet.h> #include <assert.h> #include <ctype.h> #include <errno.h> #include <stdlib.h> #include <string.h> #include <iostream> namespace { bool strEqual(const char *a, const char *b) { return strcmp(a, b) == 0; } // Allow specifying network handle...
TOOL
0.882721
6.50422
485ace64-1d3e-440c-b427-d9d2e182a290
sazzad90/advance_practice
rockClimbingBFS.cpp
#include<iostream> #include<algorithm> #include<climits> #include<vector> #include<queue> using namespace std; int N, M; bool canReachGoal(vector<vector<int>> &matrix, int jump){ queue<vector<int>> q; q.push({N-1, 0}); vector<vector<bool>> visited(N, vector<bool>(M, false)); visited[N-1][0] = true; ...
ALGO
0.99996
5.013404
e5a83c29-3e7d-4bb2-9e66-3786e6e7d070
KunalRSangalge/DSA
Codeforces/1476B.cpp
#include<bits/stdc++.h> using namespace std; #define ll int64_t //2312182 kunal #define gc getchar_unlocked #define fo(i,n) for (int i = 0; i < n; i++) #define Fo(i, k, n) for (i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1) #define si(x) cin>>x #define pi(x) cout<<x<<endl #define input(arr,n) fo(i,n) cin>>arr[...
ALGO
0.999797
3.020865
01a9b5d4-dd6f-4b3a-b2f7-dfc37292d874
noko206/AtCoder
morning/20230526/5.cpp
#include <bits/stdc++.h> using namespace std; #if __has_include(<atcoder/all>) #include <atcoder/all> using namespace atcoder; #endif #define _overload3(_1,_2,_3,name,...) name #define _REP(i,n) REPI(i,0,n) #define REPI(i,a,b) for(int i=int(a);i<int(b);++i) #define REP(...) _overload3(__VA_ARGS__,REPI,_REP,)(__VA_ARGS...
ALGO
0.999844
4.208415
7faaa7d2-ff92-44f5-8424-89d2772668b3
sarvex/leetcode-nativescript
solution/2300-2399/2353.Design a Food Rating System/Solution.cpp
using pis = pair<int, string>; class FoodRatings { map<string, pis> mp; map<string, set<pis>> t; public: FoodRatings(vector<string>& foods, vector<string>& cuisines, vector<int>& ratings) { int n = foods.size(); for (int i = 0; i < n; ++i) { string a = foods[i], b = cuisines[i]...
ALGO
0.999966
6.017699
0b09bc47-f8ba-4f9c-849b-26b930abceb3
aefreedman/Kaleidoscope_OF_0_73
addons/ofxSvg/libs/svgTiny/src/svgtiny_gradient.cpp
#include <assert.h> #include <math.h> #include <string.h> #include "svgtiny.h" #include "svgtiny_internal.h" #include <stdio.h> #undef GRADIENT_DEBUG static svgtiny_code svgtiny_parse_linear_gradient(Poco::XML::Element *linear, struct svgtiny_parse_state *state); static float svgtiny_parse_gradient_offset(const cha...
TOOL
0.927025
5.264798
3f8b782c-ef78-4486-b99d-36d914652662
Reet-jirety/Code-CPP
convert.cpp
#include<iostream> using namespace std; struct Node{ int data; Node* next; Node* prev; Node(int data1){ data = data1; next = nullptr; prev = nullptr; } Node(int data1,Node* next1,Node* prev1){ data = data1; next = next1; prev = prev1; } }; No...
ALGO
0.999984
3.711303
8c1d562b-e38b-4240-ad03-ef4b806ab608
applenhi123456/CTDL_GTBUOI5
Cau8.cpp
8#include <stdio.h> #define MAX_SIZE 100 // Định nghĩa kích thước tối đa của stack int stack[MAX_SIZE]; // Mảng lưu trữ stack int top = -1; // Khởi tạo giá trị top ban đầu void push(int x) { // Hàm thêm phần tử vào stack if (top == MAX_SIZE - 1) { // Kiểm tra stack đã đầy chưa printf("Error: Stack is full...
ALGO
0.997642
5.008875
cfbb2f0d-25df-472a-b153-43fe9854cb4f
hexhex/core
src/EvalHeuristicTrivial.cpp
/** * @file EvalHeuristicTrivial.cpp * @author Peter Schller * * @brief Implementation of a trivial evaluation heuristic. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif // HAVE_CONFIG_H #include "dlvhex2/EvalHeuristicTrivial.h" #include "dlvhex2/EvalHeuristicShared.h" #include "dlvh...
ALGO
0.991485
7.177605
eef095da-747c-49f6-9378-07c9425bf18d
gourdine/cpp
CompSci Labs/Week 12 Lab 2.cpp
/* (3) Implement the "Add player" menu option.Prompt the user for a new player's jersey number and rating. Append the values to the two vectors. (3pt) Enter a new player's jersey number: 49 Enter the player's rating: 8 (4) Implement the "Delete player" menu option.Prompt the user for a player's jersey nu...
TOOL
0.876825
5.177703
71bce2ca-65e6-45b1-9f40-1a13506773e6
bagsangbin/algorithm
seaLove/Q18870.cpp
#include<iostream> #include<vector> #include<set> #include<algorithm> #include<map> using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(0); int n; cin>>n; vector<long long> v; vector<long long> k; map<long long, int> m; for(int i = 0; i <n; i++){ long long num;...
ALGO
0.999987
3.933281
144bdb67-fe2c-4d1b-afa5-5f51950304a5
zamansabbir/DataStructure
BinarySearch.cpp
#include<iostream> bool binarySearch(int* arr,int start, int end, int x){ if(start>end){ return false; } if(end<start){ return false; } int middle=(start+end)/2; if(arr[middle]==x){ return true; }else if(x>arr[middle]){ return binarySearch(arr,middle+1,end,x);...
ALGO
0.999694
5.426892
8d097594-aac1-4388-90d6-8b0b1df6286a
LokeshMelkani07/DSA-Placement
Striver Sheet/Graphs/7.cpp
#include <iostream> #include <unordered_map> #include <unordered_set> #include <map> #include <set> #include <algorithm> #include <stack> #include <queue> using namespace std; /* Topological sort using DFS Given a Directed Acyclic Graph (DAG) with V vertices and E edges, Find any Topological Sorting of that Graph. */ ...
ALGO
0.999988
6.86933
2bdc1fcb-8b41-4355-b2ca-256ea4dcbc6f
KnightFang36/DSA-A2Z
03_Arrays/1_EasyProblems/01_Largest_Element_In_Array.cpp
#include <bits/stdc++.h> using namespace std; int largestElement(int arr[],int n){ int largest=arr[0]; for(int i=0;i<n;i++){ if(arr[i]>largest) largest=arr[i]; } return largest; } int main(){ int n ; cin>> n; int arr[n]; for (int i = 0; i < n; i++) cin>>arr[i]; int largest=l...
ALGO
0.998956
3.911927
cea07293-d88b-4289-b64d-ee3c62d387e9
chirag-goel360/NewsBook
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998693
6.797273
82b24664-bbb4-44c2-a125-71817b62ad71
gaurav147-star/DSA-learning
Searching/linearSearch.cpp
#include <iostream> using namespace std; int linearSearch(int arr[], int n, int ele) { //searhing element one by one in a array if element find return index of the array else return -1 for (int i = 0; i < n; i++) { if (arr[i] == ele) { return i; } } return -1; } ...
ALGO
0.999954
5.963263
3263e123-19ef-4a6c-99c1-956fa7e4b494
ehmed007/Assignment
task02.cpp
#include <iostream> using namespace std; void getData(int size, int array[]) { for (int i=0; i<size; i++) { cout <<"enter value for "<<i<<" index : "; cin >>array[i]; } } int getElement(int size, int array[], int index) { return array[index]; } int countEvens(int size, int array[]) { ...
ALGO
0.851211
3.520196
e9e521f3-ed00-411b-9298-5564b3a8fe8e
RouleBe/tic_tac_toe_game_flutter
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
23a832d5-216c-4976-9a25-5a51f4cdb0e7
chvj7567/algorithm
baekjoon_greedy/baekjoon_10610.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using std::cin; using std::cout; using std::endl; using std::vector; using std::string; using std::greater; using std::to_string; int main() { // ü string number; // 1ڸ vector<int> one_number; // ڵ int sum = 0; ...
ALGO
0.999905
4.910041
4092f661-6052-4789-9a34-ea62be18c4e5
CharlesAtUW/HuffmanExercise
TreeNode.cpp
#include <sstream> #include <memory> #include <unordered_map> #include <stdexcept> #include "TreeNode.h" #include "Bits.h" namespace huffman { #define INDENT " " void BuildTreeContentsRepr(const TreeNode &current_node, const std::string &indent, std::stringstream &current_contents, const int depth); void Build...
ALGO
0.912684
5.88578
dd33a482-596b-49d0-9cc9-9a9fa41af74f
papireddy903/Datastructures
linkedlist_operations.cpp
#include<iostream> using namespace std; class node{ public: int data; node* next; node(int d){ this->data = d; this->next = NULL; } }*head=NULL,*temp,*newnode; void insertion() { int value; cout<<"\n1.At beg 2.At end 3.position\n"; int opi; cin>>opi; if (opi==...
ALGO
0.984482
3.688487
afdea3a0-1fe8-4ab4-8c7c-5c57709092ce
nishatlea/Programming
Basic Concepts/Math/BuildCars.cpp
#include <iostream> #include<bits/stdc++.h> using namespace std; int cars(int wheels, int carBodies, int figures) { int wheelsNeeded = 4; // Wheels needed for one car int bodiesNeeded = 1; // Car bodies needed for one car int figuresNeeded = 2; // Figures needed for one car int completeCars = std::m...
ALGO
0.997648
5.873115
865e7bc0-6852-44c9-84b7-ba495c425511
dave256/OpenGLDemo
OpenGLDemo/Utils.cpp
#include "Utils.h" #ifndef __AAPLE__ #define _CRT_SECURE_NO_DEPRECATE #endif using std::cerr; using std::cout; using std::endl; using std::string; //---------------------------------------------------------------------- std::string pathUsingEnvironmentVariable(std::string filePath, std::string environmentVariable) ...
TOOL
0.903686
5.586783
d0ae7679-1e26-4cd1-af60-1d30659672bb
AyushMaheshwari2002/LeetCode
0945. Minimum Increment to Make Array Unique.cpp
/* You are given an integer array nums. In one move, you can pick an index i where 0 <= i < nums.length and increment nums[i] by 1. Return the minimum number of moves to make every value in nums unique. The test cases are generated so that the answer fits in a 32-bit integer. Example 1: ...
ALGO
0.999968
6.211586
70335bb3-f58a-4299-bde3-e67419c65be4
ixray-team/xray-vss-archive
net.ssa/Editors/!old/Plugins.old/LW/Shader.old/Xr_ini.cpp
#include "stdafx.h" #pragma hdrstop #include "fs_internal.h" XRCORE_API CInifile *pSettings = NULL; CInifile* CInifile::Create(const char* szFileName, BOOL ReadOnly) { return xr_new<CInifile>(szFileName,ReadOnly); } void CInifile::Destroy(CInifile* ini) { xr_delete(ini); } bool sect_pred(const CInifile::Sect *x, L...
TOOL
0.925963
4.286688
bf018550-a022-47ab-9a96-967f6632f6c9
Coobeliues/pp1
Documents/pp1/a/fin/g.cpp
#include <iostream> using namespace std; bool isPrime(int n){ // Corner case if (n <= 1) return false; // Check from 2 to n-1 for (int i = 2; i < n; i++) if (n % i == 0) return false; return true; } int main(){ int n; cin>>n; for(int i=2;i<=n;i++){ i...
ALGO
0.99984
3.976295
9c9bd4c1-bc30-4d57-ab15-6ec396c86eee
gauravsingh0793/TCS-NQT
04_oddEven.cpp
#include<iostream> using namespace std; int main(){ int num; cout << "Enter the no:" << endl; cin >> num; if(num%2==0){ cout << "Even number"; } else{ cout << "Odd number"; } return 0; }
ALGO
0.998556
3.431027
4d916ca7-e443-4b44-8a51-4d34ec3b22a6
ht0919/atcoder
ABC/176/ABC176C.cpp
#include <iostream> using namespace std; int main() { int N; cin>>N; long long ans=0; int before, tmp, step; cin>>before; for (int i=1; i<N; i++) { cin>>tmp; if (before>tmp) { step = before - tmp; ans += step; before = tmp + step; } else { before = tmp; } } cout << ...
ALGO
0.999917
3.384543
fd3de8ac-8735-4737-b3fb-ebfb75def9d1
mayank7jha1/ISA_Dec
Lecture 58/Stack_Vs_Vectors.cpp
#include<bits/stdc++.h> using namespace std; int main() { // vector<int>ans = {1, 2, 3, 4, 5}; // stack<int>check; // check.push(10); // check.push(20); // check.push(90); // stack<int>st = check; // vector<int>v = ans; int n; cin >> n; stack<char>st; for (int i = 0; i < n; i++) { char x; cin >> x;...
ALGO
0.999108
3.151814
8bf8bdfa-a88a-421b-816d-2c5fc6e9efde
sandipannas/LeetCode
0018-4sum/0018-4sum.cpp
class Solution { public: vector<vector<int>> gg; vector<int> quad; void ans(vector<int>& n,long long target,int k,int st) { if(k!=2) { for(int i=st;i<n.size()-k+1;i++) { if(i!=st && n[i]==n[i-1]){ continue; } //to avoid duplicates; qua...
ALGO
0.999941
5.55723
da9ee652-57bd-49cf-8e35-22bc1bd4ae32
zyzisyz/OJ
practice/0148.cpp
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(void){ int n; cin>>n; vector<int> nums(n, 0); for(int i=0; i<n; i++){ cin>>nums[i]; } sort(nums.begin(), nums.end()); int res = 0; while(nums.size()>1){ int tmp = nums[0] + nums[1]; res += tmp; auto pos = upper_bo...
ALGO
0.999991
3.86771
35fa3367-bf74-4887-b977-7c2bd5473160
hayativ/pp1
lab4/spiral.cpp
#include <iostream> using namespace std; int main(){ int n; cin >> n; int arr[n][n]; if(n % 2 == 1){ arr[n / 2][n / 2] = n*n - 1; } int cnt = 1; for(int i = 0; i < n; i++){ for(int j = i; j < n - i; j++){ //first row arr[i][j] = cnt; cnt++; ...
ALGO
0.99969
3.764616
44872f53-c66a-4ba5-801e-2bfd7ebe2233
chaeyeunpark/are-neural-quantum-states-good
src/ED/J1J2-save.cpp
#include <iostream> #include <fstream> #include <ios> #include <cereal/archives/binary.hpp> #include <tbb/tbb.h> #include "ParallelMV.hpp" #include "Basis/TIBasisZ2.hpp" #include "Hamiltonians/TIXXXJ1J2.hpp" #include "ArpackSolver.hpp" int main(int argc, char* argv[]) { std::cout.precision(12); int N; if(argc !...
ALGO
0.95905
4.816788
40350fcc-551f-4df9-9097-74bd8998cbbe
loongarch64/afnix
src/mod/mth/shl/Direct.cpp
#include "Vector.hpp" #include "Direct.hpp" #include "Integer.hpp" #include "Evaluable.hpp" #include "QuarkZone.hpp" #include "Exception.hpp" namespace afnix { // ------------------------------------------------------------------------- // - class section -...
ALGO
0.889852
4.953043
e499d652-7e89-4d98-bbea-57801cf532e4
batuhanefe44/KODLUYORUZ
Kodluyoruz/Hafta7_Odev3.cpp
#include <stdio.h> int main() { int num1, num2; int *ptr1, *ptr2; ptr1 = &num1; // ptr1 num1'in adresini tutar ptr2 = &num2; // ptr2 num2'nin adresini tutar printf("Birinci sayiyi girin: "); scanf("%d", ptr1); printf("Ikinci sayiyi girin: "); scanf("%d", ptr2); printf("Birinci s...
ALGO
0.984216
3.963103
45c931c7-8652-48c4-a9fe-430e8ed8532d
ababoomian/arvin_gcc
lab4/hakoupian_lab4.cpp
//Arvin Hakoupian //Lab 1b part 2 //CS/IS 135 /* START DECLARE numTrees, treeHeight, forDelivery AS INTEGER DECLARE singleTree, treeCost, deliveryCost, totalCharges AS DOUBLE INPUT numTrees INPUT treeHeight INPUT forDelivery SET singleTree = 39.00 WHEN treeHeight < 3 SET singleTree = ...
TOOL
0.997284
7.404609
6acaa9f5-7693-4136-8600-f7809cf8d571
JaswanthKarangula/Leetcode
941-valid-mountain-array/941-valid-mountain-array.cpp
class Solution { public: bool validMountainArray(vector<int>& arr) { int n=arr.size(); if(n<=2)return false; int count=0; if(arr[1]<arr[0])return false; for(int i=1;i<n;++i){ if(arr[i]<arr[i-1] )count++; if(arr[i]==arr[i-1])return false; if...
ALGO
0.999985
5.910336
141150f4-ca73-4fcb-b2e4-aabd6906ece5
ishandutta2007/codeforces
lucaperju/normal/1185/F.cpp
#include <bits/stdc++.h> /// mai usor decat B-u using namespace std; int dp[1200]; void baga (int pz) { for(int i=pz;i<=(1<<10)-1;i=(i+1)|pz) ++dp[i]; } struct ura { int a,pz; }; vector <ura> cst[1200]; bool cmp (ura a, ura b) { return a.a<b.a; } int main() { int t,n,m,i,j,nc; cin>>n>>m; ...
ALGO
0.999971
3.615628
c996571e-f0dd-4755-b9a2-f7baf70f8fe1
harshitsuthar77731/striverSheet
Binary Tree part-III/114. Flatten Binary Tree to Linked List.cpp
class Solution { public: void fun(TreeNode* root){ if(root==NULL) return; if(root->left!=NULL) { TreeNode* temp = root->right; root->right = root->left; root->left = NULL; TreeNode* temp2 = root->right; while(temp2->righ...
ALGO
0.999947
5.473781
4cf1de73-d9fa-44bd-bd77-01dcea75a12e
Sharul-Islam/DataStructureLab_P
Task_5.cpp
#include<iostream> using namespace std; int main(){ int numbers[10] = {0}; int arry[10]; cout<<"Enter the number of elements :" <<endl; for(int i=0; i<10; i++){ cin >> arry[i]; numbers[arry[i]]++; } for(int i=0; i<10; i++){ if(numbers[arry[i]]!=-1){ cout <<...
ALGO
0.998139
3.702775
395efa5b-6ae2-40bf-a5e6-7c245ab4c1cb
aymanelotfi/BBE
src/ExampleStrategy.cpp
#include "BBE.h" float get_mid(TickData& tick) { if (!tick.ap1 || !tick.bp1) return -1; return (*tick.ap1 + *tick.bp1) / 2; } class ExampleStrategy : public Strategy { std::map<std::string, float> _avg_mid; float decay_factor = 0.8; public: ExampleStrategy(std::vector<std::string> rics, Exchange& ...
ALGO
0.997347
5.633698
cf7d2c1a-1a1a-4d3e-9694-130f16b7d0b4
MachangDoniel/Problem-Solving
vs/Codeforces/B_Increase_Decrease_Copy.cpp
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; template <typename T> using ordered_set= tree<T, null_type,less<T>, rb_tree_tag,tree_order_statistics_node_update>; //ordered_set template <typename T> using multi_ord...
ALGO
0.999917
4.314236
2fb4bc4f-84db-4dd9-9048-579ee90af2e4
RooTinfinite/LeetCode-75-Solutions
0. All Solutions/783-search-in-a-binary-search-tree/search-in-a-binary-search-tree.cpp
class Solution { public: TreeNode* searchBST(TreeNode* root, int val) { if (!root) { return nullptr; } if (root->val == val) { return root; } else if (root->val > val) { return searchBST(root->left, val); } else { return searchB...
ALGO
0.999987
6.45339
653ce384-2739-454c-a6c2-70214aa7ce59
Rust512/backup
coding-ninjas/milestones/five/backtracking/crossword/solution.cpp
#include<iostream> using namespace std; char crossWord[10][10]; void initIO() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); #ifndef ONLINE_JUDGE std::freopen("./input.txt", "r", stdin); std::freopen("./output.txt", "w", stdout); #endif } bool isValidHorizontal(int row, ...
ALGO
0.999168
4.106196
04cc5d7c-ad02-4eeb-ae88-37e8305435a6
ishandutta2007/codeforces
sevlll777/normal/1651/B.cpp
#include <iostream> #include <iomanip> #include <cstdio> #include <cstdlib> #include <algorithm> #include <cmath> #include <vector> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <queue> #include <ctime> #include <cassert> #include <string> #include <cstring> #include <chrono> ...
ALGO
0.99954
4.122654
dd10c929-832c-4c13-a05b-d6ba2667ddcd
yebinhi/LeetcodePractice
find-the-index-of-the-first-occurrence-in-a-string/Accepted/10-22-2015, 10:38:03 PM/Solution.cpp
// https://leetcode.com/problems/find-the-index-of-the-first-occurrence-in-a-string class Solution { public: int strStr(string haystack, string needle) { int h(haystack.size()), n(needle.size()); if(h<n) return -1; if(n==0) return 0; if(h==0) return -1; for(int i=0; i<h; i++...
ALGO
0.99996
6.054815
5b3fe118-2cd9-4275-9d5a-199b33212111
aadityab7/Practice
234. Palindrome Linked List.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: bool isPalindrome(Lis...
ALGO
0.99957
5.743752
d11dfca8-1403-42a4-92e5-d721df2d67b7
tushar-badlani/OSAssignment
Assignment 1/grep.cpp
#include <iostream> #include <fstream> #include <string> #include <algorithm> using namespace std; // Case-insensitive search bool caseInsensitiveFind(const string& line, const string& pattern) { string lowerLine = line; string lowerPattern = pattern; transform(lowerLine.begin(), lowerLine.end(), lowerLi...
TOOL
0.998148
6.42468
9a1644fd-dd9e-4344-a3cf-44fea610dc12
Sriram-99/LeetCode
Triplet Sum in Array - GFG/triplet-sum-in-array.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: //Function to find if there exists a triplet in the //array A[] which sums up to X. bool find3Numbers(int arr[], int n, int X) { sort(arr,arr+n); for(int i=0;i<n-2;i++...
ALGO
0.999904
5.708651
40fa43f2-b019-4882-9cb5-1a2f736c79fc
ixray-team/xray-vss-archive
xr_3da/xrRender_R2/r__dsgraph_build.cpp
#include "stdafx.h" #include "..\fhierrarhyvisual.h" #include "..\SkeletonCustom.h" #include "..\fmesh.h" #include "..\irenderable.h" #include "flod.h" #include "particlegroup.h" #include "FTreeVisual.h" using namespace R_dsgraph; /////////////////////////////////////////////////////////////////////////////////////...
ALGO
0.856732
3.309039
0f0dd5dd-1195-47b7-b11a-87863671f86e
hikjik/leetcode
solutions/dota2-senate/test.cpp
#include <catch.hpp> #include <solution.hpp> TEST_CASE("Simple") { struct TestCase { std::string senate; std::string expected; }; std::vector<TestCase> test_cases{ { .senate = "RD", .expected = "Radiant", }, { .senate = "RDD", .expected = "Dire"...
TEST
0.871336
6.835353
da9bc270-21e9-4181-a957-8c4dbacd4d56
sashi-cse/c-c-
C++/forSum.cpp
#include<iostream> using namespace std; int main(){ int n; cout<<"Enter the value of n"<<endl; cin>>n; int sum=0; for(int i=0;i<=n;i++){ sum+=i; } cout<<sum; }
ALGO
0.998603
3.846803
28bec2f1-f4f8-49cf-abc4-971aed6d9eb7
ahr9n/psolving-paradigms
3.binary-search/UVa 12032 - The Monkey and the Oiled Bamboo.cpp
#include "bits/stdc++.h" using namespace std; #define endl '\n' #define repeat(n) for(int i=0; i<n; i++) void quicken(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); } int main(){ quicken(); int t, n, j=0; cin >> t; while(t--){ cin >> n; int arr[n], maxi, ans;...
ALGO
0.998884
4.302064
bdbff089-20b5-4a20-8e19-d4c8cb06f74e
bikramthakur0909/Raja
BasicsToAdvance/pascleTriangle.cpp
#include<iostream> using namespace std; int fact(int x) { int f = 1; for(int i=1; i<=x; i++) { f *= i; } return f; } int ncr(int n,int r){ return fact(n)/(fact(r)*fact(n-r)); } int main() { int n; cout<<"Enter n : "; cin>>n; for(int i=0;i<=n;i++) { // for(int j=0;j<=n-i...
ALGO
0.999944
4.308044
5d8c85b4-c4cd-4b53-a92c-130d649bad8b
ishandutta2007/codeforces
noam527/normal/903/E.cpp
#include <iostream> #include <vector> #include <algorithm> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <string> #include <time.h> #include <stack> #include <queue> #define last(x, y) (x)[(x).size() - (y)] #define endl '\n' #define flush fflush(stdout), cout.flush() #define f...
ALGO
0.999989
3.586177
d89c4ef3-8492-4dcf-9790-eec39346ea47
allisonfowle/CS-2150
Lab 10 - Huffman Coding/prelab/testhuffenc.cpp
/* Allison Fowle acf6nb heap.cpp 11/17/2021 */ #include <iostream> #include <fstream> #include <cstdlib> #include <string> #include <iomanip> //set precision for ratio and cost #include "heap.h" #include "huffNode.h" #include "huffTree.h" using namespace std; //prototypes from huffTree.cpp huffNode* addTree(huffNode...
ALGO
0.981034
4.203848
bce37874-2443-45d1-a245-72ba5da55346
Abdullah-9862873/Queue-CPP
88 Lecture Two Pointers(Three Sum Problem)/Lecture_88_Part_(2)_Using_Two_Pointers.cpp
/* Input: array[12 3 7 1 6 9] target = 24 output: 12 3 9 1(found) */ #include<iostream> #include<bits/stdc++.h> using namespace std; int main(){ int n; cout<<"Enter the size of array: "<<endl; cin>>n; int target; cout<<"Enter the target: "<<endl; cin>>target; int arr[n];...
ALGO
0.999889
3.873444
3134aa07-d6a5-4258-acce-720bbc05fcd2
leratojeffrey/OptiSDR-Compiler
NetRAD-PulseCompression/StreamProcessor/firht_gold.cpp
//////////////////////////////////////////////////////////////////////////// // Calculate scalar products of VectorN vectors of ElementN elements on CPU. // Straight accumulation in double precision. //////////////////////////////////////////////////////////////////////////// extern "C" void firfilterhtCPU(float *h_C,f...
ALGO
0.987434
4.294791
5bd24a2b-2fc4-4105-bc52-9f836b45c7e0
Rohannpatel04/Webpage-Network-
WebpageNetwork.cpp
#include "WebpageNetwork.h" #include <fstream> #include <iostream> #include "WebpageNode.h" using namespace std; // create an empty webpage graph WebpageNetwork::WebpageNetwork() {} // clean up any memory and fixes broken links WebpageNetwork::~WebpageNetwork() { for (auto i = nodeMap.begin(); i != nodeMap.end();...
TOOL
0.872775
3.41482
9972460b-d321-4d3b-a529-f803513430d0
TaeUkKim-ZZ/acmicpc
02606/2606.cpp14.cpp
#include <stdio.h> int network[201][201]; int visit2[201][201]; int visit[201]; int n, input; int first, second; int cnt = 0; int before; void DFS(int node) { for(int j = 1; j <= n; j++) { if(network[node][j] == 1) { visit2[j][node] = 1; visit[j]...
ALGO
0.999668
4.037801
f22fd47d-9d20-4708-ba73-cdfef16ae7bf
uxth/leetcode
cpp/1664.ways-to-make-a-fair-array.cpp
/* * @lc app=leetcode id=1664 lang=cpp * * [1664] Ways to Make a Fair Array * * https://leetcode.com/problems/ways-to-make-a-fair-array/description/ * * algorithms * Medium (60.31%) * Likes: 246 * Dislikes: 4 * Total Accepted: 8.5K * Total Submissions: 14.2K * Testcase Example: '[2,1,6,4]' * * You...
ALGO
0.999849
6.143697
94e104d9-b490-4a09-b3c3-a62b95b4ef46
vitorguidi/Competitive-Programming
codeforces/rounds/Aim Tech Round 5/a.cpp
#include "bits/stdc++.h" using namespace std; #define pb push_back #define mp make_pair #define fst first #define snd second #define fr(i,n) for(int i=0;i<n;i++) #define frr(i,n) for(int i=1;i<=n;i++) #define ms(x,i) memset(x,i,sizeof(x)) #define dbg(x) cout << #x << " = " << x << endl #define all(x) x.begin(),x.en...
ALGO
0.999741
3.359456
5ceec2ab-4616-4dee-984f-08668ddc7079
samObot19/kattis
keycrypto.cpp
#include<iostream> #include<map> #include<queue> using namespace std; string decrypt(string message, string key){ map<char, int> corespond; map<int, char> Char; string sa = ""; int len; char enkrypt = 65; for (int i = 0; i <= 25; i++) { corespond[enkrypt] = i; Char[i] = ...
ALGO
1
4.723982
f36e65ef-a371-41d9-b432-d0d1be034a56
salimmia/Problem-Solving
Code_Template/Notes and files/KnightMare of Anachor/BlackBox/KDTree.cpp
// ----------------------------------------------------------------- // A straightforward, but probably sub-optimal KD-tree implmentation // that's probably good enough for most things (current it's a // 2D-tree) // // - constructs from n points in O(n lg^2 n) time // - handles nearest-neighbor query in O(lg n) if po...
ALGO
0.999902
6.880352
22f2e7a1-3b66-4f49-86e2-a195d105dbf3
huahua699632/C
C语言10.16.cpp
#include <stdio.h> using namespace std; int a[10]; void input(int* m) { for(int i = 0; i < 10; i++) scanf("%d", m + i); } void swap(int* m) { int num_max = 0; int num_min = 99999; int temp1 = 0; int temp2 = 0; int k1 = 0; int k2 = 0; for(int i = 0; i < 10; i++) { if(*(m + i) > num_max) { num_max ...
ALGO
0.999667
3.538809
1a4f7ed8-915a-4b3e-a2dd-642f9c2606cb
haneul2008/codetree-TILs
240720/별 n개 출력하기/print-n-stars.cpp
#include <iostream> using namespace std; int main() { // 여기에 코드를 작성해주세요. int n; cin >> n; int i = 0; while(i < n){ cout << '*' << endl; i++; } return 0; }
ALGO
0.999689
3.506774
370ce55f-7fb3-416f-be58-3fe590453dd8
moyuanhuang/leetcode
board/battleships_on_board.cpp
// leetcode 419 // add count only on upper-left of the ship, because we scan from upper-left corner class Solution { public: int countBattleships(vector<vector<char>>& board) { int count = 0; for(int i = 0; i < board.size(); ++i){ for(int j = 0; j < board[0].size(); ++j){ if(board[i][...
ALGO
0.999348
5.953662
d180cb24-f92b-46d0-93a8-9f6f9b89431e
kugorang/codetree-TILs
240210/세 실수의 반올림/rounding-of-three-actual-numbers.cpp
#include <iostream> using namespace std; int main() { // 여기에 코드를 작성해주세요. float a, b, c; cin >> a; cin >> b; cin >> c; cout << fixed; cout.precision(3); cout << a << endl << b << endl << c; return 0; }
ALGO
0.965842
4.144113
7acca039-a1da-4b68-ab58-1428c4e00786
ayushrawat1303/CodeForces
800/B_Queue_at_the_School.cpp
#include<bits/stdc++.h> using namespace std ; #define endl '\n' #define int long long #define mod 1000000007 void solve(int n,int t,string temp) { while(t--) { for(int i=0;i<=n-2;i++) { if(temp[i]=='B' && temp[i+1]=='G') { swap(temp[i],temp[i+1]); ...
ALGO
0.999558
4.17305