uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
3d1e370b-9407-4085-8c30-e9a182b7e707
kanachi123/SFML-projects
quad_tree_collision/main.cpp
#include "crpo.h" #include <SFML/Graphics.hpp> #include <cstdlib> #include <ctime> #include <iostream> #include <vector> using namespace sf; using namespace std; const int N = 1000; const int WINDOWSIZE = 800; struct particle { circle back; CircleShape front; double mass = 0.001; float vx = 0, vy = 0; }; st...
ALGO
0.999808
5.208614
c8796247-5a56-43d9-93e7-a76106157096
JunMyKIM/FMTC_2023
src/gps_team/gps/pure_pursuit/src/0816 backup/pure_pursuit_core_final.cpp
#include <vector> #include <cmath> #include <pure_pursuit_core.h> #include <fstream> #include <cstdlib> #include <unistd.h> #include <time.h> #include <chrono> #include <algorithm> #include <tf/transform_broadcaster.h> #include <nav_msgs/Path.h> namespace waypoint_follower { // Constructor PurePursuitNode::PurePursuit...
TOOL
0.909884
3.978508
84380a60-2d84-4ac3-bc48-3535aa1306ef
TatsuyukiSugahara/Test
DirectX/ThirdParty/BulletPhysics/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp
#include "btOptimizedBvh.h" #include "btStridingMeshInterface.h" #include "LinearMath/btAabbUtil2.h" #include "LinearMath/btIDebugDraw.h" btOptimizedBvh::btOptimizedBvh() { } btOptimizedBvh::~btOptimizedBvh() { } void btOptimizedBvh::build(btStridingMeshInterface* triangles, bool useQuantizedAabbCompression, const b...
ALGO
0.97622
6.780021
c0d71b27-50d1-4316-b374-e6b59a7f4062
VKussler/oai_smf
src/oai-cn5g-common-src/utils/sdf_conversions.cpp
#include "conversions.hpp" #include "sdf_conversions.hpp" #include "Helpers.h" #include "logger_base.hpp" #include <regex> #include <fmt/format.h> #include <boost/algorithm/string/split.hpp> #include <boost/algorithm/string/trim.hpp> #include <boost/algorithm/string/classification.hpp> using namespace oai::utils; sd...
TOOL
0.955609
6.549607
0daa1bcd-a5f1-488b-97cd-a0962a38879d
LokeshMelkani07/DSA-Placement
15_day/7.cpp
#include<iostream> #include<vector> #include<algorithm> #include<unordered_map> #include<list> #include<queue> using namespace std; // Lecture 92: Cycle Detection in Directed Graph // Cycle detection in directed graph using BFS (Kahn's Algo) // TC: O(N+E) // SC: O(N+E) for queue, adj list int detectCycleInDirectedGra...
ALGO
0.999955
6.165276
c5e23ddb-6da8-4a15-9bf7-b470b9f6565a
Jay7221/competitve-programming
codeforces/global_rounds/GlobalRound24/B.cpp
#include<bits/stdc++.h> using namespace std; void solve(){ int n; cin >> n; int a[n]; for(int i = 0; i < n; ++i){ cin >> a[i]; } int mx = a[0]; for(int i = 1; i < n; ++i){ a[0] = gcd(a[0], a[i]); mx = max(mx, a[i]); } cout << (mx / a[0]) << '\n'; } int main(){ ios_base::sync_with_stdio(false); cin.tie(...
ALGO
0.999681
4.879272
55aed403-40b2-4209-aa3c-391eaf354560
linouk23/leetcode
524.cpp
// 524. Longest Word in Dictionary through Deleting - https://leetcode.com/problems/longest-word-in-dictionary-through-deleting #include "bits/stdc++.h" using namespace std; class Solution { private: bool isOK(const string &s, const string &pattern) { int start = 0; int n = (int)pattern.length();...
ALGO
0.999902
5.852087
84d5c995-d55e-4de2-b077-baa69d3fc02a
legendsovermyths/DSA
C++/ShortestPathInMine.cpp
#include <iostream> #include <vector> #include <algorithm> #include <stack> #include <queue> using namespace std; void printPath(vector<vector<bool>> &vis) { static int k = 1; cout << k++ << "-" << endl; for (int i = 0; i < vis.size(); i++) { for (int j = 0; j < vis[0].size(); j++) { ...
ALGO
0.999866
5.179676
ccae2a0b-e5d6-48ac-834c-167e87420409
XDEv11/Codeforces
Round#945_div2/C.cpp
//#pragma GCC optimize ("O3") #include <iostream> #include <vector> #include <utility> #define fi first #define se second #include <algorithm> using namespace std; static void solve() { int n; cin >> n; vector<int> p(n); for (auto& x : p) cin >> x; int p1{}; for (int i{0}; i < n; ++i) { if (p[i] == 1) p1 = ...
ALGO
0.999953
4.299509
e833c36b-66fe-438b-a3a4-a8147f76fa40
abdur-rafi/Codeforces-practice
1345C.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t;scanf("%d",&t); while(--t>=0){ int n;scanf("%d",&n); int a[n]; for(int i=0;i<n;++i) scanf("%d",a+i); set<int> s; bool pos = true; for(int i=0;i<n;++i){ if(s.empty() == false && s.find(((i+...
ALGO
0.999756
3.504833
b2c24a0c-7746-4730-8574-e58135fba40c
d3b5/Beecrowd-URI-solutions
cpp+c/Ages.cpp
#include<bits/stdc++.h> using namespace std; int main() { float x; float sum = 0; int cnt = 0; while(true) { cin >> x; if(x > 0) { cnt++; sum += x; } else if(x < 0) { break; } } float avg = sum/cnt ;...
ALGO
0.999939
3.920315
a7494ba1-d4a1-4303-80e9-aa5d0d295d6c
codxbrexx/codechef
166cc4.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int t; cin >> t; while(t--){ int n; cin >> n; vector<pair<int,int>> a(n); for(int i = 0; i < n; i++){ cin >> a[i].first; a[i].second = i; } sort(a.rbegin(), a.rend()); i...
ALGO
0.999812
4.183784
5ea43d0e-8453-4b11-ab76-dc3ac75f6a75
zrax/libvbox
lib/host.cpp
#include "libvbox_p.h" COM_WRAP_IFC(IHost) #if VirtualBoxSDK_VERSION >= VBox_MAKE_VERSION(6, 1, 0) \ && VirtualBoxSDK_VERSION < VBox_MAKE_VERSION(7, 0, 0) COM_WRAP_IFC(IHostUpdate) #endif #if VirtualBoxSDK_VERSION >= VBox_MAKE_VERSION(7, 1, 0) COM_WRAP_IFC(IHostX86) #endif #if VirtualBoxSDK_VERSIO...
TOOL
0.894059
5.566686
0747e3ab-e2fe-4334-87b5-52c7c77f3111
pershoot/android_frameworks_base
media/libstagefright/codecs/m4v_h263/dec/src/pp_semaphore_luma.cpp
/* ------------------------------------------------------------------------------ INPUT AND OUTPUT DEFINITIONS Inputs: xpred = x-axis coordinate of the MB used for prediction (int) ypred = y-axis coordinate of the MB used for prediction (int) pp_dec_y = pointer to the post processing semaphore for curren...
ALGO
0.999655
6.601039
bedc6f1f-9406-4374-95da-041ebb564aa8
nidepapa/PeterDB
src/ix/LeafNode.cpp
// // Created by Fan Zhao on 2/24/23. // #include "src/include/ix.h" namespace PeterDB { RC LeafNode::writeEntry(leafEntry *key, const Attribute &attribute, int16_t pos) { memcpy(data + pos, (uint8_t *) key, key->getEntryLength(attribute.type)); return SUCCESS; } RC LeafNode::insertEntry(...
TOOL
0.939603
4.498159
485d1435-dbbc-4bc1-a153-321ea6e04730
Ph0en1xGSeek/ACM
LeetCode/391.cpp
class Solution { public: bool isRectangleCover(vector<vector<int>>& rectangles) { unordered_map<int, int> mp1; unordered_map<int, int> mp2; for(auto rect: rectangles) { push(mp1, rect[0], rect[1]); push(mp1, rect[2], rect[3]); push(mp2, rect[0], rect[3]); ...
ALGO
0.999922
5.89535
b243bc52-df15-404f-9c45-3a3390337946
akshayyadav7667/cpp
c++ basic/106.cpp
#include<iostream> using namespace std; int found_missing(int arr[],int n,int key) { int start=1; int end=arr[n-1]; int count=0; for(int i=0;i<end;i++) { while(arr[i]>start) { count++; if(count==key) { return s...
ALGO
0.999955
4.157091
13632bfc-67ac-47c0-b62b-317a24b0abc1
hogyny/my-C-sample
incresArr.cpp
#include <time.h> #include <stdio.h> #include <stdlib.h> #include <math.h> int main() { srand(time(0)); printf ("This program print the array in increasing order and only array 3 is Change with Random number\n"); int i, size, sorts, des , z; int min=1, max =100; //int Even, Odd,zeros=0; printf ("Enter size ...
ALGO
0.997829
3.361171
ade3d610-74ef-47e8-ab24-ab005be31aff
KatsuyaKikuchi/ProgrammingContest
Codeforces/Div2/Round 626/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll, ll> pll; #define FOR(i, n, m) for(ll (i)=(m);(i)<(n);++(i)) #define REP(i, n) FOR(i,n,0) #define OF64 std::setprecision(10) const ll MOD = 1000000007; const ll INF = (ll) 1e15; void solve(vector<ll> &A) { ll N = A.size(); ...
ALGO
0.999714
4.348425
c1043eec-6645-4832-89f9-bb059197aa0a
arifparvez14/Basic-and-competetive-programming
Algorithm-and-DataStructure/Searching & Sorting/Marge Sort.cpp
#include <bits/stdc++.h> using namespace std; int arr[51]; int temp[51]; void merge_now (int st, int ed){ int mid = (st + ed) / 2; int cnt = 0, i, j; for (i = st, j = mid + 1; i <= mid && j <= ed; ){ if (arr[i] < arr[j]){ temp[cnt++] = arr[i]; i++; } else{ ...
ALGO
0.999994
4.351602
a840e34b-320b-4362-b12c-4b3fd6a58e93
dzhng/ARView
libs/opencv/modules/features2d/src/fast.cpp
/* The references are: * Machine learning for high-speed corner detection, E. Rosten and T. Drummond, ECCV 2006 * Faster and better: A machine learning approach to corner detection E. Rosten, R. Porter and T. Drummond, PAMI, 2009 */ #include "precomp.hpp" namespace cv { static int fast9CornerScore(const uns...
ALGO
0.999807
6.133832
ada15869-547e-48e3-8a83-1e48cae2f116
JanuszPawulon/ChancraftGPTP
AI/spells/defensive_matrix.cpp
#include "spells.h" #include <AI/ai_common.h> #include <hooks/tech_target_check.h> namespace AI { CUnit* findBestDefensiveMatrixTarget(const CUnit *caster, bool isUnderAttack) { int bounds; if (isUnderAttack) bounds = 32 * 9; else bounds = 32 * 64; auto defensiveMatrixTargetFinder = [&caster](const CU...
ALGO
0.989262
5.879934
760e1090-6a57-4aa8-8857-fed52bd2f7b3
ttungl/RLE-NOC
src/systemc/tests/systemc/misc/gnats/pr-52/pr-52.cpp
/***************************************************************************** pr-52.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /***************************************************************************** ...
TOOL
0.982505
4.478974
6724feb5-36c0-4614-b996-ddbf980932b7
Prakhar-FF13/Competitive-Programming
Hackerrank/Beautiful Triplets.cpp
#include <iostream> #include <cstring> using namespace std; bool BSearch(int *arr,int low,int high,int data) { if(low<=high) { int mid=(low+high)/2; if(data==arr[mid]) return true; else if(data > arr[mid]) return BSearch(arr,mid+1,high,data); else return BSearch(arr,low,mid-1,data); } return ...
ALGO
0.999819
3.59892
b364fa03-90d4-4b33-ac68-c7184f20fbe5
mitchellnouhan/leetCode
bitManipulation/hammingDistance.cpp
class Solution { public: int hammingDistance(int x, int y) { int res = 0; int x_or = x ^ y; for(int i = 0; i < 32; i++){ uint32_t bitmask = (0x80000000 >> i); if(bitmask & x_or){ res++; } } return res; } };
ALGO
0.999723
5.465667
e3d3be4c-22ae-4504-9463-1938a450f09b
GF3000/Asteroids-GF
Library/PackageCache/com.unity.ide.visualstudio@2.0.18/Editor/COMIntegration/COMIntegration~/COMIntegration.cpp
#include <iostream> #include <sstream> #include <string> #include <filesystem> #include <windows.h> #include <shlwapi.h> #include <fcntl.h> #include <io.h> #include "BStrHolder.h" #include "ComPtr.h" #include "dte80a.tlh" constexpr int RETRY_INTERVAL_MS = 150; constexpr int TIMEOUT_MS = 10000; // Often a DTE call m...
TOOL
0.954364
6.933585
ba058c9c-c449-4123-a993-5fe17a3035bf
Ayushnema704/GlobalTrend_Programming_Assessment
Ques_6.cpp
#include<bits/stdc++.h> using namespace std; int facto(int fact, int n){ if (n < 1) { cout << fact << endl; return 0; } facto(fact * n, n - 1); } int main(){ int n=5; facto(1,n); return 0; }
ALGO
0.999941
3.677857
91578407-6dba-4248-bef5-da5d528dc989
payshares/paysharesd
src/ripple_basics/utility/StringUtilities.cpp
//------------------------------------------------------------------------------ //============================================================================== #include "../../beast/beast/unit_test/suite.h" #include <boost/regex.hpp> #include <cstdarg> namespace ripple { // VFALCO TODO Replace these with someth...
TEST
0.944058
6.947135
962481dc-660c-4215-9c27-b18b340f1d38
mehulaswar06/DSAMe
Array/google_kickstart/arithmetic_array.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int a[n]; for(int i=0;i<n;i++){ cin>>a[i]; } int ans=2; int curr_ans=2; int pd=a[1]-a[0]; int j=2; while(j<n){ if(pd==a[j]-a[j-1]){ curr_ans++; } else...
ALGO
0.999538
3.917714
58f9c36a-d4ef-4b26-985c-add72cc0e9f4
kmjp/procon
yuki/2801-2900/2899.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define FORR2(x,y,arr) for(auto& [x,y]:arr) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define ...
ALGO
0.999973
4.497344
1d2bdba2-c9f7-4c78-a016-7aa681013849
SMiles02/cp-submissions
codeforces/1864/B.cpp
#include <bits/stdc++.h> #define ll long long #define sz(x) (int)(x).size() using namespace std; // mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); // uniform_int_distribution<int>(1000,10000)(rng) string to_upper(string a) { for (int i=0;i<(int)a.size();++i) if (a[i]>='a' && a[i]<='z') a[i]-=...
ALGO
0.999995
4.558186
332f7368-27e1-4673-8503-70bb7382e410
odorenskyi/Kobzar-Mykola-KN23
lab08/prj/Software/8.1.cpp
#include <math.h> #include <stdio.h> #include <windows.h> double s_calculate(double x, double y, double z) { return sin(x) / sqrt(fabs(y * z / (x + y))) + pow(3 * y, 5); } int main() { double x, y, z; printf("Enter the value for x: "); scanf("%lf", &x); printf("Enter the value for y: "); sca...
ALGO
0.994092
4.293254
f6ff3b5b-2782-4e85-97ae-1813d8be837d
vukadinovic936/CpProblems
pbds.cpp
#include <bits/stdc++.h> #define vi vector<int> #define pi pair<int, int> #define pd pair<double, double> #define vii vector<pair<int, int>> #define ll long long #define INF 1e9 #define EPS 1e-9 using namespace std; // POLICY BASED DATA STRUCTURE #include <bits/extc++.h> using namespace __gnu_pbds; typedef tree<int, n...
ALGO
0.99925
3.444502
45212942-31c1-4d8e-b386-0aa961083129
KT-1000/uc-sd-algorithms-data-structures
week3_greedy_algorithms/2_maximum_value_of_the_loot/fractional_knapsack.cpp
#include <iostream> #include <vector> using std::vector; double get_optimal_value(int capacity, vector<int> weights, vector<int> values) { double value = 0.0; // write your code here return value; } int main() { int n; int capacity; std::cin >> n >> capacity; vector<int> values(n); vector<int> weig...
ALGO
0.99988
4.844275
23452ec4-97a1-45a1-9142-fd9caf7e53a8
sukhoeing/aoapc-bac2nd-keys
contrib/zhangminchen/ch07/LA3784.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #include <queue> #include <vector> #include <stack> #include <map> #include <set> #include <sstream> #include <iomanip> #include <cmath> #include <bitset> #include <assert.h> using namespace std; typedef long long llong; t...
ALGO
0.999809
3.221868
f34a850a-c7e3-43ad-b4bf-9f96587823ad
Anubhav2907/DSA
sortingQues/binarySort.cpp
#include <bits/stdc++.h> using namespace std; void binarySort(int arr[], int n){ int i=0; int j = n-1; while(true) { while(arr[i]==0) { i++; } while(arr[j]==1) { j--; } if(i>j) return; swap(arr[i],arr[j]); ...
ALGO
0.999979
4.33032
80db6024-d457-4ee7-be6a-b04e67860855
ZahidAlNahid1/Grendel
Tutorials/C++/Statements_And_Operators/MixedExpressions/main.cpp
// Section 8 // Mixed Type Expressions /* Ask the user to enter 3 integers Calculate the sum of the integers then calculate the average of the 3 integers. Display the 3 integers entered the sum of the 3 integers and the average of the 3 integers. */ #include <iostream> using namespace std...
TOOL
0.909704
3.895197
24eac598-5e80-4a03-ac10-4926667d7c6a
hyungjlee/Algorithm2017
페어정렬2.cpp
#include <iostream> #include <vector> #include <algorithm> #include <functional> using namespace std; bool cmp(pair<int, int>& a, pair<int, int>& b) { if (a.second < b.second) return 1; else if (a.second == b.second) return a.first < b.first; else return 0; } int main(void) { int n; scanf("%d", &n); vecto...
ALGO
0.999706
3.990556
65a136ec-6496-439e-ab8c-e4d8311d66c6
vijaydasp/esp32-cam-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.998799
6.776823
c5e67c05-a294-41b0-83ee-bbb2b33e5636
liuq901/code
HD/hd_3637.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <string> #include <cstdlib> #include <map> using namespace std; typedef long long ll; string s,t; int main() { void calc(ll &,ll &,string &); pair <ll,ll> solve(ll,ll,ll,ll); int test; scanf("%d",&test); for (int id=1;id<=test;id++) { ...
ALGO
0.998573
3.36749
bac42f7e-1acd-486b-a29f-7d7990adff45
Katie927/CTDLGT_CodePTIT
DSA09008_.cpp
#include<iostream> #include<vector> using namespace std; vector<int> a[100001]; bool chuaxet[100001]; void DFS(int u) { chuaxet[u]=false; for(int i=0;i<a[u].size();i++) { int v=a[u][i]; if(chuaxet[v]) DFS(v); } } int main() { // freopen("CTDL.inp","r",stdin); // fre...
ALGO
0.999915
4.931264
a0d4a101-55d7-4882-aab9-cc801fcdc031
inayat-kaur/Canteen-Management
frontend/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.998473
6.785645
f9356477-92c7-4d87-b20c-4814c025a5f9
artjomereomin2/IIP
Tasks_1/2. Базовые операторы/2. Циклы/Task_2_2_15.cpp
#include <iostream> #include <cmath> using namespace std; int main15() { int n; do { setlocale(LC_ALL, "Rus"); double a, b, h; cout << " a, b h ( ): "; cin >> a >> b >> h; for (double x = a; x <= b; x += h) { cout << x << " - "; double kor_otr = x - 3; // double del_0 = 1 - sqrt(kor_otr); // ...
ALGO
0.998915
3.08089
0e72f910-bd3c-4b97-be08-d58456ffb395
hiyouga/CPP-Learning
examples/oo/inline.cpp
#include <iostream> inline double square(double x) { return x * x; } int main() { using namespace std; double a = 13; cout << square(a++) << endl; cout << a << endl; return 0; }
TOOL
0.932675
4.837507
d42c6758-5503-4449-a1f3-bea2f6e17286
MehdiN/quadcopter_ros
controller/src/PID.cpp
#include "controller/PID.h" // Contructor PID::PID(): _measure(0), _dt(0.01), _low_val(0), _high_val(1) { _gains.kp = 1; _gains.ki = 0; _gains.kd = 0; _gains.kt = 0; _gains.tf = 1; _init = false; } void PID::init_or_reset_PID() { _output = 0; _integrator = 0; _derivative = 0; ...
TOOL
0.855563
6.001282
ba7e0654-6273-41cb-937e-377c5377c36f
Jminis/Custom-llvm
my-llvm-project/clang-tools-extra/clangd/FileDistance.cpp
#include "FileDistance.h" #include "URI.h" #include "support/Logger.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/Path.h" #include <queue> namespace clang { namespace clangd { // Convert a path into the canonical form. // Canonical form is either "/", or "/segment" * N: ...
ALGO
0.981551
7.562714
168e557a-b15a-45fd-9eac-23e07df953a6
Ishan-77/DSA
1642-furthest-building-you-can-reach/1642-furthest-building-you-can-reach.cpp
class Solution { public: int furthestBuilding(vector<int>& heights, int bricks, int ladders) { priority_queue<int,vector<int>,greater<int>>pq; // min-heap for(int i=0;i<heights.size()-1;i++) { int diff = heights[i+1]-heights[i]; if(diff > 0) pq.push(diff); ...
ALGO
0.999929
6.357335
26c269b4-b271-4a2d-bac2-3beb0dd0e17c
Vaskonti/UP-2021-tasks
exam_preparation/exam_preparation.cpp
#include <iostream> #include <cstring> const int MAX_SIZE = 100; bool isPowerOfTwo(int n) { if (n == 1) return true; if(n % 2 == 0) return isPowerOfTwo(n / 2); return false; } int main1() { int n; std::cout<<"Enter n:"; std::cin>>n; int matrix[MAX_SIZE][MAX_SIZE]; for ...
ALGO
0.999964
3.237761
087bcd5f-d1ca-4f0c-9c72-51d0c7be33a1
Glenncroles/My-Projects
Comp org/src/Comp org.cpp
#include <iostream> using namespace std; class Hex { protected: int num; public: Hex(int num); void DtoH(int n); void rem(int n); }; Hex :: Hex(int num) { this->num = num; } void Hex :: DtoH(int n) { int r = n/16; //if our number is less than 16 then print it out in hexadecimal if(r == 0) { //calls the r...
ALGO
0.99763
5.322875
11664335-b469-4510-8bcf-d10a4d634208
Ali-hey-0/opencv
modules/imgproc/src/samplers.cpp
#include "precomp.hpp" namespace cv { static const uchar* adjustRect( const uchar* src, size_t src_step, int pix_size, Size src_size, Size win_size, Point ip, Rect* pRect ) { Rect rect; if( ip.x >= 0 ) { src += ip.x*pix_size; rect.x = 0; } else { ...
ALGO
0.990051
5.696206
ec78d369-a3af-4823-886b-db136448b0c4
kkichaev/napoleon
Napoleon.ce/Core/Napoleon.sql/Pda/Core/MainFrame.cpp
#include "stdafx.h" #include <Module.h> #include "MainFrame.h" #include <map> #include "Progress.h" #include "BaseDialog.h" #include "About.h" #include "FormEntries.h" #include <NapoleonRes.h> #include "Progress.h" //#include <projects.h> #include <StdFuncs.h> #include "TopApp.h" #include <NplConfig.h> #include <SQ...
TOOL
0.881891
4.496093
e5f197a7-c951-4c75-8fbe-22465881c177
BlackCatCode22/final-program-c-spr-24-SherlockHomeboi
main.cpp
#include <iostream> #include <vector> #include <chrono> using namespace std; using namespace std::chrono; class Contact { private: string name; string phoneNumber; string email; public: Contact(string name, string phoneNumber, string email) : name(move(name)), phoneNumber(move(phoneNumber)), emai...
ALGO
0.999022
6.884542
7fcd34be-5ae3-4c57-b941-8fc3f610cc8c
qkenr7895/deobfuscation
pin/source/tools/MemTranslate/memory_addr_callback.cpp
#include <iostream> #include <fstream> #include "pin.H" #include "instlib.H" using std::hex; using std::ios; using std::ofstream; ofstream OutFile; // Counters static UINT64 icountMemRead = 0; static UINT64 icountMemRead2 = 0; static UINT64 icountMemWrite = 0; static UINT64 icountMemOp = 0; static UINT64 icountMe...
TOOL
0.902574
4.851791
63d3cc69-0d86-47f7-b67f-617b4dd2a290
Yhc889/FEF
src/ripple/rpc/handlers/PathFind.cpp
#include <ripple/app/ledger/LedgerMaster.h> #include <ripple/app/main/Application.h> #include <ripple/app/misc/NetworkOPs.h> #include <ripple/app/paths/PathRequests.h> #include <ripple/net/RPCErr.h> #include <ripple/protocol/ErrorCodes.h> #include <ripple/protocol/jss.h> #include <ripple/resource/Fees.h> #include <ri...
WEB
0.923032
4.397811
95b75c6d-e8ca-402e-9dfd-fac71636e90d
mikedesu/projecteuler
5/main.cpp
#include <iostream> // #include <vector> using std::cout; using std::endl; // using std::vector; int main() { // vector<bool> conditions; const int max = 20; for (int n = 1;; n++) { bool satisfies = true; for (int i = 1; i <= max; i++) { if (n % i != 0) { satisfies = false; brea...
ALGO
0.998331
4.409245
2664bc4c-795a-463c-b86e-ca3616123984
hoangtien2k3/Code
Can_Ban.cpp
#include<iostream> using namespace std; int ChiHet (int n, int a[]) { int sum = 0; for (int i = 0; i < n; i++) { if (a[i] % 5 == 0) { sum += a[i]; } } return sum; } int GiaTriLe (int n, int a[]) { int count = 0; for (int i = 0; i < n; i++) { if (a[i] % 2 !=...
ALGO
0.999291
3.511709
b329b7d5-0a60-483f-8e38-35b915244cff
Chan531/BaekJoon_Online_Judge
발머의피크이론.cpp
#include <iostream> #define min 129 #define max 138 using namespace std; int n, l, ans, arr[1000000]; void input() { cin >> n >> l; for (int i = 0; i < n; i++) cin >> arr[i]; } void solution() { double alc = 0; l *= -1; for (int i = 0; i < n; i++) { alc += arr[i]; if (l >= 0) alc -= arr[l]; if ...
ALGO
0.999923
3.129641
25c1f151-e294-4aa7-a976-e77642e81a39
Jev1337/AMS
AMS/libraries/opencv/sources/modules/core/src/lpsolver.cpp
#include "precomp.hpp" #include <climits> #include <algorithm> #include <cstdarg> #define dprintf(x) #define print_matrix(x) namespace cv { using std::vector; #ifdef ALEX_DEBUG static void print_simplex_state(const Mat& c,const Mat& b,double v,const std::vector<int> N,const std::vector<int> B){ printf("\tprint ...
ALGO
0.999958
5.886865
10c37427-2e93-4275-a366-54ffa13bd7ae
korniarp/DS-Algo
Cyclic rotation of array by one.cpp
#include <iostream> using namespace std; void rotate(int a[], int n) { int i = 0, j = n-1; // i and j pointing to first and last element respectively while(i != j) { swap(a[i], a[j]); i++; } } // Driver code int main() { int a[] = {1, 2, 3, 4, 5}, i; int n = sizeof(a) /sizeo...
ALGO
0.999939
4.933863
a9203e3d-1073-4eaf-bab4-dcc585449cd1
raincross7/code-similarity
codes/train_code/problem113/problem113_397.cpp
#include <bits/stdc++.h> #define ll long long #define V vector<long long> #define VV vector<vector<long long>> #define VVV vector<vector<vector<long long>>> #define rep(i,n) for(ll (i)=0;(i)<(n);++(i)) using namespace std; V kai; V ikai; ll mod=1e9+7; ll mpow(ll x, ll n){ ll ans = 1; while(n != 0){ if...
ALGO
0.999965
3.791289
f8ffca9c-e782-4b8f-a5d1-792c4eee5b67
ishandutta2007/codeforces
flowerletter/normal/997/D.cpp
/*mjytxdy!*/ #include <bits/stdc++.h> #define rep(i, a, b) for(int i = (a); i <= int(b); i++) #define per(i, a, b) for(int i = (a); i >= int(b); i--) #define fi first #define se second #define all(s) s.begin(),s.end() #define trv(i, u) for(int i = head[u]; i; i = e[i].next) #define sz(s) (int)(s.size()) using namespace...
ALGO
0.999938
4.104738
a2860230-9a9c-404d-a8cc-406b93492f4d
tranHieuDev23/solution-spoj-cf
Bài của Lord Hiếu/HEAVY/HEAVY.cpp
#include <bits/stdc++.h> #define FOR(i, j, k) for (int i = j; i <= k; i ++) #define FORD(i, j, k) for (int i = j; i >= k; i --) #define mn 5003 #define mn2 15003 #define maxC 1000000007 #define pb push_back #define F first #define S second #define mp make_pair using namespace std; struct trie { int val; trie* ...
ALGO
0.999993
3.881346
8b7b4d6e-265a-4b90-ac70-58db60122655
dibendughosal/CPP
tPattern1.cpp
#include<iostream> using namespace std; int main(){ int count; cin>>count; for (int i = 0; i < count; i++) { for (int j = 1; j <= i+1; j++) { cout<<j; } cout<<endl; } }
ALGO
0.999812
3.911098
a1d16d58-517b-44c2-8324-cbef3cbb9c90
zjypls/Engine_Tutorial
Engine/Include/assimp/code/PostProcessing/ImproveCacheLocality.cpp
/** @file Implementation of the post processing step to improve the cache locality of a mesh. * <br> * The algorithm is roughly basing on this paper: * http://www.cs.princeton.edu/gfx/pubs/Sander_2007_%3ETR/tipsy.pdf * .. although overdraw reduction isn't implemented yet ... */ // internal headers #include "Pos...
ALGO
0.995398
6.374086
49826369-6f67-415b-9d91-0b730edc28d8
u413-284-si/push_swap
push_swap_visualizer/src/pushswap.cpp
#include "pushswap.h" #include "utils.h" #include <array> #include <cstdio> #include <memory> #include <stdexcept> #include <string> PushSwap::PushSwap() : path{"./push_swap"} {} PushSwap::~PushSwap() {} void PushSwap::run(const std::string &numbers) { this->commands.clear(); std::array<char, 128> buffer; std::...
ALGO
0.965439
4.568367
2eb69916-532f-42d6-bae7-6f3e7827eba1
ishandutta2007/codeforces
wifiiii/normal/1490/D.cpp
#include<bits/stdc++.h> typedef long long ll; using namespace std; const int maxn = 1000005; int stk[maxn], a[maxn], ls[maxn], rs[maxn], tp=0, cnt=0; void insert(int x) { int k=tp;a[++cnt]=x; while (k>0&&a[stk[k]]<a[cnt]) k--; if(k) rs[stk[k]]=cnt; if(k<tp) ls[cnt]=stk[k+1]; stk[++k]=cnt; tp=k...
ALGO
0.999979
4.363966
bdce64d8-70c4-4581-91c3-d10d939cd6e8
Asik8/My-Codeforces
Old Codes/B_Bogosort.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define pbs insert #define pi pair<ll,ll> #define py cout<<"YES\n"; #define pys cout<<"Yes\n"; #define pn cout<<"NO\n"; #define pns cout<<"No\n"; #define co(x1) cout<<x1<<"\n"; #define ct(x1) cout<<x1<<" "; #define elc cout<<"\n"; #...
ALGO
0.999847
4.492616
78cffe65-0d0d-485a-b4e7-ed7a3619ea18
Krasnoffsky/Study
Course 3 Sem 1/S&S/Практики/Prac4/lab4.cpp
#include <iostream> #include <cmath> using namespace std; void MatrixRotation (double fi, double x, double y, double* x_res, double* y_res){ *x_res = (x * cos(fi) + y * sin(fi)); *y_res = (y * cos(fi) - x * sin(fi)); } int main (void){ double x, y, fi; double* x_res = new double; double* y_res = new doub...
ALGO
0.999401
4.08733
11461903-f51b-403d-9558-bccb30f557ef
harshvarmora28/competitive_programming
DEC21C/UTKPLC.cpp
// Author: Harsh Varmora // Problem Link: https://www.codechef.com/DEC21C/problems/UTKPLC // Date: 6 December,2021 #include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; char first, second, third, x, y; while(t--){ cin>>first>>second>>third; cin>>x>>y; ...
ALGO
0.99993
4.81813
2754ce7f-79a7-4c7b-9419-ad8a8d17ef8e
lgmamaniap/leet-code-practice
exercises/easy-level/countSquare.cpp
// 1925. Count Square Sum Triples #include <iostream> using namespace std; int countTriples(int n) { int count = 0; for (int i = 3; i <= n; i++) { for (int j = i + 1; j <= n; j++) { int ab = (i * i) + (j * j); int r = sqrt(ab); if (r*r == ab && r <= n) count += 2; } } ...
ALGO
0.998843
4.997262
ab9cb055-a4b2-45d1-bbfd-b711ab245107
fortune-max/cforce_cpp
DIV2/371A_1000_DIV2_k-periodic_array.cpp
// // Created by fme on 13/11/2021. // #include <bits/stdc++.h> using namespace std; int main(){ int n, k, nk, tmp, ans=0; cin >> n >> k; nk = n/k; vector <int> ones(k, 0), twos(k, 0); for (int i=0;i<nk;i++){ for(int j=0;j<k;j++){ cin >> tmp; ones[j] += tmp == 1 ? 1...
ALGO
0.999958
3.89669
25469c8d-220d-40ba-b450-4ccc85aa10ee
AKsHaT123456A/codeAlong
516-longest-palindromic-subsequence/longest-palindromic-subsequence.cpp
class Solution { public: int lcs(string& s, int index1, int index2, vector<vector<int>>& dp) { if (index1 <0 || index2 >= s.size()) return 0; if (dp[index1][index2] != -1) return dp[index1][index2]; if (s[index1] == s[index2]) return dp[index1][index2] = 1 + lcs(s, index1-1, inde...
ALGO
0.999959
6.172945
342cb957-159f-4bc5-9e5a-2d48f0961e42
manishya1669/MyLeetcodeJourney
792-number-of-matching-subsequences/792-number-of-matching-subsequences.cpp
class Solution { public: unordered_map<string,int> count; bool issubseq(string word, string s){ int j=0; int i=0; while(i<s.size() && j<word.size()){ if(s[i]==word[j]){ i++; j++; } else i++; } return j==word.size(); } i...
ALGO
0.999992
5.908139
96d8afd3-7c98-41fe-ba4d-88a33ab2bc59
WTJ-github-ing/CPPAdvanced-Learning-Record
C++进阶学习记录/4.函数模板案例.cpp
#include<iostream> using namespace std; /* úģװһĺԲͬ ѡ charintвԡ */ //ģ template<typename T> void mySwap(T &a, T &b) { T temp = a; a = b; b = temp; } //ģ template<typename T> void SelectSort(T arr[],int len) { for (int i = 0; i < len; i++) { int max = i; //϶ֵ± for (int j = i + 1; j < len; j++) { //϶ıȱֵС ...
ALGO
0.996336
4.187363
6e0b28ec-52f2-4a43-b620-b62f30818be1
trsteel/tools
codechef/Challenge/2021 January/ORAND*.cpp
#include <iostream> #include <string.h> #include <stack> using namespace std; const long maxn = (1L << 20) + 5; long t, n, m, a[maxn], b[maxn]; bool vis[maxn]; long long dfs(long x) { if (!vis[x]) return 0; long long res = 0; for (long i = 0; i < n; i++) { if (vis[x | a[i]]) continue; vis[...
ALGO
0.999919
4.343313
4248fb64-5f83-4580-965b-4ef561aa4468
Anup0099/450DSA_Question
src/PASSWORD.cpp
#include <bits/stdc++.h> using namespace std; // Monocarp has forgotten the password to his mobile phone. The password consists of 4 digits from 0 to 9 (note that it can start with the digit 0). // Monocarp remembers that his password had exactly two different digits, and each of these digits appeared exactly two time...
ALGO
0.996722
5.598654
4b8aad65-c320-4350-be68-2c1b0036ae75
Kartik-Mathur/cpp4june
Lecture-12-StringsAnd2D/ReverseString.cpp
#include <iostream> #include <cstring> using namespace std; int main() { char a[] = "Coding"; int i = 0, j = strlen(a) - 1; while (i < j) { swap(a[i], a[j]); i++; j--; } cout << a << endl; return 0; }
ALGO
0.998784
3.163453
334bf1a1-500c-41e6-9467-b4c278b811d9
ishandutta2007/codeforces
sooke/normal/704/C.cpp
#include <bits/stdc++.h> inline int read() { char c, _c; int x; for (c = _c = getchar(); !isdigit(c); c = getchar()) { _c = c; } for (x = 0; isdigit(c); c = getchar()) { x = x * 10 + c - '0'; } return _c == '-' ? -x : x; } const int mod = 1e9 + 7; inline int add(int x, int y) { return x + y >= mod ? x + ...
ALGO
0.999955
4.228645
f345cb8d-6993-4165-bba2-4b0f9e02601c
dl8sd11/online-judge
aizu/1393.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<int, ll> pil; typedef pair<int, ll> pli; typedef pair<double,double> pdd; #define SQ(i) ((i)*(i)) #define MEM(a, b) memset(a, (b), sizeof(a)) #define SZ(i) int(i.size()) #define FOR(i, ...
ALGO
0.999856
3.772835
ee2e84d2-e2b5-4e91-be10-c70a9e4b8a22
Doffery/POJ
basic/1185u/c1185.cpp
#include<cstdio> #include<vector> #include<cstring> using std::vector; //int map[100][10]; int data[100]; int state[65]; int state_rev[1024]; int num[65]; int dp[100][65][65]; int dplmax[100][65]; vector<int> vecdp[100]; int N, M; int state_num; void Init() { int i, j, s; state_num = 0; for(i = 0; i < (1 << ...
ALGO
0.999686
3.538731
d9c02ff9-42a4-4ed1-bc1a-1e5923790aaa
gracygulati7/100DaysOfCode
Day 38/max_compatability.cpp
//! leetcode question 1947. Maximum Compatibility Score Sum //? link: https://leetcode.com/problems/maximum-compatibility-score-sum/description/ #include <iostream> #include <vector> #include <algorithm> #include <climits> using namespace std; class Solution { public: int maxCompatibilitySum(vector<vector<int>>& ...
ALGO
0.999911
6.760746
25eaec5d-790e-4b63-846c-632dcf7ead95
keirond/problems
cfs/done/427C.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; constexpr char nl [[maybe_unused]] = '\n'; // ************************************************************************** vector<int> cost; vector<vector<int>> adj; vector<pair<int, int>> ans; vector<int> disc, lowlink; vector<bool> vt; deque<int>...
ALGO
0.999954
5.026818
c880aebd-d6d6-4983-9557-eb8656451519
Arun03Kumar/leetcode_sol
0377-combination-sum-iv/0377-combination-sum-iv.cpp
class Solution { public: int recursion(vector<int>& nums, int rem_sum, int idx) { if(idx >= nums.size()) return 0; if(rem_sum == 0) return 1; int take = 0; if(take <= rem_sum) { take = recursion(nums, rem_sum - nums[idx], 0); } int skip = recurs...
ALGO
0.999963
6.126868
07a212fe-0fe4-4858-abb6-43d6cd03d561
Everett6802/finance_analyzer
data_algorithm.cpp
#include <math.h> #include <assert.h> #include <stdexcept> #include "data_algorithm.h" using namespace std; static const int BUF_SIZE = 256; static char errmsg[BUF_SIZE]; //#define DO_DEBUG #define IMPLEMENT_SINGLE_INPUT_FORMULA_FUNCTION(X)\ float X(const PFINANCE_DATA_ARRAY_BASE finance_data_array, PFINANCE_BOOL_DA...
TOOL
0.926463
6.507901
f5b63bbd-8146-45c9-9a86-40546f19a466
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/CodeLlama/top0-100/maximum-rows-covered-by-columns-Solution.maximumRows/177927_nan.cpp
PHP_FUNCTION(openssl_seal) { zval *pubkeys, *pubkey, *sealdata, *ekeys, *iv = NULL; HashTable *pubkeysht; EVP_PKEY **pkeys; zend_resource ** key_resources; /* so we know what to cleanup */ int i, len1, len2, *eksl, nkeys, iv_len; unsigned char iv_buf[EVP_MAX_IV_LENGTH + 1], *buf = NULL, **eks; char * data; size...
ALGO
0.990641
5.740564
a1377ba6-b588-45bf-9ac4-80d7c7a4d641
Kaiyour/EduSchedule
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.998733
6.76775
84d14aa9-0ba1-46aa-919e-97d54b467351
SadiHassan/Codeforces
CodeforcesRound291/B.cpp
#include<stdio.h> #include<iostream> #include<algorithm> using namespace std; int main(){ double slope[1010], x0, y0, x[1010], y[1010], eps = 0.00001; int N; cin>>N>>x0>>y0; for(int i=0; i<N; i++) cin>>x[i]>>y[i]; for(int i=0; i<N; i++) { if((x[i] - x0)== 0) slope[i] = 10009; else slope[i] = (y[i] ...
ALGO
0.999905
3.565042
03f45c51-0efb-419b-8158-f854052676e7
mer4ir/IBAS6111
1 semester/labarotory work 2/laba2.2.cpp
#include <stdio.h> #include <locale.h> #include <math.h> // Функция для вычисления значения функции с использованием ряда double fs(double x, double e) { int n = 1; double t = pow(-1, n)*((pow(x, 2*n+1)*2*n)/(tgamma(2*n+1))); // первый член ряда double ss = t; while (fabs(t) > e) // продолжаем, пока чл...
ALGO
0.999886
4.436676
feed8fa0-85db-4b0b-a339-a88cd499c828
twelckle/Data-Strcutures
Lab 12/lab12_avl.cpp
using namespace std; class Node { private: int key; Node* left; Node* right; public: Node(int key); ~Node(); int getKey() { return this->key;} friend class AVL; }; Node::Node(int key) { this->key = key; this->left = nullptr; this->right = nullptr; } Node::~Node() { //cout<<"deleted.."<<this->key<<...
ALGO
0.998114
3.655842
43f13716-cb1d-4870-956a-ace335340c79
g-holali-david/kafka-project
applications/taxi_bornes_app/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.998661
6.76775
e6f25c42-9b2f-480d-82f2-f5a16fb6caca
Mohd-3/Codeforces-Solutions
Normal/1244/C.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; ll n, p, w, d, x, y, z, p2, w2; int main() { scanf("%lld%lld%lld%lld", &n, &p, &w, &d); if (!p) { printf("0 0 %lld\n", n); return 0; } w2 = w; w -= d; p2 = p-n; x = p2 / w; y = (p - w2 * x) / d; if ...
ALGO
0.999901
3.677957
f6303eaf-b97b-4fd6-aad8-677f43918ab2
TarunSFDC/DSAWithTarun
LinearSerach.cpp
#include <iostream> using namespace std; bool search(int arr[], int size, int key) { for(int i=0; i<size; i++) { if(key == arr[i]) { return true; } } return false; } int main() { int arr[100]; cout<< "Enter elements for Array: " <<endl; for(int i=0; i<10; i++) ...
ALGO
0.999658
4.041823
c6c131bf-548b-4eee-9e18-b670ecbdb439
SamuelAdamson/zero-to-hero
LC/graph/LC_210/courseScheduleII.cpp
class Solution { public: bool dfs(vector<vector<int>>& graph, vector<int>& status, vector<int>& result, int i, int n) { bool possible = true; for(int j = 0; j < n && possible; j++) { if(graph[i][j]) { if(status[j] == -1) possible = false; else if(...
ALGO
0.999999
6.409915
b184786f-9613-44bd-8270-adb0b9ef965b
abhay121kumar/Ninja
assignemnt Recurssion/recursion1.cpp
#include<iostream> using namespace std; // Without PMI // int fact(int n) // { // cout<<n<<endl; // if(n==0) // { // return 1; // } // int smalloutput = fact(n-1); // return n * smalloutput; // } // int main() // { // int n; // cin>>n; // ...
ALGO
0.999948
5.588208
4ae58850-b979-4abf-976b-ba0309308c29
ishandutta2007/codeforces
maksim1744/normal/1185/E.cpp
/* author: Maksim1744 created: 19.06.2019 18:18:08 */ #include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define mp make_pair #define pb push_back #define eb emplace_back #define sum(a) ( accumulate ((a).begin(), (a).end(), 0ll)) #define mine(a) (*mi...
ALGO
0.999964
4.063779
c573a81e-4e0f-43e6-8c7d-42af3327c1cb
ema-pandilova/SP-2024
aud3/zad4.cpp
// // Created by ema on 15.10.24. // #include <iostream> using namespace std; // Од тастатура се внесуваат координати на една точка од рамнина. Да се напише програма со која ќе се испечати на кој квадрант припаѓа внесената точка. int main() { int x,y; cin>>x>>y; if(x>0){ if(y>0) { cout...
ALGO
0.998634
4.286717
d1f02e0d-49dc-46cd-865f-01c647bc5168
Trefex/arduino-airquality
aq6s/StandardCpp/char_traits.cpp
#define __UCLIBCXX_COMPILE_CHAR_TRAITS__ 1 #include <basic_definitions> #include <char_traits> namespace std{ _UCXXEXPORT const char_traits<char>::char_type* char_traits<char>::find(const char_type* s, int n, const char_type& a){ for(int i=0; i < n; i++){ if(eq(s[i], a)){ return (s+i); } } return 0; } _UC...
TOOL
0.911721
5.091949
898cb3cb-5a53-447c-8668-4b63b6dc1a9f
righthand0521/LeetCode
src/1657.cpp
#include <algorithm> #include <iostream> #include <vector> using namespace std; class Solution { public: bool closeStrings(string word1, string word2) { bool retVal = false; int word1Size = word1.size(); int word2Size = word2.size(); if (word1Size != word2Size) { re...
ALGO
0.999686
5.827323
79dda002-3e59-49c6-a11e-55ab92427b00
mdbrnowski/competitive-programming
Codeforces/1513B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; constexpr int MOD = 1e9+7; int solve() { int n; cin >> n; vector<int> b(n); for (auto& x : b) cin >> x; int mini = *min_element(b.begin(), b.end()); int k = 0; for (auto x : b) { if (x == mini) k++; if ((mi...
ALGO
0.999963
5.201097
2d155da6-573d-4d08-950d-5dd495419bc8
savbatovasadbek/Issues_in_Cpp
Video_yuklash_Sardor_amaki/main.cpp
#include <iostream> #include <math.h> using namespace std; int main() { int S, C, T, res; cin >> S >> C >> T; if ((1 < S) && (S > C) && (T < 1000)) { res = S / C; if (S % C >= (C * 0.5)) {res++;} cout << "Sardor amaki "<< res << " sekund kutishi kerak."; } else { cout...
ALGO
0.998702
3.792698