Skip to content

Commit 2d32468

Browse files
authored
added faster input output method for cin and cout.
If we compare "printf/scanf" with cout/cin, cout/cin are slower than "printf/scanf". The speed difference is largely due to the iostream I/O functions maintaining synchronization with the C I/O functions. We can turn this off with a call to std::ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
1 parent 86d001a commit 2d32468

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

data/cpp.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
}, {
2424
"definition": "কনসোল থেকে ইনপুট নেয়া",
2525
"code": "cin >>"
26+
}, {
27+
"definition": "cout এবং cin দ্রুত কাজ করার জন্য",
28+
"code": "ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);"
2629
}
2730
]
2831
}, {

0 commit comments

Comments
 (0)