uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
36fb511d-e94d-4617-8374-c96a7516f9b0
Tastypotato245/boj
1/19944/main.cpp
// https://www.acmicpc.net/problem/19944 // github/Tastypotato245/boj #include <iostream> #include <algorithm> using namespace std; int N, M; void Solve() { cin >> N >> M; if (M == 1 || M == 2) cout << "NEWBIE!"; else if (M <= N) cout << "OLDBIE!"; else cout << "TLE!"; } int main(void) { ios::sync_with...
ALGO
0.99401
3.985303
c94df70e-013f-4066-ae12-df74ee813618
NickAmels/orbslam-windows
Thirdparty/eigen/test/sparse_solvers.cpp
#include "sparse.h" template<typename Scalar> void initSPD(double density, Matrix<Scalar,Dynamic,Dynamic>& refMat, SparseMatrix<Scalar>& sparseMat) { Matrix<Scalar,Dynamic,Dynamic> aux(refMat.rows(),refMat.cols()); initSparse(density,refMat,sparseMat); refMat = refMat * refMat.adjoint(); for (i...
TEST
0.866491
5.216745
71d2cb75-3713-4196-9dd1-b48e72c1cf43
wsalazarq/13_matrices
matrices2.cpp
#include <iostream> using namespace std; int main() { int n; cout<<"Ingrese el tamaño de la matriz cuadrada: ";cin>>n; int matriz[n][n]; for (int i = 0; i < n; i++){ for (int j = 0; j < n; j++){ cout<<"Ingrese el valor de la posicion ["<<i+1<<"]"<<"["<<j+1<<"]";cin>>matriz[i][j]; ...
ALGO
0.998004
3.581107
438f1e40-a9ea-4b1a-8a44-8e9aecdf93b0
rualark/YandexContest
GenBrackets/GenBrackets.cpp
// () // (()), ()() // ((())), (()()), (())(), ()(()), ()()() #include <string> #include <iostream> using namespace std; void genb(int n, int ob, int cb, string st) { if (st.length() == 2 * n) { cout << st << endl; return; } if (ob < n) genb(n, ob + 1, cb, st + '('); if (cb < ob) genb(n, ob, cb + 1, st +...
ALGO
0.999775
4.821921
ef6be91e-88e4-4478-8bed-5803497279fd
SHAHYASHNILESH/Competitive_Programming
LeetCode_Asteroid Collision.cpp
//735. Asteroid Collision //Link:-https://leetcode.com/problems/asteroid-collision/description/?envType=study-plan-v2&envId=leetcode-75 class Solution { public: vector<int> asteroidCollision(vector<int>& asteroids) { stack<int>st; for(int i=0;i<asteroids.size();i++){ if(st.em...
ALGO
0.999983
5.653964
3d76bca9-918b-4318-b976-b83656318581
pwojcikdev/nano-node-fastlane
nano/node/distributed_work.cpp
#include <nano/boost/asio/bind_executor.hpp> #include <nano/node/distributed_work.hpp> #include <nano/node/node.hpp> #include <nano/node/websocket.hpp> #include <boost/algorithm/string/erase.hpp> std::shared_ptr<request_type> nano::distributed_work::peer_request::get_prepared_json_request (std::string const & request...
WEB
0.953254
7.312415
90661b1e-9283-4788-a3f7-c9409b850230
codgician/competitive-programming
HDUOJ/1392/graham_scan.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <string> #include <algorithm> #include <cmath> #include <climits> #include <iomanip> #define SIZE 101 using namespace std; typedef struct _Dot { int x; int y; } dot; dot arr[SIZE]; int getCrossedProduct(dot a, dot b) { return a.x * b.y - b...
ALGO
0.999081
4.144321
b2f7e8c6-f91d-48b9-8263-dfe2af12613e
maricarmen5/jutge-my-repository
src/P34279.cpp
#include <iostream> using namespace std; int main () { int x, y, z; cin >> x >> y >> z; ++z; if (z == 60) { z = 0; ++y; } if (y == 60) { y = 0; ++x; } if (x == 24) x = 0; if (0 <= x and x < 10) cout << '0' << x << ':'; else cout << x << ':'; ...
ALGO
0.973565
3.937922
b5770a96-7fd2-4be0-a501-7e8862e71aa8
ishandutta2007/codeforces
gyh20/normal/1606/F.cpp
#include<bits/stdc++.h> #define re register #define ll long long using namespace std; const int Mxdt=1000000; // inline char gc(){ static char buf[Mxdt],*p1=buf,*p2=buf; return p1==p2&&(p2=(p1=buf)+fread(buf,1,Mxdt,stdin),p1==p2)?EOF:*p1++; } inline char pc(char ch,bool bj){ static char buf[Mxdt],*p1=buf,*p2=buf+Mx...
ALGO
0.99993
3.803156
594ff39f-c56f-45c8-991e-bd724782c81c
theshameem/OJ-Solve
LOJ/loj1331/loj1331.cpp
/* Solved! Time: 05:01:20 PM Date: 10-07-18 */ #include <bits/stdc++.h> using namespace std; #define d double int main(){ freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); d r1, r2, r3; int cases = 0, t; cin >> t; while(t--){ cin >> r1 >> r2 >> r3; ...
ALGO
0.999777
4.402454
04a0a73e-2d11-4ba7-b6fa-02f8090ee36d
deepti-iiitr/LeetCode_Practice
242-valid-anagram/242-valid-anagram.cpp
class Solution { public: bool isAnagram(string s, string t) { sort(s.begin(), s.end()); sort(t.begin(), t.end()); return s==t; } };
ALGO
0.999991
6.070817
f0802f1e-28e6-4669-8dc6-5e955ce09a60
mdyeasinaraf07/Phitron_XPSC
Week-5/Day-7/XPSC-Week5-d7-Candies-and-Two-Sisters.cpp
#include <bits/stdc++.h> using namespace std; void solve(){ long long n; cin>> n; if(n % 2 == 0){ int ans = (n / 2) - 1; cout<< ans<< endl; } else{ int ans = n / 2; cout<< ans<< endl; } } int main(){ int t; cin>> t; while(t--){ solve(); }...
ALGO
0.999597
5.410444
31cfc996-0efa-4ef1-b41a-73d290198e65
animikhaich/NeRF-Editing-GP
TetWild/extern/libigl/include/igl/snap_to_fixed_up.cpp
template <typename Qtype> IGL_INLINE void igl::snap_to_fixed_up( const Eigen::Quaternion<Qtype> & q, Eigen::Quaternion<Qtype> & s) { using namespace Eigen; typedef Eigen::Matrix<Qtype,3,1> Vector3Q; const Vector3Q up = q.matrix() * Vector3Q(0,1,0); Vector3Q proj_up(0,up(1),up(2)); if(proj_up.norm() == 0) ...
ALGO
0.983937
4.913263
bd90d209-1e39-469a-a3ea-ec7ce85684e6
IPA3211/StudyCpp_Algorithm
inflearn/Lesson1/15. 소수의 개수/main.cpp
#include <iostream> #include <string> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ bool isPrime(int x){ if(x < 2) return false; for(int i = 2; i * i <= x; i++){ if (x % i == 0) return false; } return true; } int main(int argc...
ALGO
0.999317
4.698726
f2c2e753-82cd-4ed6-b64e-1c9f9c15491e
shubhamrevankar/6companies30days
Microsoft/14.cpp
class Solution { public: int gcd(int a, int b){ if (a == 0) return b;return gcd(b % a, a);} int findGCD(vector<int> &arr, int n) { int result = arr[0]; for (int i = 1; i < n; i++) { result = gcd(arr[i], result); if(result == 1) { return 1; } } return result; } int minOperations(vec...
ALGO
0.999928
5.918494
28ca3dd0-011e-43e2-9c45-8c102f049b75
sheeluofficial/practice
OthersCode/LeetCode-Solutions-master/LeetCode-Solutions-master/C++/find-the-most-competitive-subsequence.cpp
// Time: O(n) // Space: O(k) class Solution { public: vector<int> mostCompetitive(vector<int>& nums, int k) { vector<int> stk; for (int i = 0; i < size(nums); ++i) { while (!empty(stk) && stk.back() > nums[i] && size(stk) + (size(nums) - i) > k) { stk...
ALGO
1
6.221146
0efae385-63b1-44db-921a-3da6a617aa3f
mf06359/cp-cpp
lib/string/z_algorithm.cpp
#include<bits/stdc++.h> using namespace std; // verified // https://atcoder.jp/contests/abc141/submissions/57837795 // https://atcoder.jp/contests/arc055/submissions/57842456 template<typename T = string> vector<int> z_algorithm(const T &s) { int k, j = 0, n = (int)s.size(); vector<int> res(n); res[0] = n...
ALGO
0.999484
4.994586
c3124d75-a43d-4b26-a995-df7ce8e7c5e8
Abhipsha05/C-plusplus-codes
pattern3.cpp
#include<iostream> using namespace std; int main() { int i=1; int n = 4; while(i<=n){ char ch = 'A' + i - 1; for (int j=1; j<= n; j++){ cout<< ch; } cout<<endl; i++; } cout<<endl; i = 1; while(i<=n){ for (int j=1; j<= i; j...
ALGO
0.999777
3.255542
ebc71444-0c43-4120-85b1-bc6ee6c776a1
ImbecileFabio/HEW2025
ComponentFramework/SorceFiles/GameObjects/Component/PushOutComponent.cpp
//================================================================= // [PushOutComponent.cpp] oR|[lg // ҁFLn[ //----------------------------------------------------------------- // FRC_[Ăғmos // //================================================================= #include "PushOutComponent.h" #include "../Component.h"...
TOOL
0.877739
5.264182
07daa997-0b9e-4188-8a60-66a6561139e6
yhhsia/code_translation_in_context
LLM_experiment/test_data_ids/unit_tests/java_sa-cpp_sa.test/NEWMAN_CONWAY_SEQUENCE_1.cpp
#include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include <bits/stdc++.h> using namespace std; int f_gold ( int n ) { int f [ n + 1 ]; int i; f [ 0 ] = 0; f [ 1 ] = 1; f [ 2 ] = 1; for ( i = 3; i <= n; i ++ ) f [ i ] = f [ f [ i - 1 ] ] + f...
ALGO
0.999298
5.263274
7d70102b-30c2-4159-b6bd-119c7268c924
runqingc/Coding-Practice
leetcode/260. Single Number III /main.cpp
#include <iostream> #include <vector> #include <unordered_set> using namespace std; vector<int> singleNumber(vector<int>& nums) { unordered_set<int> set; for(auto& num: nums){ if(set.find(num)==set.end()){ set.insert(num); }else{ set.erase(num); } } vecto...
ALGO
0.999776
5.496797
5adf5d8e-5509-4758-bfda-68efb8f80d6f
uthantvicentin/Competitive-Programming
URIOJ/C++/1063.cpp
#include <bits/stdc++.h> using namespace std; int main(){ ios_base::sync_with_stdio(false); stack <char> trem; char sai[2000],entra[1000],cr[1000]; int n; while(cin >> n and n){ for(int i=0;i<n;i++) cin >>entra[i]; for(int i=0;i<n;i++) cin >> sai[i]; cout << entra << sai; int j = 0; for(int i = 0...
ALGO
0.999272
3.324577
aa4557d2-b854-4b3b-95a7-c3601bdcbead
benedicka/Competitive-Programming
CodeForces/466A/16217998_AC_30ms_300kB.cpp
#include<bits/stdc++.h> using namespace std; long long n,m,a,b,ans; int main() { scanf("%lld %lld %lld %lld",&n,&m,&a,&b); ans = n/m * b; if(n%m!=0) ans+=b; ans = min(ans,n*a); ans = min(ans,n/m * b + n%m*a); printf("%lld\n",ans); return 0; }
ALGO
0.999779
3.631114
8211dedc-e0f0-43f6-98c4-d6add2b55bcc
SaurabPoudel/Cpp-learning
Basic C++/pattern11.cpp
#include <iostream> using namespace std; int main(){ int n; cout << "Enter a number: "<<endl; cin>>n; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ char ch = 'A'+i -1; cout << ch <<" "; } cout <<endl; } return 0; }
ALGO
0.993565
3.667507
572aa969-64c6-4951-9e5a-423d9176b59e
ttrangih/DSA
LAB4/hw.cpp
#include <iostream> #include <vector> #include <string> #include <chrono> #include <algorithm> using namespace std; // --- Struct Definitions --- struct Product { string name; double price; double rating; int popularity; Product(string n, double p, double r, int pop) : name(n), price(p),...
ALGO
0.99863
5.852913
9d24624a-60f4-49bf-88b4-d42e4911edee
Khanhnguyen2408/Tin-hoc-cs-2
ghepxau.cpp
#include <stdio.h> #include <string.h> #include <ctype.h> #include <stdlib.h> int cmp(const void *a,const void *b){ char x[100],y[100],z[100],t[100]; strcpy(x,(char *)a); strcpy(z,x); strcpy(y,(char *)b); strcpy(t,y); strcat(x,y); strcat(t,z); return strcmp(x,t); } int main(){ int t; scanf ("%d",&t); while (...
ALGO
0.999439
3.433779
d5857d43-8ebc-4b65-be2d-ec9bc666a34e
hyunstory/CodingTestPractice
Baekjoon/CPP/9328.cpp
#include <iostream> #include <queue> #include <cstring> #include <vector> #include <set> using namespace std; char map[101][101]; bool check[101][101][50]; set<string> visit; int dx[] = {-1, 1, 0, 0}; int dy[] = {0, 0, -1, 1}; int myKey; int n, m; bool isEnter(int i, int j){ int v = map[i][j]; if (v == '...
ALGO
0.999479
4.317902
20c7149f-2990-4867-a958-c86c0fbd67b6
zpdeng28/grpc
third_party/libcxx/test/std/algorithms/alg.sorting/alg.min.max/minmax_comp.pass.cpp
// <algorithm> // template<class T, StrictWeakOrder<auto, T> Compare> // requires !SameType<T, Compare> && CopyConstructible<Compare> // pair<const T&, const T&> // minmax(const T& a, const T& b, Compare comp); #include <algorithm> #include <functional> #include <cassert> #include "test_macros.h" template <cl...
TEST
0.978737
5.736514
af8c93c5-37ec-4be6-95fb-5724f8915b52
Moein-Karami/OlympiadCodes
quera/vazir/main.cpp
#include <iostream> #include <algorithm> #define f first #define s second using namespace std; pair <int,int> a[250000]; pair <bool,bool>b[250000]; int main() { long long int n,m; cin>>n>>m; for(int i=0;i<n-1;i++) cin>>a[i].f>>a[i].s; long long int mini=1e12,maxi=0; for(int i=0;i<n-1;i++) ...
ALGO
0.999805
3.188196
179b2cf8-6d2c-4aa7-b549-e2f89f34d7f6
vfolunin/archives-solutions
UVa Online Judge/232.cpp
#include <iostream> #include <iomanip> #include <algorithm> #include <vector> #include <set> #include <map> #include <string> using namespace std; bool solve(int test) { int h, w; if (!(cin >> h >> w)) return 0; vector<string> a(h); for (string &row : a) cin >> row; int counter = ...
ALGO
0.998595
3.524038
9b2d6bd2-8d4c-439d-a874-ffa52d753129
noisy-image-modeling/NIM
third-party/MONAI/monai/csrc/filtering/trainable_joint_bilateral/jbf_layer_cpu_backward.cpp
#include "trainable_joint_bilateral.h" #include "utils/tensor_description.h" #include "utils/tensor_indexing.h" template <typename scalar_t> void JointBilateralFilterCpuBackward_3d( torch::Tensor gradientInputTensor, torch::Tensor gradientGuidanceTensor, torch::Tensor gradientOutputTensor, torch::Tenso...
ALGO
0.996144
6.732009
ed764023-81c4-4393-b0e6-f6a015fc9849
dharsan19/OS-LAB
LAB9/Odd.cpp
#include <iostream> #include <unistd.h> using namespace std; // Driver code int main() { int a[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; int sumOdd = 0, sumEven = 0, n, i; n = fork(); // Checking if n is not 0 if (n > 0) { for (i = 0; i < 10; i++) { if (a[i] % 2 == 0) ...
ALGO
0.999664
4.093877
bc19049e-21cb-466d-aa35-ff6fed126357
Shiva6317/DS_Algo
Graphs/kahnsalgotoposort.cpp
// #include <iostream> // #include <list> // #include <unordered_map> // #include <map> // #include <stack> // #include <vector> // #include<queue> #include <bits/stdc++.h> using namespace std; class graph { public: unordered_map<int, list<int>> adjlist; void creategraph(int u, int v, bool direction) { ...
ALGO
0.999994
5.744897
f9a56207-82de-4373-b32e-c34cd4b926d6
geekmi/OpenJDK
jdk8u/src/windows/native/sun/bridge/jabswitch.cpp
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include <Windows.h> #include <tchar.h> // This is the default buffer size used for RegQueryValue values. #define DEFAULT_ALLOC MAX_PATH // only allocate a buffer as big as MAX_ALLOC for RegQueryValue values. #define MAX_ALLOC 262144 static...
TOOL
0.875909
4.641045
4a5fe0f5-64ce-4cbe-aa3e-dcc21e0c53b1
JaeWoonAhn/Algorithm
민코딩/Greedy 탑/07_수학 놀이/solution.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int A, B; cin >> A >> B; int cnt = 0; while (A < B) { if (B % 10 == 1) { B /= 10; cnt++; } else if (B % 2 == 0) { B /= 2; cnt++; } else { break; } } if (A == B) { cout << cnt; } else { ...
ALGO
0.999973
4.063868
5c6b50fc-c111-4a75-83b2-d155059a4abf
Project-Zephyrus/device_xiaomi_ginkgo
gps/utils/LocHeap.cpp
#include <LocHeap.h> namespace loc_util { class LocHeapNode { friend class LocHeap; // size of of the subtree, excluding self, 1 if no subtree int mSize; LocHeapNode* mLeft; LocHeapNode* mRight; LocRankable* mData; public: inline LocHeapNode(LocRankable& data) : mSize(1), mLeft(NU...
ALGO
0.998196
6.575182
a212a4b6-7772-44e7-b63d-de995da0ee1e
MaksymPlichuk/ClassWork_CPlusPlus
20_FunctionPointersClasswork/20_FunctionPointersClasswork.cpp
#include <iostream> using namespace std; // 1. Визначити функції обчислення суми, різниці, добутку, частки двох дробових //чисел. Викликати функції через вказівник функції. double sum(double a, double b) { return a + b; } double subtract(double a, double b) { return a - b; } double multiplication(double a, do...
TOOL
0.990846
4.050563
4b518701-7db7-457e-8edc-4aa2befcfc58
Prakharsahu10/DataStructure_Algorithms
ARRAYS/Longest_Consecutive_Sequence.cpp
/* Longest Consecutive Sequence in an Array */ /* Problem Statement: You are given an array of ‘N’ integers. You need to find the length of the longest sequence which contains the consecutive elements. Examples Example 1: Input: [100, 200, 1, 3, 2, 4] Output: 4 Explanation: The longest consecutive subsequence is...
ALGO
0.999917
5.603964
bc16ad7e-56d4-404b-88d2-c4b9393cf96e
ishandutta2007/codeforces
joyfun/normal/291/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; #define mp make_pair #define pb push_back #define fi first #define se second #define sz(x) (int)x.size() #define rep(i,a,b) for(int i=a;i<b;++i) struct SAM{ // [0,L] , 0 is virtual , 1 is rt , init!...
ALGO
0.999968
3.826719
b3b489f7-9c53-404f-928e-5bd50c0c940f
mohamed-belall/assiut_sheet_ps
sheet_A/11.cpp
#include <iostream> #include <math.h> using namespace std; int main() { long long a, b, c, max, min; cin >> a >> b >> c; cout << fmin(fmin(a, b), c) << " " << fmax(fmax(a, b), c); return 0; }
ALGO
0.999851
3.68731
555f844d-7e45-4b96-9fe4-06064dc923a9
UsoltsevaM/algorithms_and_data_structures_yandex_cpp
sprint7/taskA.cpp
#include <iostream> #include <vector> int main() { int n = 0; std::cin >> n; std::vector<int> cost(n); for (int i = 0; i < n; i++) std::cin >> cost[i]; int totalSum = 0; int i = 0; while (i < n - 1) { while ((i < n - 1) && (cost[i + 1] <= cost[i])) i++; ...
ALGO
0.999958
4.303819
c34e9374-1846-4468-b3d5-6359a2dd0f50
jesse-michael-han/cadical
src/lucky.cpp
#include "internal.hpp" namespace CaDiCaL { // It turns out that even in the competition there are formulas which are // easy to satisfy by either setting all variables to the same truth value // or by assigning variables to the same value and propagating it. In the // latter situation this can be done either in the...
ALGO
0.999815
5.536165
f566f91f-03b1-4057-b9f7-7c51dc78fd97
fgolik/2.7
2.7/2.7.cpp
#include <iostream>//variant 3 #include <math.h>//Заданы натуральные числа m, n. Вводятся целые числа а1, ..., an. Вычислить b1 + ... + bm, где b1 = а1 + а2 + ... + an; b2 = а1 2 + а2 2 + ... + an 2 ; ... bm = а1 m + а2 m + ... + an m using namespace std; int main() { int b_len; cout << " Enter m = "; cin >> b_len...
ALGO
0.999462
3.831388
20926cdd-5d67-471a-bea7-1ceb65cf417a
peterspackman/occ
src/core/molecular_symmetry.cpp
#include <algorithm> #include <ankerl/unordered_dense.h> #include <cmath> #include <numeric> #include <occ/core/molecular_symmetry.h> namespace occ::core { SymmetryMappingResult try_transformation_with_grouped_permutations( const IVec &labels_A, const Mat3N &positions_A, const IVec &labels_B, const Mat3N &pos...
ALGO
0.999843
6.996712
ad396daa-8e58-4831-8c81-871e0c7fa5c6
WoodJohn/Algorithm-Practice
2083/main.cpp
#include <iostream> #include <string.h> #include <stdio.h> using namespace std; int tri[7] = {1, 3, 9, 27, 81, 243, 729}; struct node { int l; char **g; node(int a = 0) : l(a) { int i, j; g = new char*[tri[a - 1]]; for (i = 0; i < tri[a - 1]; i++) g[i] = new char[tr...
ALGO
0.999435
3.733523
8cc8883b-2df2-4aec-8d25-c97cb65c45d1
Prateek-Pandey-96/Algorithms
LC Daily/IPO.CPP
// 502. IPO class Solution { public: int findMaximizedCapital(int k, int w, vector<int>& profits, vector<int>& capital) { // final capital is always adding up int n = capital.size(); vector<pair<int, int>> project; for(int i=0; i<n; i++) project.push_back({capital[i], p...
ALGO
0.99996
5.20774
03375860-949c-4720-a4c8-de43a2f0791d
Abdullah-Asif/Codeforces
CodeForces/CF-1385B.cpp
#include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl "\n" int main() { int t; cin >> t; while (t--) { int n,i, num; cin >> n; set < int > s; vector <int> vc; for (i = 1; i <= n * 2; i++) { cin >> num; if (s.coun...
ALGO
0.998934
3.769679
a57934c6-d704-4693-88d2-a5f81fb81482
devMuhammadArslan/stackBasic
main.cpp
#include "stack.h" #include "stackImplementation.cpp" #include <iostream> using namespace std; int main(){ Stack stack; stack.push(20); stack.push(30); stack.push(40); cout<<"The Top element is the stack is: "<<stack.top()<<endl; stack.pop(); stack.pop(); cout<<"The Top element is the stack is: "<<stack.top()<<...
TOOL
0.900501
4.197466
b39ad3f9-dfb6-42b8-bd9b-7dc3e7ee8edb
ishandutta2007/codeforces
dragonslayerintraining/normal/259/B.cpp
#include <iostream> int grid[3][3]; int row[3]; int magic=0; int main(){ for(int i=0;i<3;i++){ for(int j=0;j<3;j++){ std::cin>>grid[i][j]; row[i]+=grid[i][j]; magic+=grid[i][j]; } } magic/=2; for(int i=0;i<3;i++){ grid[i][i]=magic-row[i]; } for(int i=0;i<3;i++){ for(int j...
ALGO
0.999879
3.671821
d611e6ae-e899-4f68-9a77-2d47b05ae2a2
priyanshub18/CPP
SlidingWindow/maximumsubarrayofsizek.cpp
#include<iostream> #include<vector> using namespace std; //sliding window algorithm int main(){ int arr[] = {7,1,2,5,8,4,9,3,6,}; int n = sizeof(arr)/4; int k = 4; int maxSum = INT_MIN; int maxidx = 0; //current window sum = prev window sum - last...
ALGO
0.999945
4.368741
56d0d38b-fa5e-4e2c-b3dd-9d6661c98de7
AbdullahRFA/3-1_All_Resources
Computer Graphics Lab/Graphics Lab 3/398/rotation.cpp
#include<iostream> #include<graphics.h> #include<math.h> using namespace std; void drawLine(int x1,int y1,int x2,int y2) { int dx = x2-x1; int dy = y2-y1; int steps, k; float x_inc, y_inc; float x = x1; float y = y1; if(abs(dx)>abs(dy)) steps=abs(dx); else steps=abs(dy...
ALGO
0.976461
3.256121
63be6b7a-31b4-4c64-98f7-42a91514a3cc
faterazer/LeetCode
0253. Meeting Rooms II/Solution.cpp
#include <algorithm> #include <queue> #include <vector> using namespace std; class Solution { public: int minMeetingRooms(vector<vector<int>>& intervals) { sort(intervals.begin(), intervals.end()); priority_queue<int, vector<int>, greater<int>> pq; int res = 0; for (const vector...
ALGO
0.999999
6.2656
2a796cdf-cd8f-499b-92b8-d5a6e1fb186f
NicholasAdmin/EDEN
src/policy/rbf.cpp
#include "policy/rbf.h" bool SignalsOptInRBF(const CTransaction &tx) { BOOST_FOREACH(const CTxIn &txin, tx.vin) { if (txin.nSequence < std::numeric_limits<unsigned int>::max()-1) { return true; } } return false; } bool IsRBFOptIn(const CTxMemPoolEntry &entry, CTxMemPool &pool) ...
ALGO
0.858156
7.164681
4d2ba661-683f-4e2d-a4b1-f3b28e0171bb
bladingg/Ayudantia-Remota-Programacion
Carpeta M/C++/PILASTIPOPRUEBA/Pilas.cpp
#include <stdlib.h> #include <iostream> using namespace std; typedef struct Nodo{ int ID; char* comando; struct Nodo* siguiente; }Nodo; typedef struct Pila{ int tam; struct Nodo* cima; }Pila; void push(Pila* pila, int id, char* comando); void pop(Pila* pila); bool isEmpty(Pila* pila); Pila* crearP...
ALGO
0.989171
4.308243
473ba519-94e3-4970-8e7c-a083666578c2
su-hyunieee/vs_code_copy
DP_100/2294_동전2.cpp
#include<iostream> #include<algorithm> using namespace std; //못하겟으니까 나중에 다시 풀어봐 .. ~ // 모르겠으면 코드 따라치기라도 해봐 .. ~ int main(){ int n,k; int dp[100001]; int coin[101]; cin>> n>>k; for(int i=1 ; i<=n; i++) cin >> coin[i]; for(int i=1 ;i<=k; i++) dp[i]= 100001; dp[0]= 0; for(int i=1; i<=n; i++){ for(int j= coin...
ALGO
0.999978
3.982383
b86282b6-f72e-43c0-b8aa-85496d0123a2
slipet/CS6135-VLSI-Physical-Design-Automation
HW5/src/main.cpp
#include "GlobalRouting.hpp" int main(int argc,char **argv){ GlobalRouting gb; //cout<<argv[1]<<endl; clock_t start = clock(); gb.readfile(argv[1]); clock_t end = clock(); cout << "I Runtime : " << ((double) end - start) / CLOCKS_PER_SEC << "s\n"; gb.Routing(); start = clock(); gb.output(argv[2]); end ...
ALGO
0.929777
3.658573
bc2d2543-fd3f-495f-a3cf-7c34761f8278
ChiepChiep0710/algorithm
code contest/test.cpp
#include <bits/stdc++.h> #define MAX 2000001 #define p 1000000007 typedef long long ll; using namespace std; ll minCost(ll arr[], ll n) { priority_queue<ll, vector<ll>, greater<ll> > pq(arr, arr + n); ll res = 0; while (pq.size() > 1) { ll first = pq.top(); //lay do dai soi thu ...
ALGO
0.99997
3.373711
422553dc-b0d4-460a-bd91-f6dbde53f8a8
Vidyasagar-Dadilwar/LeetCode
130-surrounded-regions/surrounded-regions.cpp
class Solution { public: vector<int> dx = {1, -1, 0, 0}; vector<int> dy = {0, 0, 1, -1}; void dfs(int i, int j, vector<vector<char>>& board, vector<vector<bool>>& visited) { int m = board.size(), n = board[0].size(); visited[i][j] = true; for (int d = 0; d < 4; ++d) { i...
ALGO
0.999883
6.558257
91c5bdda-153d-493c-a158-d74e95381349
sphoortimpatil/code_library
87_number_of_trees.cpp
#include<bits/stdc++.h> using namespace std; void addEdge(vector<int> adj[], int u, int v) { adj[u].push_back(v); adj[v].push_back(u); } void DFSUtil(int u, vector<int> adj[], vector<bool> &visited) { visited[u] = true; for (int i=0; i<adj[u].size(); i++) if (visited[adj[u][i]] == false) DFSUtil(adj[u][...
ALGO
0.999959
5.823016
738b55ff-ffb3-48b4-943d-e7c8d75dab3d
cqtenq/feathercoin11
src/rpcmining.cpp
#include "amount.h" #include "chainparams.h" #include "consensus/consensus.h" #include "consensus/validation.h" #include "core_io.h" #include "init.h" #include "main.h" #include "miner.h" #include "net.h" #include "pow.h" #include "rpcserver.h" #include "util.h" #include "validationinterface.h" #ifdef ENABLE_WALLET #in...
WEB
0.990519
6.266358
dee67ae0-8bcd-40d0-a3be-63aa5e4da7f2
ishandutta2007/codeforces
nikarabika/normal/251/C.cpp
//sobskdrbhvk #include <bits/stdc++.h> using namespace std; typedef long long int LL; typedef pair<int, int> pii; typedef pair<LL, LL> pll; #define PB push_back #define MP make_pair #define L first #define R second #define sz(x) ((int)(x).size()) #define smax(x, y) ((x) = max((x), (y))) #define smin(x, y) ((x) = min...
ALGO
0.999949
3.29381
2aa14a54-833e-4dc7-89ba-458adfaca3f2
Jin-0-2/2023_winter_C
240201_이진트리/240201_이진트리/83_STL(Member포인터).cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; class Member { private: int number; string name; public: Member(int _number, string _name) : number(_number), name(_name) {} public: int getNumber() const { return number; } string getName() const { return name; } ...
TOOL
0.994125
4.585846
90eaef17-b7ca-40f9-889f-cb53d9ebe41e
fkallen/CARE
dependencies/cccl-2.2.0/libcudacxx/libcxx_old/test/std/algorithms/alg.nonmodifying/alg.find/find_if.pass.cpp
// <algorithm> // template<InputIterator Iter, Predicate<auto, Iter::value_type> Pred> // requires CopyConstructible<Pred> // constexpr Iter // constexpr after C++17 // find_if(Iter first, Iter last, Pred pred); #include <algorithm> #include <functional> #include <cassert> #include "test_macros.h" #include "...
TEST
0.989054
6.739796
17db6d0d-b82d-4066-b201-e38c2d6d2140
ishandutta2007/codeforces
adam_gs/normal/1217/C.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define rep(a, b) for(int a = 0; a < (b); ++a) #define st first #define nd second #define pb push_back #define all(a) a.begin(), a.end() void solve() { string s; cin >> s; int n=s.size(), lewo[s.size()], ans=0; rep(i, n) { ...
ALGO
0.999796
3.758787
41d3b30d-2a6f-4609-8cb4-af1141914c98
nastyakuzenkova/CSC-Algorithms
I/6H.cpp
#include <iostream> #include <cassert> #include <cstdio> #include <algorithm> using namespace std; int n = 0; int k = 0; long a[10001]; bool canAllocate(const long &currentLength) { int count = 1; int cur = a[0]; for (int i = 1; i < n; ++i) { if (a[i] - cur >= currentLength) { count++; cur = a[i]; } } ...
ALGO
0.999897
4.222328
84acd657-ed06-4d2a-a318-219cb43a467d
teruelv/mine
pendiente/maxflow chino.cpp
#pragma GCC optimize(3) #include <list> #include <cctype> #include <cstdio> #include <vector> const int MAXN = 10005; const int INF = 2147483647; struct node { int v, f, index; node(int v, int f, int index) : v(v), f(f), index(index) {} }; std::vector<node> edge[MAXN]; std::vector<int> list[MAXN], height, count...
ALGO
0.999712
4.583815
55260b86-6f27-451e-b535-889a19376e7b
dxsxgxnxxr/ORBSLAM-WIN10
Thirdparty/eigen/bench/vdw_new.cpp
#include <iostream> #include <Eigen/Core> using namespace Eigen; #ifndef SCALAR #define SCALAR float #endif #ifndef SIZE #define SIZE 10000 #endif #ifndef REPEAT #define REPEAT 10000 #endif typedef Matrix<SCALAR, Eigen::Dynamic, 1> Vec; using namespace std; SCALAR E_VDW(const Vec &interactions1, const Vec &inter...
ALGO
0.999784
3.519938
dc8b69c6-f792-4d2c-8386-e6f6ee491cba
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_13065_12.cpp
#include <bits/stdc++.h> using namespace std; int main() { const int k = 202; int n, m, i, j, lum = 0, mat[k][k]; cin >> n >> m; int p = 2 * m; for (i = 1; i <= n; i++) for (j = 1; j <= p; j++) cin >> mat[i][j]; for (i = 1; i <= n; i++) for (j = 2; j <= p; j = j + 2) if (mat[i][j] == 1 || mat[...
ALGO
0.99993
3.249876
f77dbc14-e556-411d-87b8-10f2efe0fd63
gurpreet1205/Codechef-Problems
COINS.cpp
#include<bits/stdc++.h> using namespace std; long long int a[10000000]={0}; long long int rec(long long int n) { if(n==0||n==1) return n; //cout<<n<<"\n"; long long int x,y,z; if(n<10000000&&a[n]!=0) return a[n]; x=rec(n/2); y=rec(n/3); z=rec(n/4); if(n<10000000) { a[n]=max(n,(x+y+z)); return a[n]; } e...
ALGO
0.999888
4.308693
114ec0a9-3e42-4b99-9442-41f22f122f2b
jiadaizhao/LintCode
0601-0700/0671-Rotate Words/0671-Rotate Words.cpp
class Solution { public: /* * @param words: A list of words * @return: Return how many different rotate words */ int countRotateWords(vector<string> words) { // Write your code here unordered_set<string> table; for (string word : words) { table.insert(smallestP...
ALGO
0.99989
6.405041
db1759e2-0cf5-4751-abd1-04f96a19e161
TranBaLoi/DSA_PTIT
TongDayConBangK.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long; int vs[1000] = {0}, cnt = 0, n, k; int a[100]; void init() { for(int i = 0; i < n; i++) cin >> a[i]; } void sinh(int a[], int n, int k) { while(1) { int i = n - 1; while(i>=0 && vs[i]==1) --i; if(i<0) return; ...
ALGO
0.999976
3.437577
8e3cf4a7-7c7f-44b5-a5d6-6e946c5b16a5
ishandutta2007/codeforces
marckess/normal/831/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<vi> vvi; typedef pair<int, int> ii; typedef vector<ii> vii; #define fi first #define se second #define endl '\n' #define MOD(n,k) ( (n % k) + k ) % k #define isOn(S, j) (S & (1 << j) ) #...
ALGO
0.999993
3.641541
78351b25-1851-4720-bb5f-45a3642c1775
ToshihideMatsuda/atcoder
programs/ABC/ABC200-299/ABC251/F.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for(ll i = 0; i < n; i++ ) #define reps(i,m,n) for(ll i = m; i < n; i++ ) #define max(a,b) (a>b?a:b) #define max3(a,b,c) max(a,max(b,c)) #define min(a,b) (a<b?a:b) #define min3(a,b,c) min(a,min(b,c)) #define INF 1 << 30 ...
ALGO
0.999957
4.655507
aad92b5a-a4a6-402b-ae3d-d5703d60b824
truongcongthanh2000/CSES-Solutions
Mathematics/CandyLottery.cpp
#pragma GCC diagnostic ignored "-Wunused-parameter" #include <bits/stdc++.h> using namespace std; #define INP "solve" #define OUT "solve" const long long INF_LL = 1e18 + 100; const int INF = 1e9 + 100; const int MOD = 1e9 + 7; const int Base = 30; const long double EPS = 1e-9; const int BLOCK = 1000; const int dx[4...
ALGO
0.999427
4.08843
b498f0a5-f26a-45da-bb65-542af909cd84
danieltrt/SBFL
TransCoder_tokenized_test_set_functions/cpp/PASCAL_TRIANGLE.cpp
void printPascal ( int n ) { int arr [ n ] [ n ]; for ( int line = 0; line < n; line ++ ) { for ( int i = 0; i <= line; i ++ ) { if ( line == i || i == 0 ) arr [ line ] [ i ] = 1; else arr [ line ] [ i ] = arr [ line - 1 ] [ i - 1 ] + arr [ line - 1 ] [ i ]; cout << arr [ line ] [ ...
ALGO
0.993684
4.02466
d4daf54b-fa27-4f48-bade-6c7131abdba9
EddieMC-Dev/Estudos-CPP
arrays/exercises/7_10.cpp
// Exercise 7.10: 7_10.cpp // Construindo uma tabela frequência salarial dos vendedores // Autor: Edgard Mac Fadden // Data: 03/04/2023 #include <iostream> using std::cout; using std::endl; int main() { const int salarySize = 20; // Define um tamanho para o array de salários const int frequencySize = 11; // D...
ALGO
0.963972
5.184855
e90db001-8983-4c70-8016-b60afd8fb08b
Md-Merazul-Islam/Algorithm
6-module- Graph Traversal (DFS)/depth_implement_dfs.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5; vector<int> adj[N]; bool visited[N]; int depth[N];// here declaire a list void dfs (int parent) { cout<<"visited Node :" << parent<<endl; visited[parent]=1; for (int child : adj[parent]) { if(visited[child]==0) { ...
ALGO
0.999867
4.510452
6a0d7c03-13dd-4a1c-a1c7-bef0b448390b
congibab/openGL_Second
SecondOpenGL/SecondOpenGL/include/glm/test/core/core_func_integer_find_msb.cpp
#include <glm/glm.hpp> #include <cstdio> #include <cstdlib> // To define "exit", req'd by XLC. #include <ctime> #define LE 1 // 1 for little-endian, 0 for big-endian. int pop(unsigned x) { x = x - ((x >> 1) & 0x55555555); x = (x & 0x33333333) + ((x >> 2) & 0x33333333); x = (x + (x >> 4)) & 0x0...
ALGO
0.998472
3.60046
7daf98a3-8543-47ca-9f98-c107fef2059f
Srijan-Jalal/CodeForces
822A.cpp
#include <iostream> using namespace std; long long fact(long long x) { long long k = 1; for(int i=2;i<=x;i++) { k = k * i; } return k; } int main(void) { long long A,B; cin>>A>>B; if(A>B) cout<<fact(B)<<endl; else cout<<fact(A)<<endl; return 0; }
ALGO
0.99988
4.577163
2c8d98e8-bc02-4dfc-84fb-de847dd426b4
WebKraken/Game
Game/boost_1_63_0/libs/compute/perf/perf_exclusive_scan.cpp
#include <algorithm> #include <iostream> #include <numeric> #include <vector> #include <boost/compute/system.hpp> #include <boost/compute/algorithm/exclusive_scan.hpp> #include <boost/compute/container/vector.hpp> #include "perf.hpp" int rand_int() { return static_cast<int>((rand() / double(RAND_MAX)) * 25.0); }...
ALGO
0.944444
5.033711
ef615dc6-d220-4e12-8af5-61a7a52c1050
jsambhav5/LeetCode
151_ReverseWordsInAString/ReverseWordsInAString.cpp
class Solution { public: string reverseWords(string s) { int i = -1, j = 0; while(j < s.length()) { i++; while(s[j] == ' ' && j < s.length()) j++; while(s[j] != ' ' && j < s.length()) { s[i++] = s[j++]; } s[i] = ' '; ...
ALGO
0.999983
6.045186
ec7e5e83-efe9-4cdd-9221-8a97ba165d5d
zjy-dev/algorithm
LeetCode/430-扁平化多级双向链表.cpp
#include "LeetCode.h" class Solution { public: Node *flatten(Node *head) { flattenGetTail(head); return head; } Node *flattenGetTail(Node *head) { if (!head) return NULL; auto p = head, ans = p->prev; while (p) { ans = p; if (p->child) { auto childTail = flattenGe...
ALGO
0.999015
5.858971
97cbad5e-cee3-492e-a535-2ce8f69bce1f
redligot2009/UVA-Solutions
Volume 6/UVA624/UVA624.cpp
// CompetitiveProgramming.cpp : Defines the entry point for the console application. // #include <bits/stdc++.h> #define ll long long #define ii pair<int, int> #define llp pair<long long, long long> #define iii pair<int,ii> using namespace std; int N, M; vector<int> arr; vector<int> bestPath; int bestSum = 0; void s...
ALGO
0.999952
4.452073
9bc884a0-0ff6-4f7b-b487-c7e6854a01d6
tizian/specular-manifold-sampling
src/librender/manifold_ms.cpp
#include <mitsuba/render/manifold_ms.h> #include <mitsuba/render/microfacet.h> #include <mitsuba/render/scene.h> #include <mitsuba/render/sampler.h> #include <iomanip> NAMESPACE_BEGIN(mitsuba) template<typename T> inline void update_max(std::atomic<T> & atom, const T val) { for(T atom_val=atom; atom_val < val && !a...
ALGO
0.999402
7.731574
572edf8a-ea93-44f1-8987-d3973a631488
sifat-hossain-niloy/CodeForces-Solutions
The_Cooler_Dilemma_2.cpp
#include<bits/stdc++.h> #include<stdio.h> using namespace std; #define MOD 1000000007 #define ll long long #define TC(t) int t;cin >> t;while(t--) #define FL(t) for(int i=0;i<t;i++) #define Y cout << "YES\n" #define N cout << "NO\n" #define ff first #define ss second #d...
ALGO
0.999689
4.955665
6e1b9e59-6ed0-4454-b2e1-72e0793cc8a0
shalupatidar22/DSA_2024
Day_123.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; bool canAttend(vector<vector<int>> &arr) { // Sort intervals by start time sort(arr.begin(), arr.end()); // Check for overlapping intervals for (int i = 1; i < arr.size(); i++) { if (arr[i - 1][1] > arr[i][0]) { /...
ALGO
0.999993
6.135917
0c1e8ef0-7e9d-4457-8c6d-92b0d3594e4a
Kaur-sukhmani/DSA_C-
Graph/gfg-leetcode/graph033.cpp
/*Minimum Multiplications to reach End https://www.geeksforgeeks.org/problems/minimum-multiplications-to-reach-end/0 Given start, end and an array arr of n numbers. At each step, start is multiplied with any number in the array and then mod operation with 100000 is done to get the new start. Your task is to find the ...
ALGO
0.999965
5.218947
bf289b97-0c1e-4b0f-9ca5-c348c227528a
YinJingcao/lc
20_Valid_Parentheses.cpp
/** * @file 20_Valid_Parentheses.cpp * @author yinjingcao * @date 2018/03/16 17:08:09 * @version $Revision$ * @brief * **/ #include <iostream> #include <stack> using namespace std; class Solution { public: bool isValid(const string& s) { stack<char> v; for (size_t idx = 0; idx < s.siz...
ALGO
0.999616
6.184442
acc815ae-9421-4969-918b-e6da1faa8ddf
FromTheo/NeetCode
[C++] Binary_Search/median_of_two_sorted_arrays.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; /* -------- Subject -------- You are given two integer arrays nums1 and nums2 of size m and n respectively, where each is sorted in ascending order. Return the median value among all elements of the two arrays. */ /* -------- Explanat...
ALGO
0.999964
6.374285
aa896994-13de-4fa1-a3e9-f08a0f9b35e5
leverimmy/Codes
比赛/学校/2018-11-2邀请赛/2018-11-2友谊赛/程序/HB-08/maze/maze.cpp
#include<iostream> #include<cstring> #include<cstdio> #include<algorithm> #include<iomanip> #include<ctime> #include<cstdlib> #include<queue> #include<vector> #include<map> #define ll long long using namespace std; inline ll read() { ll x=0,f=1; char c=getchar(); while(c<'0'||c>'9') { if(c=='-') { f=-1; } ...
ALGO
0.99985
3.590238
21c25bef-1249-4905-99ed-cf30cb3165d0
divyansh1511/CPP
INTERVIEW BIT/STACK AND QUEUE/sliding_window_maximum.cpp
#include<bits/stdc++.h> using namespace std; vector<int> lsidingmax(vector<int> A , int k){ int n = A.size(); vector<int> v(n); deque<int> dq; for (int i = 0; i < n; i++) { if (!dq.empty() && dq.front() == i-k) { dq.pop_front(); } while (!dq.empty() && A[...
ALGO
0.999964
3.694885
39022e58-d410-4459-8702-89776fb0a670
AbbaszadeAbbas/Cpp_learning
C++ Lessons/Out_Of_Lesson/Petryk and pies .cpp
#include <bits/stdc++.h> using namespace std; int main() { long long a,b; cin>>a>>b; cout<<a/b; }
ALGO
0.997658
3.090803
3ba1689e-a03c-4977-9f3e-82ca6ed909d1
s-cabrera/kickstart_2022
session_1/hex.cpp
/* HEX Problem ---------------------------------------------------------------------- This problem was inspired by a board game called Hex, designed independently by Piet Hein and John Nash. It has a similar idea, but does not assume you have played Hex. This game is played on an N×N board, where each cell is a hexag...
ALGO
0.999884
5.262636
856e7c9b-ad4a-4424-9ae0-2ae3ad68580f
Moongss/ps
Baekjoon/1000-9999/1396.cpp
#include <bits/stdc++.h> #include <ext/rope> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define endl "\n" #define fastio cin.tie(0)->sync_with_stdio(0) #define x first #define y second #define all(v) v.begin(), v.end() #define compress(v) sort(all(v)), v.erase(unique(all(v)), v.end()...
ALGO
0.999956
4.404053
d7470a33-6ff7-4c0c-ae6c-b11f69fe0b58
Tarela4ka/Programming
Training/ACMP/SOP/Introduction/Linear algorithm/C.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin >> a >> b; cout << b-1 << " " << a-1; return 0; }
ALGO
0.999926
3.609459
9f2fa8fa-18e9-4a6a-ae20-5e9c615f69f3
JayTheCoder77/Striver-Dsa
ARRAYS/HARD/merge2sortedArrays/optimal-2/main.cpp
// uses shell sort - gap method/technique #include<vector> void swapIfgreater(vector<long long> &a, vector<long long> &b ,int ind1,int ind2){ if(a[ind1] > b[ind2]){ swap(a[ind1] , b[ind2]); } } void mergeTwoSortedArraysWithoutExtraSpace(vector<long long> &a, vector<long long> &b){ // Write your code here. int n ...
ALGO
0.999977
4.557513
78b2c71e-923a-4bea-a2c6-02763a7a5c3e
DenisLeonte/info-bac
21/S1-2.cpp
/* a. 2,8333 b. S1-2 pseudocod.txt c. d. */ #include <iostream> using namespace std; int main() { int a, b, n; cin >> a >> b >> n; if (b == 0) cout << "Gresit" << endl; else { cout << a / b; if (n > 0 && a % b != 0) cout << ","; a = a % b; int i = 0; do { cout << (a * 10) / b; a = (a * 1...
ALGO
0.992922
3.472481
addb04ee-8a7c-4994-90ac-5a8c550d6fb9
tienit150198/ACM
Contest/Hueuni_Competitive_programming/A/main.cpp
#include <bits/stdc++.h> #define ll long long int #define Max 100007 #define fast ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); using namespace std; ll n, m; ll a[2000][2000]; int main() { fast cin >> n >> m; for(ll i = 0 ; i < n ; i++){ for(ll j = 0 ; j < m ; j++) cin >> ...
ALGO
0.999935
3.4095
285a26bf-03ff-4bab-abe9-81bd13f3c38a
Aydhiny/FIT-Faculty-Work
I SEMESTAR/Programiranje I - I SEMESTER/Parne sa 5.cpp
#include <iostream> using namespace std; int obrni(int); int parneCifre(int); int main() { int n; cout << "Unesite broj n: " << endl; cin >> n; cout << "Vas broj zamjenjen je: " << parneCifre(obrni(n)) << endl; return 0; } int obrni(int br) { int temp, novi = 0; while (br) { temp = br % 10; novi = no...
ALGO
0.999213
5.09029
01932e0e-77eb-4f0b-8c8d-8373c00deecf
P41NT/Competitive-Programming
Codeforces/437B_TheChildAndSet/B. The Child and Set.cpp
#include <bits/stdc++.h> #include <cstdio> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; namespace __DEBUG_UTIL__ { using namespace std; /* Primitive Datatypes Print */ void print(const char *x) { cerr << x; } void print(...
ALGO
0.999939
3.718893