summaryrefslogtreecommitdiff
path: root/normal_distribution.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'normal_distribution.cpp')
-rw-r--r--normal_distribution.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/normal_distribution.cpp b/normal_distribution.cpp
index bc56e2a..002beba 100644
--- a/normal_distribution.cpp
+++ b/normal_distribution.cpp
@@ -26,11 +26,17 @@ int main() {
if (ret.second) {
vector.push_back(element);
// TODO: add offset
- printf("%lld\n", element);
+ // printf("%lld\n", element);
}
}
assert(vector.size() == length);
+ auto offset = *set.begin() < 0 ? 0 - *set.begin() : 0;
+
+ for (auto element : vector) {
+ printf("%lld\n", element + offset);
+ }
+
return 0;
} \ No newline at end of file