Skip to content

Commit d31ac76

Browse files
committed
fix: experiments
1 parent 07eef5c commit d31ac76

358 files changed

Lines changed: 14333 additions & 15615 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/lab/exp1/Hints1/Hint_0.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
<html><head><!--Google Tag Manager--><script class="gtm">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
2-
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
3-
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
4-
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
5-
})(window,document,'script','dataLayer','GTM-W59SWTR');</script><!--End Google Tag Manager--></head><body><!--Google Tag Manager (noscript)--><noscript class="gtm"><iframe height="0" src="https://www.googletagmanager.com/ns.html?id=GTM-W59SWTR" style="display:none;visibility:hidden" width="0"></iframe></noscript><!--End Google Tag Manager (noscript)--><pre></pre>
6-
</body></html>
1+
<pre>
2+
</pre>

src/lab/exp1/Hints1/Hint_1.html

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
<html><head><!--Google Tag Manager--><script class="gtm">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
2-
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
3-
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
4-
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
5-
})(window,document,'script','dataLayer','GTM-W59SWTR');</script><!--End Google Tag Manager--></head><body><!--Google Tag Manager (noscript)--><noscript class="gtm"><iframe height="0" src="https://www.googletagmanager.com/ns.html?id=GTM-W59SWTR" style="display:none;visibility:hidden" width="0"></iframe></noscript><!--End Google Tag Manager (noscript)--><pre>
1+
<pre>
62
#include&lt;stdio.h&gt;
73
int main(){
84

9-
-&gt;declare N, count
10-
-&gt;scan N and make count 0
11-
-&gt;count the bits using a while loop
12-
-&gt;print count
5+
->declare N, count
6+
->scan N and make count 0
7+
->count the bits using a while loop
8+
->print count
139

1410
return 0;
1511
}
1612
</pre>
17-
</body></html>

src/lab/exp1/Hints1/Hint_2.html

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
1-
<html><head><!--Google Tag Manager--><script class="gtm">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
2-
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
3-
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
4-
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
5-
})(window,document,'script','dataLayer','GTM-W59SWTR');</script><!--End Google Tag Manager--></head><body><!--Google Tag Manager (noscript)--><noscript class="gtm"><iframe height="0" src="https://www.googletagmanager.com/ns.html?id=GTM-W59SWTR" style="display:none;visibility:hidden" width="0"></iframe></noscript><!--End Google Tag Manager (noscript)--><pre>
1+
<pre>
62
#include&lt;stdio.h&gt;
73
int main(){
84

9-
-&gt;declare N, count
10-
-&gt;scan N and make count 0
11-
-&gt;Use right shift operator and while
5+
->declare N, count
6+
->scan N and make count 0
7+
->Use right shift operator and while
128
loop for find the number of bits
13-
-&gt;print count
9+
->print count
1410

1511
return 0;
1612
}
1713
</pre>
18-
</body></html>

src/lab/exp1/Hints1/Hint_3.html

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
1-
<html><head><!--Google Tag Manager--><script class="gtm">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
2-
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
3-
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
4-
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
5-
})(window,document,'script','dataLayer','GTM-W59SWTR');</script><!--End Google Tag Manager--></head><body><!--Google Tag Manager (noscript)--><noscript class="gtm"><iframe height="0" src="https://www.googletagmanager.com/ns.html?id=GTM-W59SWTR" style="display:none;visibility:hidden" width="0"></iframe></noscript><!--End Google Tag Manager (noscript)--><pre>
1+
<pre>
62
#include&lt;stdio.h&gt;
73
int main(){
84

9-
-&gt;declare N, count
10-
-&gt;scan N and make count 0
5+
->declare N, count
6+
->scan N and make count 0
117
while(n){
12-
n&gt;&gt;=1;
8+
n>>=1;
139
count++;
1410
}
15-
-&gt;print count
11+
->print count
1612

1713
return 0;
1814
}
1915
</pre>
20-
</body></html>

src/lab/exp1/Hints1/Hint_4.html

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
1-
<html><head><!--Google Tag Manager--><script class="gtm">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
2-
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
3-
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
4-
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
5-
})(window,document,'script','dataLayer','GTM-W59SWTR');</script><!--End Google Tag Manager--></head><body><!--Google Tag Manager (noscript)--><noscript class="gtm"><iframe height="0" src="https://www.googletagmanager.com/ns.html?id=GTM-W59SWTR" style="display:none;visibility:hidden" width="0"></iframe></noscript><!--End Google Tag Manager (noscript)--><pre>
1+
<pre>
62
#include&lt;stdio.h&gt;
73
int main(){
84

95
int N,count=0;
10-
scanf("%d",&amp;N);
6+
scanf("%d",&N);
117
while(N){
12-
N&gt;&gt;=1;
8+
N>>=1;
139
count++;
1410
}
1511
printf("%d\n",count);
1612

1713
return 0;
1814
}
1915
</pre>
20-
</body></html>

src/lab/exp1/Hints2/Hint_0.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
<html><head><!--Google Tag Manager--><script class="gtm">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
2-
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
3-
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
4-
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
5-
})(window,document,'script','dataLayer','GTM-W59SWTR');</script><!--End Google Tag Manager--></head><body><!--Google Tag Manager (noscript)--><noscript class="gtm"><iframe height="0" src="https://www.googletagmanager.com/ns.html?id=GTM-W59SWTR" style="display:none;visibility:hidden" width="0"></iframe></noscript><!--End Google Tag Manager (noscript)--><pre></pre>
6-
</body></html>
1+
<pre>
2+
</pre>

