effects. Go to the Body Styles section and create a style rule for the body elem
ID: 3604904 • Letter: E
Question
effects. Go to the Body Styles section and create a style rule for the body element that adds the following backgrounds in the order listed: · A background containing the night sky image, sd.back2.png radial gradient circle with a size extending to the closest corner and placed at the coordinates (40%, 70%) containing the color white stopping at 15% of the gradient and the color value rgba(151, 1 A radial gradient circle also extending to the closest corner and placed at (80%, 40%) containing the color white stopping at 15% and followed by the color rgba(0, 0, 0, 0) at 30% 51, 151, 0.5) stopping at 50% ·A radial gradient extending to the closest side and placed at (10%, 20%) containing the color white stopping at 20% and followed by the color rgba(0, 0, 0, 0) stopping at 45% A radial gradient with a size of 5% in the horizontal and vertical directions placed at (90%, 10%) with the color white stopping at 15% and followed by the color rgba(0, 0, 0, 0) stopping at 40% The background color rgb(151, 151, 151) set as a base for the preceding background image Within the style rule for the page body, add styles to place box shadows on the left and right borders. Set the color of the first shadow to rgb(31, 31, 31) with horizontal and vertical offsets of 30 pixels and O pixels and a blur of 45 pixels. Set the second shadow equal to the first except that the horizontal offset should be -30 pixels.Explanation / Answer
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <ctime>
using namespace std;
long length = 1000;
const long max_length = 300000;
int list[max_length];
void read()
{
ifstream fin("random.dat", ios::binary);
for (long i = 0; i < length; i++)
{
fin.read((char*)&list[i], sizeof(int));
}
fin.close();
}
void bubbleSort()
{
int temp;
for(long i = 0; i < length; i++)
{
for(long j = 0; j < length-i-1; j++)
{
if (list[j] > list[j+1])
{
temp = list[j];
list[j] = list[j+1];
list[j+1] = temp;
}
}
}
}
void insertionSort()
{
int temp;
for(long i = 1; i < length; i++)
{
temp = list[i];
long j;
for(j = i-1; j >= 0 && list[j] > temp; j--)
{
list[j+1] = list[j];
}
list[j+1] = temp;
}
}
long partition(long left, long right)
{
int pivot_element = list[left];
int lb = left, ub = right;
int temp;
while (left < right)
{
while(list[left] <= pivot_element)
left++;
while(list[right] > pivot_element)
right--;
if (left < right)
{
temp = list[left];
list[left] = list[right];
list[right] = temp;
}
}
list[lb] = list[right];
list[right] = pivot_element;
return right;
}
void quickSort(long left, long right)
{
if (left < right)
{
long pivot = partition(left, right);
quickSort(left, pivot-1);
quickSort(pivot+1, right);
}
}
int main()
{
double t1, t2;
for (length = 1000; length <= max_length; )
{
cout << " Length : " << length << ' ';
read();
t1 = clock();
bubbleSort();
t2 = clock();
cout << "Bubble Sort : " << (t2 - t1)/CLK_TCK << " sec ";
read();
t1 = clock();
insertionSort();
t2 = clock();
cout << "Insertion Sort : " << (t2 - t1)/CLK_TCK << " sec ";
read();
t1 = clock();
quickSort(0, length - 1);
t2 = clock();
cout << "Quick Sort : " << (t2 - t1)/CLK_TCK << " sec ";
switch (length)
{
case 1000 :
length = 5000;
break;
case 5000 :
length = 10000;
break;
case 10000 :
length = 50000;
break;
case 50000 :
length = 100000;
break;
case 100000 :
length = 200000;
break;
case 200000 :
length = 300000;
break;
case 300000 :
length = 300001;
break;
}
}
return 0;
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.