src/lab/exp1/Hints2/Hint_1.html

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
1-
<html><head><!--Google Tag Manager--><script class="gtm">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
2-
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
3-
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
4-
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
5-
})(window,document,'script','dataLayer','GTM-W59SWTR');</script><!--End Google Tag Manager--></head><body><!--Google Tag Manager (noscript)--><noscript class="gtm"><iframe height="0" src="https://www.googletagmanager.com/ns.html?id=GTM-W59SWTR" style="display:none;visibility:hidden" width="0"></iframe></noscript><!--End Google Tag Manager (noscript)--><pre>#include&lt;stdio.h&gt;
1+
<pre>
2+
#include&lt;stdio.h&gt;
63
int main(){
74

8-
-&gt;scan the input
9-
-&gt;scan the input string, whose rank
5+
->scan the input
6+
->scan the input string, whose rank
107
we need to find out
11-
-&gt;Add the number of strings
8+
->Add the number of strings
129
we surpass when we move from
1310
i<sup>th</sup> character to i+1<sup>th</sup> character of
1411
input string
1512

1613
return 0;
1714
}
1815
</pre>
19-
</body></html>

src/lab/exp1/Hints2/Hint_2.html

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
<html><head><!--Google Tag Manager--><script class="gtm">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
2-
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
3-
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
4-
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
5-
})(window,document,'script','dataLayer','GTM-W59SWTR');</script><!--End Google Tag Manager--></head><body><!--Google Tag Manager (noscript)--><noscript class="gtm"><iframe height="0" src="https://www.googletagmanager.com/ns.html?id=GTM-W59SWTR" style="display:none;visibility:hidden" width="0"></iframe></noscript><!--End Google Tag Manager (noscript)--><pre>#include&lt;stdio.h&gt;
1+
<pre>
2+
#include&lt;stdio.h&gt;
63
int main(){
74

8-
-&gt;scan the input
9-
-&gt;scan the input string, whose rank
5+
->scan the input
6+
->scan the input string, whose rank
107
we need to find out
118

12-
-&gt;for i=0 to lengt;h of inputString
9+
->for i=0 to lengt;h of inputString
1310
while ordering[j] is not input[i]
1411
add the number of strings
1512
starting with ordering[j]
@@ -19,4 +16,3 @@
1916
return 0;
2017
}
2118
</pre>
22-
</body></html>

src/lab/exp1/Hints2/Hint_3.html

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1-
<html><head><!--Google Tag Manager--><script class="gtm">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
2-
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
3-
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
4-
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
5-
})(window,document,'script','dataLayer','GTM-W59SWTR');</script><!--End Google Tag Manager--></head><body><!--Google Tag Manager (noscript)--><noscript class="gtm"><iframe height="0" src="https://www.googletagmanager.com/ns.html?id=GTM-W59SWTR" style="display:none;visibility:hidden" width="0"></iframe></noscript><!--End Google Tag Manager (noscript)--><pre>#include&lt;stdio.h&gt;
1+
<pre>
2+
#include&lt;stdio.h&gt;
63
int main(){
74

8-
-&gt;scan the input
9-
-&gt;scan the input string, whose rank
5+
->scan the input
6+
->scan the input string, whose rank
107
we need to find out
118

12-
-&gt; Number of strings starting with
9+
-> Number of strings starting with
1310
ordering[j] is given by 2^j , store
1411
them in an array or calculate on the fly
1512
using left shift operator
1613

17-
-&gt;for i=0 to lengt;h of inputString
14+
->for i=0 to lengt;h of inputString
1815
while ordering[j] is not input[i]
1916
add the number of strings
2017
starting with ordering[j]
@@ -24,4 +21,3 @@
2421
return 0;
2522
}
2623
</pre>
27-
</body></html>

src/lab/exp1/Hints2/Hint_4.html

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
<html><head><!--Google Tag Manager--><script class="gtm">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
2-
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
3-
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
4-
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
5-
})(window,document,'script','dataLayer','GTM-W59SWTR');</script><!--End Google Tag Manager--></head><body><!--Google Tag Manager (noscript)--><noscript class="gtm"><iframe height="0" src="https://www.googletagmanager.com/ns.html?id=GTM-W59SWTR" style="display:none;visibility:hidden" width="0"></iframe></noscript><!--End Google Tag Manager (noscript)--><pre>#include&lt;stdio.h&gt;
1+
<pre>
2+
#include&lt;stdio.h&gt;
63
main(){
74
int N;
8-
scanf("%d",&amp;N);
5+
scanf("%d",&N);
96
char input_chars[N];
107
int i;
118
for(i=0;i&lt;N ;i++)
129
{
13-
scanf(" %c",&amp;input_chars[i]);
10+
scanf(" %c",&input_chars[i]);
1411
}
1512
char input[100];
1613
scanf("%s",input);
@@ -34,4 +31,3 @@
3431
}
3532

3633
</pre>
37-
</body></html>

0 commit comments

Comments
 (0)